LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sequential programming for beginners

We are trying to write some software that will operate several LED's and detectors in sequential mode.

The program that we are trying to write goes like
this:

1 switch on detector on red channel
2 20ms later, switch on red LED
3 measure data from detector for 2ms
4 save data to file
5 switch off red LED
6 repeat steps 1 to 5 but now using green LED
7 repeat steps 1 to 5 but now using blue LED

We have been trying with LabView 7 but haven't found the way to run such a sequential program.

We would need some example .vi program that could help us to see how to get our program done, or some suggestions of which commands/icons in LabView we
should use to do this.

Thanks a lot.
0 Kudos
Message 1 of 2
(3,845 Views)
Hi,

a sequential structure can easily be done in LabVIEW using subvis and LabVIEW dataflow. However another way is to use the flat sequence structure from the structure pallette.
If you are looking for more flexibility, state machines are a common design pattern for problems like yours. Below you can find information about using statemachines:

Application Design Patterns: State Machines
http://zone.ni.com/devzone/conceptd.nsf/webmain/C74CEC177A289DBD86256C4E00600196?opendocument

There is also a template in LV7 which you can use for a start.(New -> vi templates -> Design Patterns -> State machine)

Let me know if this helps.

Regards

Stephan A.
National Instruments
Message 2 of 2
(3,845 Views)