LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Publish and Subscribe using MQTT to share topics between LabVIEW and other programming languages

This is going to be short and sweet. I had a detailed post that, by the time I posted it, produced an error (I think something timed out).

 

I am using the MQTT Client from LabVIEW Open Source Project to share data between LabVIEW and .NET. I tried to use the pub sub example. It works when publishing and subscribing within LabVIEW, but would not decode payloads that were published outside of LabVIEW. I discovered that Publish.vi adds bytes to the payload and Decode Application Message (Type).vi removes those bytes from the payload. I did not know how to deal with the extra bytes within .NET, so I replaced Publish.vi with Publish (Raw Payload).vi and Decode Application Message (Type).vi with Decode Application Message (Raw).vi.

 

This post is for future users (including me) who need MQTT payloads to work between multiple programming languages.

Message 1 of 2
(611 Views)
附上你的VI,从你的语言里不太好判断
0 Kudos
Message 2 of 2
(499 Views)