From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple TCP Messaging (STM)

I am developing a DAQ application (just streaming for a fixed period of time since a trigger arrives) that will run in a PXI-8105 embedded controller and use a PXI-6115 DAQ card. The application will operate in a headless configuration receiving commands remotely thorugh a TCP/IP connection to the PXI8105 using a HTTP based protocol.

Someone will develop the remote (client) side in someother language (not LabVIEW), but I have to develop the server side in my application to receive the commands, act as ordered and respond with the data

I wonder if STM can be of any help to develop this HTTP Server or if I should start from zero and use the TCP/IP functions provided with LabVIEW. I am using LabVIEW 8.5

Thanks for your help

0 Kudos
Message 11 of 174
(14,821 Views)

Garcas,

If you need to develop an HTTP server you should use the low level TCP/IP functions, and not use STM. STM is a higher level protocol based on TCP/IP, designed to transfer packets of data or commands between two systems. It includes specific header information in each packet that identifies the contents of the packet. Because of this protocol specific content, you can not use it to create the HTTP protocol. In effect STM is in parallel to HTTP, as both protocols are based on TCP/IP.

However, STM is designed specifically for applications like you describe. So if possible, you may want to consider using STM instead of HTTP for your solution. STM is an open protocol and you can implement an STM client in any programming language that supports TCP/IP communication.

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


  
0 Kudos
Message 12 of 174
(14,814 Views)

 

Thanks Christian, it's what it looked to me but I wanted to be sure I wasn't missing something before starting from scratch. My problem is that using HTTP is an application requirement, so I cannot do anything. Is there anything around so I don't have to start from 0? I read some threads that in the "old" Internet Toolkit there was an HTTP server, but I guess it didn't come with the complete code so I could modify it to my specific needs

 

Anyhow I think STM it's a great tool... and free ! So congratulations to the authors. I'll definitively copy some ideas

0 Kudos
Message 13 of 174
(14,810 Views)
I know this question was posted in September 2007, but:



@Auden wrote:
can a VI using STM be used as a TCP/IP server when the client computer does not use STM but jsut the "standard" TCP/IP?
 
Any tutorial or example you may be able to point me to?
 
Much thanks


I have an example of how to implment a STM client in CVI (ANSI C).  It is attached below.  What you do is open "STM Example.lvproj" and run the STM Server Example.VI on a real-time target (you will need to change the IP address in the project).  Then open the STM for CVI client.cws.  Run that example. 

Even if you are not using CVI, the STM_Comm.c and STM_Convert.c should be  a good starting point.
Brian K.
Message 14 of 174
(14,496 Views)

I have a problem with  STM to work in my startup EXE running on a cFP 2120 controller. I do not get connection to this EXE. Everything works fine and as expected if i start and deploy it from my LabVIEW development environment. What is the problem with the Executable? Is there anything I need to install on my target system, that is not coming with the Executable?

Any comment is highly appreciated.

 

DirkW

0 Kudos
Message 15 of 174
(14,056 Views)

Dirk,

 

STM does not require anything special to run in an executbale as it is completely based on TCP and written in LV code.

 

It sounds like there is an issue establishing a TCP connection to your executable or some other fundamental issue. Can you ping the cFP controller at the IP address that you are using for your TCP connection?

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


  
0 Kudos
Message 16 of 174
(14,016 Views)

I am posting a beta version of the next revision of the STM library.  Attached below is a .zip file which can be unzipped to the user.lib directory.

 

The major changes in this version of STM are the additon of serial and UDP as communication mechanisms along with TCP/IP.  There are also changes to the API to make the VIs easier to use. 

 

We would like to hear your feedback (regarding either features or bugs) with this version of STM.  Please post any feedback on this forum.

 

Note that the documentation and examples are not yet finished.

 

Thanks,

Jack

0 Kudos
Message 17 of 174
(13,899 Views)

Hi,

 

funny thing you posting a beta of a new version of the STM tools, since I just did some small optimizations over christmas on the published STM tools. Some things you changed already, but I have two remarks on the code (s. attachment).

 

A question: is this version of STM only for LabVIEW 8.5 and newer?

 

Thanks for your great work.

 

Regards

Marc

CLD
Message 18 of 174
(13,820 Views)

Hey Marc -

 

Thanks for the feedback....I've already implemented your recommendations into the next build of STM.  It should be on the web soon.

 

Yes, STM 2.0 will only be supported in LabVIEW 8.5 or later.  We will keep the current version of STM on the web if you need to use a previous version of LabVIEW. 

 

-Jack

0 Kudos
Message 19 of 174
(13,779 Views)

Jack A. wrote:

Yes, STM 2.0 will only be supported in LabVIEW 8.5 or later.  We will keep the current version of STM on the web if you need to use a previous version of LabVIEW. 


OK, than I do have one more small patch (s. attachment).

 

Oh, and one more idea for you. I would recommend using LabVIEW classes for supporting different communication protocols like TCP, UDP or seriel. I think classes would be more flexible and could be easier extended to other communication methods. Well, just an idea.

 

Thanks for STM. While it is very simple, it is a powerful tool and I would have never thought about it doing communication this way.

 

Regards,

Marc

CLD
Message 20 of 174
(13,748 Views)