LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Design help

Hello All
 
I am trying to figure out the best way to design my application.  I am designing a protocol simulator for both the client and server portions of the protocol and including them into a single program.  (the purpose for designing both sides is so we can ship a company our end of the simulator to use for their design validation and we will use the simulator of their end of the protocol to test our end of the code.)
 
I have a TopLevel.vi that handles the UI, configurations from menus, and spawns the client, server or both applications. I have found the .vit to be an extreemly helpful method of reusing the same application during runtime.  I have a .vit that based on the parameters can either be a client or server and combining the .vit with the Control Value:Set[Variant] Invoke Method I can spawn both a client and server on the same machine from the top level vi.
 
I must go one step further and have separate state machines for the client and server.  The state machine for the server  is straightforward but the state machine for the client(s) is more complicated.  Even though the client is a single application it must maintain up to 32 separate instances of the same state machine.
 
let me explain...the application is a Point of Sale communicating to up to 32 individual fuel dispensers.  The 32 fuel dispensers are being simulated by a single application on a single machine.  The state machine for one dispenser must be duplicated up to 32 times and maintain them individually.
 
my question is how do i maintain these instances.  My initial thoughts are:
 
1     create an action_engine.vit and spawn it for every dispenser and let the action engine maintain the states
or
2     create a single state machine and use an action engine to store all parameters for each position
or
....any other suggestions
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 1 of 3
(2,362 Views)
There are only 6 states but there are 15 commands in the protocol and up to 13 fields in each command. 
 
I was thinking of an array of clusters to hold all of this data but is the most efficient way?
 
 
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 2 of 3
(2,350 Views)
You could use one "action engine" that has an index to indicate which set of data to use. For instance, when a state machine starts, you tell it to create a new data set and the AE returns a new index. Pass this index to all instances of the AE. When done, tell the AE to delete the data set. Internally, you'd get one or more arrays with clusters of information.


This could be done very nicelly with LabVOOP. Each state machine creates a new instance of the AE class... I have no experiance, but I think you'll have to spend a bit of time learning how to work with LabVOOP.


Intuitivelly, I'd say that the indexing AE will be optimal in performance. I think it will also be more comprehensive then (reentrant) vi(t) instances, although perhaps a bit more difficult to get it right since you have one vi to do it all.


Hope it helps. Regards,


Wiebe.
Message 3 of 3
(2,334 Views)