01-04-2010 03:44 AM
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
01-04-2010 08:07 AM
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
01-05-2010 08:31 AM
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
01-11-2010 08:35 AM
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
01-12-2010 01:46 PM