LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP Write won't accept this string

I'm running an application that needs to communicate with a Lexium Servo Driver. But the issue here is that the TCP/IP Write receives a string that it can't process (or that is what it seems to happen here).

 

Right now I don't have access to the code, but I tried to replicate it on my computer and this is exactly what it looks like (including the error).

 

Emilio_94_1-1647562002784.png

 

As you can see, the array is converted to a string which then is submitted into the TCP/IP Write, but this error appears and it doesn't send any info to my device.

 

Thanks in advanced!

 

 

0 Kudos
Message 1 of 3
(665 Views)

Its probably the Connection ID input parameter that is giving the error rather than the string. The Connection ID represents a reference (number) to a unique connection that exists within the OS, which you don't specify directly. You should be opening the connection first (TCP Open Connection), then the Write, then TCP Close Connection later (when you're done with the connection).

 

Without your actual code (and not the mock you've shown), its hard to say more.

0 Kudos
Message 2 of 3
(658 Views)

tyk007 basically nailed it although I think he was stating it a little cautiously. The network refnum constant connected to the TCP Write is NOT a valid connection but rather the canonical invalid connection. You MUST open a connection first to get a valid refnum that represents the connection to a valid existing remote connection point and then you can attempt to write something to that connection.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 3
(621 Views)