LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Connection Manager (STM)

Bom dia, 

Eu gostaria de saber um pouco mais sobre o TCP Connection Manager.

Eu fiz um programa que comunica um PC Server com um Panel PC Cliente, usando o STM, vou enviar fotos de uma simplificação disso.

Agora eu preciso fazer esse PC server comunicar com diversos Panel PCs (entre 8 e 14).

Pensei em usar o TCP Connection Manager, mas não entendi muito bem como ele funciona. 

Já dei uma olhada no exemplo STM Distriubuted Clients.lvproj, mas não me ajudou muito.

Estou usando o LV 2016 em um Win 7, e os Panel PCs tem Win 7.

 

Atenciosamente,

 

Daniel Maretti
Programador
Tago Automação Industrial

Download All
0 Kudos
Message 1 of 7
(3,395 Views)

and in English:

 

Good Morning,

I would like to know a bit more about TCP Connection Manager.

I made a program that communicates a PC Server with a Panel PC Client, using STM, I will send pictures of a simplification of that.

Now I need to have this PC server communicate with several Panel PCs (between 8 and 14).

I thought about using TCP Connection Manager, but I do not quite understand how it works.

I've already taken a look at the STM Distriubuted Clients.lvproj example, but it did not help me much.

I'm using LV 2016 on a Win 7, and Panel PCs have Win 7.  

 

Regards,

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 7
(3,392 Views)

From looking at other forum posts, the example project "STM Distriubuted Clients.lvproj " that you are basing your code on is in the Real-Time Toolkit.- In fact STM uses the real time toolkit.

The "TCP Multiple Connections.lvproj" is worth a look for getting started with the simple structure.

There is an example project on the Advanced Architectures course where one of the projects creates many spawned sub processes (of the same type) and talks to them by spawnID.

 

Basically you need to break this down into basic bits:

1) Get TCP-IP working between a server and client with basic string data

2) Add more complex data

3) Allow the client to send basic data back to the server to acknowledge it is there.

4) Add more complex return data

5) Add a second Client (you can see from the example project that both clients are identical in all but name!).

6) Modify for the data you want to send and verify it works.

 

Hope this helps

 

James

 

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 3 of 7
(3,382 Views)

@James_W wrote:

In fact STM uses the real time toolkit.


That is not true.  Some of the examples do, but not the library itself.

 

What I have done in these situations is make the connections short.  Client connects to the host, performs the needed transaction, and then closes the connection.  Then the host can come back around and allow a connection to a different client.


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
Message 4 of 7
(3,367 Views)

@crossrulz wrote:

@James_W wrote:

In fact STM uses the real time toolkit.


That is not true.  Some of the examples do, but not the library itself.

 

What I have done in these situations is make the connections short.  Client connects to the host, performs the needed transaction, and then closes the connection.  Then the host can come back around and allow a connection to a different client.


I stand corrected - I haven't installed real time and the STM is not installed in any of my LabVIEW installations going back to 2012.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 5 of 7
(3,346 Views)

Thank you!

I was able to sort this out basically by doing what crossrulz said:
I made a routine to connect and close the connection with each Panel PC periodically.

James_W, thanks for translating this, too, I wrote in Portuguese because I thought this forum would be answered by a Brazilian AE anyway, but I forgot that any user from any part of the world could answer that too.

I'm going to write everything in English from now on.

 

Thank you!

Daniel Maretti
Programador
Tago Automação Industrial

Message 6 of 7
(3,313 Views)

Glad it's sorted. I've learnt something about different architectures too from reading this.

 

It's great and it's sad that English is such a universal language.

Personally, I love it when people post on the forum in different languages. I find it gives me a chance to brush up on my Spanish, French and German or apply them to see if I can work out what is being asked before rushing off to Google translate to get a 'ranslation'.

Unfortunately I know there are many who don't share my enthusiasm for multiple languages and won't even try and look at a post if it's not in another language. (But I don't think crossrulz is one of them!) - that's why I re-posted in English, to get a wider audience for you.

 

James.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 7 of 7
(3,305 Views)