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.
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.
03-30-2006 05:49 AM
03-30-2006 06:21 AM
03-30-2006 09:01 AM
03-30-2006 10:52 AM
Sequence frame 1
Front panel
Block Diagram
The above comments should keep you busy for a few minutes. 😉 Let me know if anything is not clear.
Of course we also need to know the purpose of this VI. Right now it is marginally sufficient as a "proof of concept" to interact with your hardware and for your personal use. If this is to be distributed or used by others, it need quite a bit more work.
03-30-2006 11:29 AM
Can you post that vi in 7.0 format?
04-03-2006 09:15 AM
Hi lanoob,
I've had a go at re-writing your vi in the state machine architecture that Altenbach suggested - this structure will allow you far greater flexibility in programming your application, allowing you to add functions and change order of execution easily (the code I've attached is only partially finished, but should give you an idea of how to continue).
If you haven't seen one of these before, it's one main while loop, with a case structure inside it. The piece of code which is exectued in each iteration of the loop is controlled by an enumerated type wired into a shift register, so you can directly alter the transition from one case to another using enumerated constants. You can add or remove cases by right clicking on one of the constants and selecting Open Type Def. From there you can edit the cases available, apply changes from the file menu, and re-save the control.
Regarding your other questions, you can't directly wire out of a loop while it is executing, this is part of the idea behind dataflow programming. If you want to communicate between loops while running, you will need to use a variable structure, usually within one VI, a local variable. You can, however, also write your code around structures such as Producer/Consumer loops (these can be found under the included VI templates).
If you want to log events once a certain condition has been met, include a case which writes to file, and call it as the next case every time the condition is met in the current case of your VI.
I hope this helps to get you going.
Mark
Applications Engineer
National Instruments
PS - I've also added a tab control, as already suggested, to organise your front panel somewhat.
04-03-2006 09:20 AM
04-03-2006 09:35 AM
04-03-2006 09:39 AM
04-03-2006 09:46 AM