Problem updating tags with SETIO

Hello, I’m having a problem updating tags with info received from MQTT…

I have an array of group of tags (tags in OPCUA server). Each array item contains 16 tags.
When I receive msg from MQTT, one of those array items must be updated with the info coming from MQTT. One of those 16 tags is the timeStamp of the last update.
Resume: I want to update ArrayTags[3] with incoming MQTT data. ArrayTags[3] contains 16 tags.

Im receiving from MQTT the data to update 20 group of tags (20 different messages and 320 tags in total) and EWON seems to handle by itself the 20 messages.

I’m trying to find de tag with the oldest timestamp and update it with SETIO tagName, VAL tagValue (also tried without the VAL function)
But for some reason my code was not working properly… I did LOGEVENT on everything to find the error and I noticed that the timeStamp tag was not updating.
This is a big problem because the messages that are in queue from MQTT will override the exact same tag because the timestamp (witch did not update) is still the odlest one.

I have to say that all the other tags are updating properly so the code works.
So, I think it may be an “execution time” problem.
Perhaps between MQTT messages there was no time for the tag to update in the OPCUA server and it is why EWON gets the outdated value?

Note that de syntax MyTag@=10.2 to update tags is not an option because I get the tag values programatically.

Thanks in advance.

I can reply myself:
It seems it is indeed a problem about “execution time”. I’m sending now the messages in MQTT every 5 seconds and the problem was solved.
But it cannot stay it like that. Is there any way to to de same but on the Ewon side? Something like control the flow of received messages or add a PAUSE state to the basic program?

Thanks.

Hello, sorry for the late reply.

Without having your Basic Script as Backup, it´s hard to help you forward here.

But you can use for example the Timerfunction that is described in the Reference Guide.

If you want to have further support, i have to ask you to create a Ticket within our Ticketsystem:

https://support.hms-networks.com/

Please upload here also a support backup of your flexy.

Thank you in advance.

Best regards

Christian