‎06-14-2012 08:38 AM
What are your thoughts about having this type of queued command, where I have the variant portion of the first command cluster be another command cluster with its own command and variant portions? I know that maybe the "double queued command" name is not the best, but I could not think of a better one, ha ha.
Thank you for your comments.
‎06-14-2012 08:46 AM
It depends how you extract the required data from the queue. It may create confusion at a later point. Lets wait and see the comments of the knights and champs.
‎06-14-2012 08:54 AM - edited ‎06-14-2012 08:54 AM
Are you trying to send two commands? Or are you trying to send a single command whose content is another command / state?
Maybe I need to draw it (code it into LV)...
Lemme try to explain...
Do you have a state machine which has separate states for "Initialize" & "Welcome"? Or do you have in your state machine an "Initialize" state which has a case structure that contains a "Welcome" case?
I do not understand what you are trying to do.
‎06-14-2012 08:56 AM - edited ‎06-14-2012 08:59 AM
Do you have a specific reason to place the secondary cluster into the primary clusters variant, instead of having the cluster inside the other one as it is?
Christian
p.s.: Sorry that I wrote "secondery" instead of "secondary" in the screenshot
‎06-14-2012 09:01 AM
I would have suggested sending an array of commands if there are to be executed sequentially...
If the implementation is a primary command with secondary case, then what Christian suggested is a cleaner (better) approach.
‎06-14-2012 09:03 AM
@jarcTec wrote:
What are your thoughts about having this type of queued command, where I have the variant portion of the first command cluster be another command cluster with its own command and variant portions? I know that maybe the "double queued command" name is not the best, but I could not think of a better one, ha ha.
Thank you for your comments.
![]()
I can imagine a situation where that construct would be justified...
A VXI controller implemented as a slave loop that inturn controls multiple widgets in a frame each of which has a unique set of commands and unique paramters associated with different commands.
Question to YOU!
What is you use case for this construct?
Curious,
Ben
‎06-14-2012 12:31 PM
Thank you all for your replies. I have a state machine with an Initialize case, inside of which I have another case structure with a Welcome case. So, I am not trying to send two commands to the same state machine.
‎06-14-2012 12:38 PM
Just to add something, I would think that what Christian suggested would be a good solution if all the commands for my primary state machine contained a secondary command cluster. Nonetheless, I have commands that instead of using a secondary command cluster in place of the variant employ a string or a number. I don't know if that gives you a better idea of my implementation.
‎06-14-2012 01:38 PM
Correcting my last reply, the variant portion of the Primary Command Cluster always contains an enum with a command. There are cases, like the one I showed above, where the secondary command requires some other input (a string, or number) and hence the use of a secondary command cluster. The variant part of this last cluster is the one that may be a string, a number or something else. Thus, my application is very similar to what Ben said, I am just wondering if there is a "more elegant" way of accomplishing the same. In addition, one could argue that I could keep adding command clusters on and on to the variant part of the previous cluster.
‎06-14-2012 02:01 PM
See the figure below, where three different things are sent via the variant portion of the Display Control cluster. In the first case, the variant portion is not employed. For the second one, an EnableMenus command is sent via the variant portion of the Display Control The third case is the one in which I need an extra string input for the MainMenu command and hence the use of the UpdateMessageControl cluster.