02-14-2013 05:55 AM
Hi guys
I have a simple command application. Now this command application has only 4 basic command and their corresponding case value. But as we test the board we want to send some arbiters command and if that command works we basically "save" this command and test further. But as the labview application is done at one place and run at different place I can't update the program. Can this be done dynamically?
Thanks & Regards
Niladri
Solved! Go to Solution.
02-14-2013 06:11 AM
But your firmware from which you are playing command response game, It should recognize the command you sent.
If you are adding the command later then how you are going to manage this ?
Labview program should be tested with new command
Dont you agree ?
02-14-2013 06:21 AM
I can manually feed command using "Prompt user for Input" vi. As the Description part of the command is always same(DBC0) I can add the contingency part(DBCOxxxx. xxxx is the contingency part of hexadecimal value). So I can give 0000 to FFFF at each channel of the board and test that it respond or not and onec that particular channel does changes its state the we say this is on/off value for that channel and we save this command and try new channel.
02-14-2013 06:26 AM
In theory, you could detect the new command, save it in an array, and then see that you get it again (using Search 1D Array). But how you process that command is where you get into problems. In short, an additional case cannot be added to a case structure while the VI is running or after it has been compiled into an exe.
02-14-2013 06:33 AM
Thanks for the response. So any other method that I can use? In forum n other places I found that dynamically I can't add value in ENUM variable. I really don't want to add the newly made command to log it a text file add it latter at next version release.
Thanks & Regards
02-14-2013 07:01 AM - edited 02-14-2013 07:21 AM
Darin shows how to use tags in a VI to save control values. My example uses a Combo Box instead of your enum because, as you've noted, you can't dynamically add elements to an enum. The blue sub-VIs are from Darin's post; you'll need to download them. This works with a VI in the development environment; I think you're back to an ini file if it's built into an executable.
02-14-2013 10:53 PM
02-15-2013 06:02 AM
You won't be able to update any structure dynamically while the VI containing the structure is running. My solution updated the array with any new command that you'd like to add. You don't need a Case structure to get the command string; just loop through the array.
02-17-2013 10:45 PM
The new command string will contain the corresponding value. Now if I loop through the array will I get the corresponding value??
Thanks & Regards
Niladri
02-18-2013 06:25 AM
Now if I loop through the array will I get the corresponding value??
Yes. My example shows how the new command string is found in the array.