Mardie
 
 
 
 
 
 
Hi, i am trying to get LED switched to ON and off via simple start/stop command
 
 
I am using openplc v4. When i run openplc-run v4 locally on my windows machine everything works fine, but running openplc-run on my raspberry pi zero 2W does not work.
 
i installed openplc-run and node-red latest version for later use on the rpi to publish later data to my home assistant.
 
pinout led pin 40, (%QX1.2) 250 ohms to ground
pushbutton pin 37 and 35 (%IX1.5 and %IX1.4) pushed to ground
 
[203128%2F9663467%2Fmceclip0]
 
 
[203128%2F9663463%2Fmceclip0]
 
The download to the rpi is succesfull but nothing happens.
What am i doing wrong
 
(maybe a clean install without node-red)?
Reply 0 0
thiagoralves
OpenPLC v4 does not have drivers to toggle GPIO pins on a Rasperry Pi. You can either write the code to toggle pins on a Python function block (Python makes it very easy to toggle pins on the Pi, there is a lot of tutorial online, and is also a great way to learn how to use Python with OpenPLC), or use runtime v3.
Reply 1 0
Mardie
Thank you for your fast reply. Can i still use the PI in runtime v4 to use my waveshare rs485 to connect to modbus and read and write to other modbus components. Toggling pins was only to get aquainted with OpenPLC. my higher goal is to read other devices using rs485
Reply 0 0
thiagoralves
Yes. OpenPLC runtime v4 strongest point is protocol support and expandability. We are favoring this over local IO. You'll need the latest OpenPLC Editor v4.1.2 to setup Modbus RTU connection (v4.1.1 only supports setting up Modbus TCP even though the runtime supports both).
Reply 0 0
Mardie
thank you! This wil be my next effort starting tomorrow :-)
Reply 0 0
IS243
Yes. OpenPLC runtime v4 strongest point is protocol support and expandability. We are favoring this over local IO. You'll need the latest OpenPLC Editor v4.1.2 to setup Modbus RTU connection (v4.1.1 only supports setting up Modbus TCP even though the runtime supports both).
Respected Sir,
 
Both run time 3 and do not support Modbus RTU. In the version when we are configuring a remote RTU device, the editor is not detecting COM ports on windows plate form.
 
Regards,
Reply 0 0
thiagoralves
Runtime v3 and v4 supports Modbus Master RTU (runtime can talk to slave devices). Runtime v4 also supports Modbus Slave RTU (runtime can receive commands from another master). On v3 you have to add slaves through the web interface not the editor. On v4 you do everything from the editor (there is no web interface for v4).

To show serial ports you need to be connected to the runtime. If even then it does not show any, you can write the serial port name on the field as well (like COM3 for example) and it will accept it.
Reply 0 0
IS243
Runtime v3 and v4 supports Modbus Master RTU (runtime can talk to slave devices). Runtime v4 also supports Modbus Slave RTU (runtime can receive commands from another master). On v3 you have to add slaves through the web interface not the editor. On v4 you do everything from the editor (there is no web interface for v4).

To show serial ports you need to be connected to the runtime. If even then it does not show any, you can write the serial port name on the field as well (like COM3 for example) and it will accept it.
Yes, in version 3, I set up the salve device and showed all the COM ports, but not work. In version 4, no COM port shows; I set it manually, but the runtime does not detect.
Reply 0 0
thiagoralves
Can you share your setup and the error messages you got? Issues could be on slave devides, wiring, serial configuration, etc
Reply 0 0
IS243
Can you share your setup and the error messages you got? Issues could be on slave devides, wiring, serial configuration, etc
Hi,
Have a good day,
 
Please find the attached file for your information. Please review and advise further.
 
Regards,
Reply 0 0
thiagoralves
After connecting to the runtime, when you click on Serial Port dropdown, what are the options shown? Try using /dev/ttyS4 instead of COM5.
Reply 0 0
IS243
I tried /dev/ttys5 instead of COM 5, but not work
Reply 0 0
IS243
A video is attached for your information
Reply 0 0
thiagoralves
I wrote s4, not s5
Reply 0 0
Reply