Click Plus MQTT Subscribe capture once

mec440

Supporting Member
Join Date
May 2022
Location
Cleveland, Ohio
Posts
2
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
 
Not at all familliar with Click PLCs. MQTT clients I have worked with generate some sort of action when a new message is recieved on a subscribed topic and you could use that to grab system time maybe? Looking for a change in a recieved string would also work but only if every message recieved is different from the previous message.

can you convert the system time to a string and concatenate that with your response? It may be more useful to format your response as JSON.

Good luck with the project,

Nick
 

Similar Topics

In an attempt to address a networking issue on my end, I am asking the Click Plus experts if you could verify that I am configuring the email...
Replies
0
Views
347
This is more of a multipart question involving home networking and I have limited experience in computer networking. The first objective is to...
Replies
0
Views
330
I have both an Automation Direct Click Plus PLC and a EA3 series Micro HMI that I’m getting a feeling for before a big project since I haven’t use...
Replies
14
Views
1,211
I am trying to set a bit to command the Zebra ZT230 to print a label and receive a confirmation bit from the unit via an Automation Direct Click...
Replies
0
Views
670
Dear All My customer want us to setup a new plant automation with IoT capability. We are inclined to go with CLICK PLUS PLC as it supports MQTT...
Replies
6
Views
1,668
Back
Top Bottom