mec440
Supporting Member
Working on a project using MQTT and an Automation Direct Click Plus. Have the bidirectional communication pretty much figured out. One of the features to demo it working is to publish a text string from a MQTT client on a PC, read the text into the PLC, and then have the PLC publish a response under a different topic. This is working.
My Question:
When a new text string comes in, I want to grab PLC system time and then store it to send back with the response. Can this be done with the MQTT subscribe setup? I can accomplish this in ladder by storing the message and initial time stamp - when the text changes, record a new time stamp. There seems to be enough logic in the publish/subscribe modules to accomplish this without additional ladder to watch for the stored text to change. Receive message, write time, wait until new message comes in and then repeat. Possible ?
Thanks,
Mark
My Question:
When a new text string comes in, I want to grab PLC system time and then store it to send back with the response. Can this be done with the MQTT subscribe setup? I can accomplish this in ladder by storing the message and initial time stamp - when the text changes, record a new time stamp. There seems to be enough logic in the publish/subscribe modules to accomplish this without additional ladder to watch for the stored text to change. Receive message, write time, wait until new message comes in and then repeat. Possible ?
Thanks,
Mark