List arrangement

I don't know if you use receiveddata out of this code, if yes then use my temp and then manage data to fill receiveddata.
If not, for this block my temp is like your receivedata

Okey. For now Here are my blocks

Copy PARA with index from here

Simply this :point_down:t2: I don't know why you need enabled button

Because I have 6 gets and a button get all. I want only when I click Getall to have all the values if I don't, and I only click the button Get, i will get only 1 value that corresponds to that label in front of get.

Ok, no problem, delete it.
We will change the code of single get to connect with this code

Remove enabled and try the get all, if it works we will change the single get

like this?

I will write you when I will be at computer.
Why you need topic =unit2server ?

I need topic=... It's a must to communicate with my machine via MQTT. to make sure I communicate with the correct machine.
Your idea Worked my friend. So happy finally. But my get buttons don't work at all. With solved one problem but we have a new one. My get buttons used to work before. I don't know how to make them work again

Now I can't explain how to change my code for single get, but if your old code worked for single get the easiest way to fix all is to set a control (like your button enabled ) to switch between the two code.
In received block add
If button enabled
Add my code
Add your old code

1 Like

My button Gets don't work. I don't know how to solve this problem

Okey I'll try it now

Is there any way you can arrange for the incoming messages to tell what three digit category they are for?

That would eliminate the need for some global variable record keeping.

no i can't.

I separated the if then. And still won't work

How about the incoming Topic or Payload?

If they don't help, perhaps you could explain how the two Publish and one Subscribe block in that getPARA procedure work?

Are they one-shot requests, or are they setting up long term streams of incoming data?

You seem to call that getPARA procedure a lot, maybe redundantly?

Yes, Global variables are rope you can use to hang yourself, if you are not careful.

Especially if you machine gun off a series of requests and the global variables can't keep up with the incoming data.

Where did you get your MQTT components?
I would like to understand them better.

1 Like

I found a nice tutorial on MQTT at

From his examples, I see he is using the Topic in his Publish and Subscribe calls with major and minor parts, in such a way that he can get extra information in the Topic when data arrives.

Including your PARA parameter of the GetPARA procedure in the Topic sockets of your MQTT calls might enable the arriving Topic to identify the incoming data better.

From there, you could look up corresponding Labels in a two column Topic/Label Component table to simplify the data reception and sorting process, and to eliminate the index and global variable system entirely.

1 Like