Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple TCP Messaging (STM)

HI All; I'm looking at an application that STM seems to fit, but... I'm going to have clients that are micro controllers( simular to rabbit core boards), some that are linux machines, and some that are ethernet motion controllers. Is it possible to get ANSI C? The other choice is a plain tcp socket, and I already have Labview code, C and micro code for those. Thanks Pat
0 Kudos
Message 31 of 174
(11,669 Views)

PatFord,

 

Take a look at the code provide with Simple Messaging Reference Library (STM) Reference Example for LabWindows/CVI. This includes C code that implements the STM protocol. It may use some LabWindows/CVI specific TCP functions, but you should be able to easily replace those with your own TCP API.

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 32 of 174
(11,652 Views)

I am surprised no one has seen this error from shipping example. I am using LabVIEW 2009 release version and STM API 2.0. When i open and run

 

LabVIEW 2009\user.lib\STM\Examples\Command Based Communication\STM Command Based Example - Server.vi

 

and then run

 

LabVIEW 2009\user.lib\STM\Examples\Command Based Communication\STM Command Based Example - Client.vi

 

After 10-30 second i get "not enough memory to complete this operation" error? See attached screenshot. This is shipping example being run as is without any modifications? Anyone? The error is coming from "Enqueue Element" VI to where it is unable to enqueue as element. Error code is 2.

 

Thanks

0 Kudos
Message 33 of 174
(11,541 Views)

Hi Evan R,

 

You can use a type def'd Combo Box set to Values match Items.  Then you can place it as a control, indicator, and constant.  It's like an Enum but the terminal type is String (perfect for STM metadata).

 

Best Regards,

 

Steve K 

0 Kudos
Message 34 of 174
(11,435 Views)

Has anyone had issues with this library and 2010? I have a project that uses STM between a RT target and Windows. The RT deploys and runs until I run the Windows VI and tries to make connections. As a result the LabVIEW development looses connection with the target periodically.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 35 of 174
(10,920 Views)

I have used the STM library on many ocassions with LabVIEW 2010 without any problems.  I have seen disconnect issues however during deployment if the LV version on RT doesn't match the LV version on your development machine.  That is all I can think of.

 

Regards,

 

Jeff Tipps

S&V Systems Engineer

0 Kudos
Message 36 of 174
(10,909 Views)

As a note to developers using NI tcpip floating point numbers dont seem to be sent as a IEEE753 compliant value. What I found is that the bytes are swapped like they were an int32_t or int64_t. This came up in a project where LV controlled an linux program over tcp-ip

Just a heads up

Pat

Message 37 of 174
(10,907 Views)

I am running LabVIEW RT 10.0, RIO 3.5.1, and VISA 5.0 with 2010. When I run a VI from project on target I get a "lost connection" dialog as soon as I do a TCP open connection call to the target from Windows. If I leave it, it will eventually reestablish the connection and run fine until I make another call of the open TCP connection subVI. I have tried different ports with the sdame result.

Doug Ferguson

www.southerndaqsolutions.com
Message 38 of 174
(10,903 Views)

Found solution to my problem. I am on a closed network and some how a DNS server got addressed. Deleted it and all works again.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 39 of 174
(10,896 Views)

Hey Pat -

 

This is an endianness issue.  By default LabVIEW is big endian.  You can change the byte order of the flatten to string VI in the STM Write Message VIs from big endian to little endian if you need to.

 

-Jack

0 Kudos
Message 40 of 174
(10,895 Views)