From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP architecture advice and suggestions

Hello All,

 

Just trying to come up with some ideas for architecture implementation.  I am needing to communicate to multiple cRIO modules and typical use TCP in the past to communicate with each cRIO module.  I now have the problem of having multiple cRIO modules running and I want to be able to split the command set into generic and specific commands.  i.e a Generic command is received and handled in the same way for each cRIO chassis from the host controlling PC.  This allows me to have a generic type def command set and several specific type def command sets within a project.  I was hoping to use a poly on the cRIO side (and the host) in order to adapt to which command set it has received and use a different state machine (Which will all be similar) depending on which type def command it has received.  This should avoid me having one large type def CMD enum which contains all of the generic commands, all the commands for cRIO A, all the commands for cRIO B etc.

 

Essentially I know this isn't going to work but is there any other ways of doing this?  Is this touching on the realms of dynamic dispatch by selecting which vi is run at runtime? Is it time to bite the bullet and use classes? Etc etc

 

If anyone can shed some light it would be appreciated.

 

I have thought of workarounds but that is not what I am after really, just if there is a way of doing it properly and if so where to go read up next.

 

Example Problem.png

 

Many Thanks in advance

Craig

LabVIEW 2012
0 Kudos
Message 1 of 2
(2,148 Views)

Hi Craig,

 

If it was me building this program I would go down the dynamic dispatch/ classes route as it will allow the architecture to be very scalable as the system needs to expand.  I think any other method of implimenting this will have limitations which can be avoided by using the dynamic dispatch/ classes design. 

In terms or where to read up on this and how to get started ni.com has a lot of documentation on this subject a simple search will find many results but I have included a few below that may help to get you started.

 

If you have any more questions then please feel free to post back an I will be happy to help you further.

 

Intro to LVOOP

What the Heck is OOP

 

Best Regards

Matt Surridge

National Instruments
Message 2 of 2
(2,077 Views)