LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

distributed application: Networked Shared Variables, Named Services (Raw TCP/IP) or Other?

Happy New Year NI forums! 

 

I am working on a project involving mobile interacting robots. In the future it is likely the application's components may need to run on different PCs (Targets). Note: at this point in time all the components are seperate but all running on the localhost machine. Thinking towards the future I want to pick the 'best' architecture to allow all these components (VIs performing various functions) in multiple locations. For example, several VIs on the Robots, VIs on serveral PCs. 

 

I am  currently aware of using Server/Client TCP/IP using named services. My mock up works well, but is it time efficient (my time coding) I wonder.. ?  

 

Whereas I am aware of networked shared variables which handle connections and all the parsing for the underlying tcp/ip communication. But will this be difficult the manage? I am unsure if I can associate shared variables with a VI similar to named services. I suppose I could pro grammatically create the variable upon initialization of the server component - and the client could just search the list of avaiaible variables to connect too. Downside this would require DSC module. 

 

As you can see, I am rather unsure. Any advice would be great!

 

Kind Regards,

James  

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 1 of 5
(2,908 Views)

The lack of openess in shared variables could tie your hands latter.

 

I'd suggest the TCP/IP and roll-your-own since there is no signs of that going away soon.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(2,893 Views)

Hi James,

 

You could use the Simple Messaging Reference Library (STM) to communicate over TCP/IP to increase your performance. This method makes use of creating a "meta data" message containing an index of the meta information that is sent whenever a connection is made. Therefore it has all the information needed to decode further messages. 

 

A more detailed explanation can be found in the following link,

http://zone.ni.com/devzone/cda/tut/p/id/4095

 

The link to download the library is at the bottom of that article.

 

If you have any further questions then feel free to post again.

 

Kind Regards,

Jas.W 

 

Jason W.
Applications Engineer
National Instruments UK & Ireland
Message 3 of 5
(2,867 Views)

Hi Jason,

 

Thanks for your reply. I hope your enjoying NI UK as much as I did.. fun times!

 

I have seen the link you posted a few times before. But today, I took a better look at it.

 

My issue is I need several multi-client severs, i.e. many servers which allow multiple clients to connect to them.


Now the STM does have an example of this - STM mutli-client Example - Server.vi (used with the STM mutli-client.vi)

 

However, when a make copies of these code (to have my second server) - it refuses to run. As in , it just stops itself.

 

I DID change the port number, on the lister aspect of the server code. But I Am unsure what else I would need to change to get this setup to work?

One thought I had was, the FIFOs all having the same name - this probably isn't a good idea between servers.

Any suggestions would be grateful!


*please could you provide me email support

 

Kind Regards,

James Hillman  

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 5
(2,830 Views)
Just wanted to quickly post - that I have resolved my problems. It was the FIFOs sharing the same name. 
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 5 of 5
(2,798 Views)