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)

Hi jason,

I'm not an expert, but if I remember right, a tcp/ip connection allows only a short number of opening port, even if you close the port.

By this way, I have changed my vis (regarding tcp/ip connection) in order to open connection only one time and closing only when shutting down the vi.

Another user received the same error (see page 9 in this topic)

 

dh

0 Kudos
Message 161 of 174
(4,284 Views)

I see a lot of references to RT systems. Is STM not designed for implementation using Windows applications only? 

0 Kudos
Message 162 of 174
(4,106 Views)

No. It works on every LabVIEW platform that supports TCP/IP functionality.

Rolf Kalbermatter
My Blog
0 Kudos
Message 163 of 174
(4,104 Views)

Hello,

I am trying to use STM to communicate between multiple labview projects. I have two labview projects that run on the same computer due to a fork in our development team. Project 1 sends position data from stepper motors and analog signals from a cDAQ to Project 2. Project 2 reads data from project 1 and also collects data from a cRIO and EtherCat servo motors via STM. Data from Project 1 and Project 2 are compiled on project 2 and sent to project 3 on a separate computer. STM communication works great between project 1 and 2. I get error 56 when attempting to communicate between project 2 and project 3. When I run a standalone STM server, I can communicate with project 3 across the network with no issue, but when the stm server is integrated in project 2, and project 1 is communicating to project 2, it fails to communicate. When project 2 is executed before project 1, it will connect to project 3, but then I can not get project 1 to communicate with project 2.

I am using unique ports for each leg of communication:

Proj 1 - Proj 2 : port 55554

Proj 2 - cRIO : port 55551

Proj 2 - Proj 3 : port 55555

Firewalls are disabled on both computers.

0 Kudos
Message 164 of 174
(3,959 Views)

Hi John

I think you have the same problem that I found in the past... see what Christian had suggested to me (page 16)

0 Kudos
Message 165 of 174
(3,951 Views)

I am using a STM server and client similar to TCP STM Reconnect Example Christian posted on pg  11, and not using the connection manager. STM is not required between project 1 and 2, so I will be changing my approach for transferring data between the two projects.

Thanks

0 Kudos
Message 166 of 174
(3,934 Views)

hi John,

is it possible to have an example of what you have developed?

 

thanks

 

dh

0 Kudos
Message 167 of 174
(3,650 Views)

Hi,

 

I want to use STM for server-client communication and very new to STM. My use case is:

- Server Project has several modules/VIs that will do data acquisition, all in the same server PC. The data would then be displayed in client(s).

 

The sample I see so far has only 1 VI to do the STM... Any sample program (server side) for this case?

Thanks & Regards,
Irfan
(CLD)
https://haliatech.com/
0 Kudos
Message 168 of 174
(2,033 Views)

Hi Irfan

 

I had your same problem two years ago.

Starting from message no. 151, you may find the solution

 

dh

0 Kudos
Message 169 of 174
(2,026 Views)

Thanks DH.

 

Do you have an updated version of your original program that you sent?

Based on the message thread, I need to make a copy of several STM library files, one copy per one vi, right?

In my case, I use VI template for Acquisition VI, and there might be N number of DAQ VI running in parallel (the number of vi running can vary depending if they're alive or not).

 

I saw you're also using vi template. How do you figure out the workaround to make duplicate copy per vi?

 

Thanks,

Irfan

Thanks & Regards,
Irfan
(CLD)
https://haliatech.com/
0 Kudos
Message 170 of 174
(2,021 Views)