Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » MQTT and blob massages(What is the right output type to receive MQTT blob message?)
MQTT and blob massages [message #1839510] Tue, 23 March 2021 05:59 Go to next message
Alex Maximov is currently offline Alex MaximovFriend
Messages: 1
Registered: March 2021
Junior Member
I'm confused by choosing right type to receive binary message by SUBSCRIBE_1 function block and MQTT layer. What is the most appropriate type for output of SUBSCRIBE_1 function block? I've tryed STRING.
Forte work fine. But 4diac monitor hang if I try to watch SUBSCRIBE_1 or it output by STRING2STRING (and close debug connection to forte). I check forte code. As I understand, the unprintable characters in message are the problem (they corrupt the structure of debug xml packet).
Probably I should use another type instead STRING?
Re: MQTT and blob massages [message #1839579 is a reply to message #1839510] Wed, 24 March 2021 07:07 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1212
Registered: January 2014
Senior Member
I fear 4diac FORTE is currently not able to handle binary representations in monitoring well. Maybe the best solution would be an array of bytes. However as IEC only allows fixed sized arrays you need to find another way to store the length of the array. One option could be that you keep the string for the Subscribe_1 and build yourself an FB converting it to a BYTE array with a second output of the fill size of the array. This you should be able to watch. Or you could try the out console FB. printing the receveived data to the console if your device permits.
Previous Topic:Cmake with freertos
Next Topic:Does 4diac support SFC - Sequential Function Chart ?
Goto Forum:

Current Time: Sat May 15 05:51:38 GMT 2021

Powered by FUDForum. Page generated in 0.01888 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top