Jump to content

Recommended Posts

Posted

If I have a PLC and I need to submit XX different topics with several variables (say MachineA_state, MachineA_count, MachineB_state, MachineB_count etc.) Publishing is set to be done every 30s. I can either:

- call the Pub_Function X times for every machine with its own topic and values. The instances, I guess, must be separated by MQTT.Busy flag or something else to make sure the previous publishing has finished.

- modify the Function block to handle XX parameters and call it with the parameters from the main program. The problem is there could be 8-16-32 parameters.

What is usually a good practice as I'm just starting with MQTT. Also, if you can tune your message based on Siemens/TIA and Omron/SYSMAC perspective. Have to work on both.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...