rbulha
Hi,

I have two raspberry pi 3 (A and B) running the openplc. On raspberry A there is a ladder logic running and monitoring bit %IX100.7, that digital input come from a Modbus TCP Slave that points to the raspberry B. When this bit goes down (zero) the logic triggres an alarm.

This is running fine, but if the raspberry B just shuts down (for instance, a nenergy loss) i want to be able to set an alarm inside the ladder logic. Is there any way to get modbus status (like timeout) inside the ladder logic? Because right now the %IX100.7 just retain the last state and nothing change for the logic point o view.

Thanks in advance.
Rogério
Quote 0 0
thiagoralves
Yes you can. Just put a variable on %ML1026 and monitor its value. Check https://openplc.discussion.community/post/support-for-rtc-on-special-functions-9900466?pid=1305993224&highlight=special+functions for more info
Quote 0 0
rbulha

Hi Thiago, 

Thank for your quick anwser. I was about to change the modbus_master querySlaveDevices function. I saw the special_functions counter, but unfortunately it doesn't work for me, because I have more then one slave device and the %ML1026 counter is a variable for all devices. 

I ended up adding a "fake" discrete input for this device and used as a status bit and, at the same point where you count the special_functions I marked that bit as zero when the device is out.

Thanks again, perhaps creating a status register for each slave would be a good feature for the next releases.

Best regards,
Rogério
Quote 0 0