Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple TCP Messaging (STM)

Thanks for the explanation. I now have a client that I can start / stop multiple times by closing the connection with the client and placing the server in a loop such that it is always looking for a connection.

 

Ken G

0 Kudos
Message 71 of 174
(6,132 Views)

Hello, We have been using STM's target file http://ftp.ni.com/pub/devzone/epd/stm_for_cvi.zip with version 4/11/2008 and got some troubles. So my question is, do you have any updated version?

 

The problem is:

  When just the meta package with the size is send, its waits in infinity to get the rest.

  If the size is wrong it doesn't check for errors, it just starts to read, even if the size is more than 255 bytes.

 

So my client system will ether be hang or get segmentation-fault when there’s PC is busy or if the Ethernet disturbed.

 

So I hope you have come across this errors and have some solution for us.

 

Best regard,

Tobbe

torbjorn.tjellden@eis.semcon.com

 

 

 

0 Kudos
Message 72 of 174
(6,100 Views)

I am using STM library 2.0 for data communication between a PXI-1042 and my computer which has windows 7 installed and I have problems with it (I receive error 1 after the STM write metadata that I have in the PXI program). The TCP listener instead goes ok, no error, also no error in the PC side when I open the TCP connection,  so I think it has something to do with STM library. Have I to install anything special in the PXI?

 

I am surprised because with the library first version (2 years ago) and Labview 8.6, same PXI,  I had no problem.

 

Can you help me?

0 Kudos
Message 73 of 174
(6,050 Views)

The STM Write Meta VI generally only throws error 1 if there is an invalid TCP connection reference wired to it.  You should probe the TCP connection reference to determine if it is a null reference.  The reference may be null due to an upstream error from one of the other TCP functions, or it may be getting lost by passing it through a for loop or a default tunnel in a case structure.

 

Regards,

Ryan King
Systems Engineer

National Instruments

0 Kudos
Message 74 of 174
(6,042 Views)

I have finally got it working. The error was that I was using the create listener.vi instead of the TCP listen.vi, they seem quite similar but not the same, only changing these vis all is working ok.

 

0 Kudos
Message 75 of 174
(6,027 Views)

If you use the Create Listener VI you also need to use the Wait on Listener, otherwise it reserves a socket but never actually waits for a connection.  The TCP Listen VI just combines those two VIs as well as a hisorical repository that stores old references in an attempt to avoid re-creating them.

 

Regards,

Ryan King

0 Kudos
Message 76 of 174
(6,061 Views)

Is there any plan to put the STM into a package so I can install using VIPM?  It would be a great add on to the LabVIEW Tools Network.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 77 of 174
(6,010 Views)
0 Kudos
Message 78 of 174
(6,007 Views)

Hi,

 

So it seems STM doesn't work with WinCE targets. Has anyone made any workarounds to solve the issue with flatten/unflatten from string on WinCE? Here's a link that describes the problem. What is the status of CAR#161025 related to the problem? There's also a related problem described in the CCC thread by ingpconci.

 

It would be nice to find somekind of workaround for this because we have a bunch of TPC-2106T+cRIOs and would like to use CCC which utilizes STM.  You could also add some documentation that STM (and CCC) doesn't work with WinCE (TPC-2106T etc) so that other people don't have to spend couple of days tracking down what's the problem.

 

- Matti

0 Kudos
Message 79 of 174
(5,781 Views)

I have an application on my PC that receives acquisition data (10 temperature sensors measurement, pressure, motor torque, etc) via STM messages. I am using the structure shown in the annex, all is working ok, the measurement data display ant the file archive but I also wanted to graph the data during operation and I really do not know which is the best way to include the waveform graph here. Can anybody help me?

0 Kudos
Message 80 of 174
(5,669 Views)