Control FX3U PLC with ESP32 Microcontroller Part1( PLC I/O Control)

Поділитися
Вставка
  • Опубліковано 23 січ 2021
  • This video will show you how to use ESP32 Microcontroller to communicate and control the FX3U PLC using the RS485 Modbus RTU protocol.
    Part 2 Link:
    • Control FX3U PLC With ...
    RS485 Converter
    www.amazon.com/Conversion-Har...
    ESP32 Source code
    github.com/kj831ca/FX3U_ESP32...
    Credit and Special Thanks
    IBM Watson text to speech for voice using in this video.
    My friend company for giving me the FX3U PLC to play with. You can check their website here
    www.phaseprecision.com/
  • Наука та технологія

КОМЕНТАРІ • 44

  • @banjongphuangsri6297
    @banjongphuangsri6297 2 роки тому +1

    Thank you very much for sharing

  • @SeaTaj
    @SeaTaj Рік тому

    Sweet video!

  • @sulakshanaravishan2892
    @sulakshanaravishan2892 3 роки тому +1

    This is great

  • @leducdung123
    @leducdung123 Рік тому

    rất hay , đã làm và thành công. Chúc kênh ngày càng phát triển

    • @boyka8221
      @boyka8221 7 місяців тому

      Cài visual studio code rồi cài thêm phần gì để mở phần code mẫu lên test vậy bác. Tks

  • @user-peaencom
    @user-peaencom 3 роки тому

    ติดตามเลยครับ

  • @yonucex
    @yonucex 3 роки тому

    Thank you.

  • @MrHbpatel
    @MrHbpatel 3 роки тому

    Nice video

  • @ildarbelkin4851
    @ildarbelkin4851 Рік тому

    You LE3V manual says about P0-P63 pointers. Did you set it in Tool->Device/Label Automatic-Assign Settings Pointers? I has holding PLC on IF CASE operation and TON functional block without the setting.

  • @prudenciopinzonl8042
    @prudenciopinzonl8042 3 роки тому

    Muy interesante pero entiendo muy muy poco.
    Gracias.

  • @wallstreet497
    @wallstreet497 2 роки тому +1

    The Fx3u clone is the new Arduino on steroids. Affordable with so many documented projects. I got mine for $40

  • @ildarbelkin4851
    @ildarbelkin4851 Рік тому

    Hello. I have the same FX3U clone. Could you help: what is the address map of Y-outputs throw Modbus( FX3U is slave) to read states? X-inputs and D-registers can be read directly (without M).

  • @TechnicalBrainHVAC
    @TechnicalBrainHVAC 2 роки тому

    I am working an project i have le3u 48mr plc i am devolping a programe temperature and pressure base control but these analog inputs are not enough for me i need 10nos analog inputs is there ant module i can connect with this plc

  • @dj1encore
    @dj1encore 2 роки тому

    Hello, thanks for the good example code.
    Have you tried other MCU, ie the RP2040 ?

    • @kris-.1439
      @kris-.1439  2 роки тому

      No, I have not tried the RP2040 yet.

  • @hansdampf3011
    @hansdampf3011 3 роки тому +3

    It is possible to program the FX3U in a high level language like C or C++?

    • @sanwomashi1751
      @sanwomashi1751 Рік тому

      yes but need special software which converts to "correct" ladder standard before upload

  • @sirsur5126
    @sirsur5126 Рік тому

    แล้วถ้าผมจะทำการ slaveตัว esp32ที่มีการวัดของเซนเซอร์ ให้เข้ากับ FX3U-14mr นี่ ต้องเขียนโค้ดเพื่อเชื่อมต่อตัว plcไหมครับ หรือเขียนแค่โค้ดของเซนเซอร์อย่างเดียว

    • @kris-.1439
      @kris-.1439  Рік тому

      ไม่เคยทำครับ แต่คิดว่าต้องเขียน PLC Code อย่างน้อยต้องเปลี่ยน Mode PLC ไปเป็น Modbus Master.

  • @clamel77
    @clamel77 Рік тому

    Hello I'm new to this, I'm trying to learn. I see you connect B- and A+ from RS485 converter (yellow lines) to last 2 plc inputs (I suppose they are inputs). I do not understand how ESP can communicate with plc using 2 inputs..

    • @kris-.1439
      @kris-.1439  Рік тому

      The TX2 pin on ESP32 is output and RX2 pin is input.

    • @clamel77
      @clamel77 Рік тому

      @@kris-.1439 I'm sorry my question was about plc side.. in which plc pins are connected TX2 and RX2? thank you very much

    • @kris-.1439
      @kris-.1439  Рік тому

      @@clamel77 The RS485 in this video is configured as a half duplex. The A+ and B- can transmit data in both direction (ESP32 -> PLC or PLC -> ESP32). I don't have schematic for the PLC, if I guess they would use the RS485 transceiver chip to connect to PLC tx and rx pins on the CPU. For more information www.cuidevices.com/blog/rs-485-serial-interface-explained#:~:text=RS%2D485%20is%20a%20duplex,B'%20as%20a%20pair).

    • @roygubaton192
      @roygubaton192 2 місяці тому

      i tried using the program but it always fails. openOCD is not running when flashing the code in VS

  • @roygubaton192
    @roygubaton192 2 місяці тому

    will it work on Fx3G plc?

  • @mdsukhonsarker7747
    @mdsukhonsarker7747 2 роки тому

    Which cable are you using to program the PLC?

    • @kris-.1439
      @kris-.1439  2 роки тому

      USB to serial port DB9 male.

    • @sanwomashi1751
      @sanwomashi1751 2 роки тому

      find FT232R (TRX1227) - USB to RS with converter and drivers ( almost all windows)

  • @felipemartinez-dl8ug
    @felipemartinez-dl8ug 3 роки тому +1

    can i run the code in arduino ide?

    • @kris-.1439
      @kris-.1439  3 роки тому

      Sorry, I don't think you can run or compile the code in Arduino Ide. You will need ESP-IDF to compile the project.

  • @nattchawarat3136
    @nattchawarat3136 3 роки тому

    พี่ค่ะมีข่องทางการติดต่อไหมค่ะ

    • @kris-.1439
      @kris-.1439  3 роки тому

      ไม่ทราบจะติดต่อเรื่องอะไรล่ะครับ

  • @huynhduonggiabao7793
    @huynhduonggiabao7793 3 роки тому

    I get error Cannot open source file "sdkconfig.h" and libraries like freertos, esp_system, esp_spi_flash, esp_log

    • @kris-.1439
      @kris-.1439  3 роки тому +1

      I'm not sure what compiler are you using. In this project, I'm using ESP-IDF and I follow the instructions from the below website to install it on my computer. Those files you mentioned are the part of ESP-IDF compiler.
      docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/

    • @huynhduonggiabao7793
      @huynhduonggiabao7793 2 роки тому

      @@kris-.1439 thank you, i solved but again i got error "Failed to connect to ESP32: Timed out waiting for packet header". Do you have any solution? I tried holding "Boot" while uploading the code but it still doesn't work.
      P.s1: Sorry for my english.
      P.s2: I can load the code normally without connecting esp with RS485 Converter. After uploading, I connected the two, but the plc did not respond. I use plc fx3u-14mt.

    • @kris-.1439
      @kris-.1439  2 роки тому

      @@huynhduonggiabao7793 1. Please check if your PLC has option RS485 installed. We found out some of them has RS485 ports but the PCB didn't have the RS485 chip installed.
      2. Make sure you use the same Ladders as shown on this video.
      3. After upload the LADDER, you will need to power cycle the PLC.

  • @tartoruhahomo
    @tartoruhahomo 6 місяців тому

    งงกับชื่อไทยเจ้าของช่อง แต่เสียงในคลิปเป็นฝรั่ง แต่ขอบคุณมากที่ทำคลิปดีๆให้ความรู้ครับ

  • @henrytheodoredaquinag529
    @henrytheodoredaquinag529 2 місяці тому

    some of the files for json is missing how to fix this

    • @kris-.1439
      @kris-.1439  2 місяці тому

      I'm not using any JSON file on this project.

    • @henrytheodoredaquinag529
      @henrytheodoredaquinag529 2 місяці тому

      @@kris-.1439 oh i see, because I'm having a hard time because of the #include is showing signs of error based on my visual studio code

    • @kris-.1439
      @kris-.1439  2 місяці тому

      @@henrytheodoredaquinag529 That happened sometime on my VS Code as well. It is the path settings inside .vscode folder. Most of the time I would ignore it as long as ESP-IDF can compile.

    • @henrytheodoredaquinag529
      @henrytheodoredaquinag529 2 місяці тому

      @@kris-.1439 now the problem in the code is openocd is not running, how can I fix this

  • @Trungkienelectronic
    @Trungkienelectronic 2 роки тому

    ESP32 is Master?