04-06-2009 08:33 AM - edited 04-06-2009 08:42 AM
I've written a LabView program (Included in this file) which I can use to record two images and then subtract those two images from one another, displaying the result. The program is also capable of applying voltage steps over specific periods of time in accordance with the frame rate of the camera.
Here's where I am having some trouble. Originally, I was happy running this program continuously but now, I would like to work with individual frames instead. I would like the program to work in the following sequence:
1. Apply the first voltage/voltage step
2. Take in the two images and subtract them
3. Save the subtracted image to a file location in a BMP format.
The sequence should repeat itself by then applying the next voltage step.
As you can probably tell, my LabView capabilities are somewhat poor to say it politely, so even creating the program you can see above was a challenge for me. Any help in trying to get a working sequence up and running would be greatly appreciated.
For some reason I'm having rouble attaching the .vi to this post, so if anyone would like it, I'll happily upload it manually.
Thanks
Brian
04-06-2009 08:52 AM
Sequences are not recommended because they are difficult to maintain.
Try to read up on the State Machine design pattern. This design pattern allows the developer to change the order of the sequence, add/subtract steps much easier than the sequence
04-06-2009 09:35 AM - edited 04-06-2009 09:44 AM
04-06-2009 09:55 AM
What I started to say (before my slow connection caused me to miss the edit window) was that you'd need to add the logic to adjust the voltage and move from state-to-state and stop the machine. You need to learn the State Machine, embrace the State Machine, use the State Machine, love the State Machine...