LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP String Input for Write Function

Hi all,

 

Lets say i am using the formula node function to compute some variables and output three data X, Y and Z. Now i need to send X, Y and Z via TCP/IP to another device that does not have LabVIEW. As the output of the formula node is in integer form, there is a need to convert them to string type (using cast type) before wiring it to the input of the TCP write function. However, as the external device does not have the LabVIEW software to convert the received data from string to integer, my external device will not be able to function correctly.

 

So am i right to say that there is no way that i can use the formula node to compute X, Y and Z and send it to my external device whereby the latter will receive the data in integer form? Please advise. Thank you.

0 Kudos
Message 1 of 16
(3,270 Views)

hi prince Boeing,

  You cant say that that there is no way that i can use the formula node to compute X, Y and Z.Since X,Y andz are integers,use format into string vi which will straight away convert to chars(for example 456 as input to the functions output will be also be a string with 456(string length 3)),so at the receiver you will receive straight away 456 as string chars and you need to manipulate accordingly.

 

Thanks and regard,

srikrishnaNF

 

Regards,
Srikrishna


0 Kudos
Message 2 of 16
(3,262 Views)

Hi srikrishnaNF.

 

Thank you for your reply. I understand that i can do what you suggest but the problem that i face is that the receiver have no means to manipulate the the string chars to integer form.

0 Kudos
Message 3 of 16
(3,257 Views)

hi prince,

  Can you tell me what kind of receiver is that?

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 16
(3,251 Views)

Hi srikrishnaNF,

 

Its a GPS receiver, a normal electronic device.

0 Kudos
Message 5 of 16
(3,248 Views)

Hi prince,

  Do you know how the GPS device will interpret the data?

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 6 of 16
(3,244 Views)

You need to study receiver manual to see the format that receiver read the data, and send TCP message with this format.

0 Kudos
Message 7 of 16
(3,209 Views)

let's say the receiver can only take in integer data. how can i convert it to integer format, since i need to convert the data to string format to feed to the TCP write function input. this is assuming the receiver has no means to convert the data it receives to the format that it can use.

0 Kudos
Message 8 of 16
(3,207 Views)

let's say the receiver can only take in integer data. how can i convert it to integer format, since i need to convert the data to string format to feed to the TCP write function input. this is assuming the receiver has no means to convert the data it receives to the format that it can use.

0 Kudos
Message 9 of 16
(3,207 Views)

Try flatten to string

0 Kudos
Message 10 of 16
(3,191 Views)