LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How to generate UDP traffic

Solved!
Go to solution

Hi !

I have a similar issue with communication with a piece of hardware.

The problem is that it seems that my message is mixing characters and binary. Here is the data I have to send in each UDP packet (all data is send in little endian) :

4 bytes: 53591 (little endian)

2 bytes: 1 (little endian)

21 bytes: a name terminated by a '\0' character

40 bytes: all zeros

 

test_write.PNG

I tried to use the flatten to String  VI to translate my data into string but it doesn't work (in the example above, the name is inexistant but I also tried to include some ASCII characters into bytes in the byte array, without success).

I also tried before to convert my whole message into a string of 0&1's and also a translation of the data into a hexadecimal string, and also a translation of the message to ASCII characters, all three trials without success.

 

Thank you in advance for your help !

0 Kudos
Message 1 of 3
(2,915 Views)
Solution
Accepted by topic author RomainLegrand

Hi Romain,

 

when you upload a VI you should also attach any needed subVIs!

 

THe main problem with your VI are the incorrect datatypes of the numeric constants.

See this example:

check.png

The datatype is given by the labels of the constants…

 

And please don't hijack 10 years old threads. Start your own thread instead…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,905 Views)

Thank you a lot, it was indeed the problem.

Sorry about the sub-VIs, I thought that I put the simplified version of my VI on the topic, without all the useless sub VIs.

0 Kudos
Message 3 of 3
(2,883 Views)