Harini Adisetti
Sir, i am unable to open runtime dashboard it is showing 404 error can u please help me to to rectify this.
Reply 0 0
Harini Adisetti
Yes sir i downloded runtime v4 for windows but how can i program it?? i am still getting confusion....
Reply 0 0
Harini Adisetti
Yes sir i downloded runtime v4 for windows but how can i program it?? i am still getting confusion....
I am using DHT Sensor to read the values of temperature and humidity but normally we write code in aurdino to map registers but in openplc how can we do...
Reply 0 0
thiagoralves
You are mixing up different and unrelated things. The OpenPLC runtime v4 will NOT run on your ESP32 board. It only runs on Linux-based boards and on Windows PCs. You can’t connect sensors to your ESP32 and expect to read them from the OpenPLC runtime v4 on your windows machine. There is no relation between them. If you want to read these sensors from your ESP32, write a C/C++ function block in your PLC program with the code to read these sensors. To do that, click on the blue + button on the left panel -> Function Block -> C\C++. Then upload the PLC program to your ESP32 board. That’s it.
Reply 0 0
Harini Adisetti
Thank You Sir,
I have connected my RS485 based Temp and Humidity Sensor (XYMD02) to my own development board, which has ESP32 with MAX485 IC. It read the registers of XYMD02 and got the values. Here i used Arduino IDE with C\C++ code. I want to do the same process in OpenPLC. Can you tell me how to read/write in MODBUS based sensors or displays via OpenPLC.
Reply 0 0
thiagoralves
To read Modbus devices from OpenPLC:
  1. Create a new PLC project
  2. On the Device -> Configuration screen, select OpenPLC Runtime v4 as your target and put the IP address of the device running OpenPLC Runtime v4. If OpenPLC Runtime v4 is running on the same Windows PC that is running the OpenPLC Editor, put 127.0.0.1 as the IP address
  3. Click on the Connect button to connect to the runtime and login with your user name and password or create a new user if that's the first login
  4. Connect your Modbus devices to the device running OpenPLC Runtime v4. If you're running it on a Windows PC you will have to use a RS485-USB adapter plugged on your PC USB port for RS485 Modbus devices. For Modbus TCP devices they just need to be on the same network as your PC.
  5. Click on the blue + button on the left panel, go to Remote Device, give it a name and select Modbus for the protocol
  6. On the screen that appears, select TCP/IP or RTU on Transport according to the type of your device. Configure the parameters accordingly
  7. Click on the blue + button next to "IO Tag Mapping" to add registers you want to read or write from your device. The added registers will be automatically mapped to IEC locations according to their type (%IW, %QW, etc)
  8. Repeat steps 5 - 7 as needed until you have added all your devices and registers
  9. Click on the compile and upload button on the left sidebar (folder with down arrow) to send your PLC project to the target and run it
As I said before, this requires a device running OpenPLC Runtime v4. Your ESP32 board cannot run OpenPLC Runtime v4. Instead, it runs a reduced version of the runtime that does not support Modbus master, so you can't follow these steps if ESP32 target is selected.
Reply 0 0
Harini Adisetti
[203128%2F9741005%2Fmceclip0]
Reply 0 0
Harini Adisetti
Port not connected how can i fix it.
Reply 0 0
thiagoralves
How did you select this port? Did you add it manually? The runtime does not have "COM5" defined as a valid name. It should usually be something like /dev/ttyS4 if you're running on Windows.
Reply 0 0
Harini Adisetti
Yes sir i entered manually beacuse port is not showing like this. Because it shows like this
[203128%2F9748066%2Fmceclip0]
Reply 0 0
thiagoralves
This error means your slave device is not responding. Check your wiring, power connections, etc
Reply 0 0
Harini Adisetti
Is the port is correct Sir?
Reply 0 0
thiagoralves
I don’t know. I haven’t seen your serial devices, neither your Modbus RTU configuration on the editor, or what the serial port dropdown shows
Reply 0 0
Harini Adisetti
[203128%2F9752812%2Fmceclip0]
Reply 0 0
Harini Adisetti
Sir where i can see the data from the modbus ?? There is no error in runtime and also openplc editor. But i didn't saw any values in editor display.
Reply 0 0
thiagoralves
You need a Modbus master software to connect to the runtime and see the Modbus data. From the screenshot I can see that you already can see debug data
Reply 0 0
Reply