05-16-2018 07:14 AM
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,
05-16-2018 07:22 AM
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,
05-16-2018 07:45 AM
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
05-16-2018 09:00 AM
@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.
05-17-2018 08:07 AM
@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.
05-21-2018 06:33 AM
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!
05-21-2018 07:50 AM
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.