0

just started my OpenPLC journey and created my first project using the tutorial and was wondering is It possible to turn on the LED through a packet sent to the default ModBus server port 502 instead of pressing the button physically? I have been going in circles and would be happy to get any help and direction! Thank you in advance!

Setup: 1 X RPI 3 b+ 1 X LED 2 X Button

Raspberry pi is installed with OpenPLC and project uploaded to OpenPLC. light turns on and off with the press of a button once PLC server is turned on.

1 Answers1

0

Yes, it is possible. According to OpenPLC's documentation the Modbus Slave supports coil registers with read/write access.

Now that you know you are not spinning your wheels in vain here are a couple of things to check.

  • verify that your PLC logic is not telling that output to turn off which will override the Modbus request
  • verify that your Modbus master (the device which is sending your packet) supports functions 5 &/or 15
mike_yung
  • 117
  • 2
  • 11