plneo Posted July 31, 2006 Report Share Posted July 31, 2006 Hello everyone, I wonder if I can get some advice regarding timing issues? I am trying to write a VI that does two main tasks 1. To load and hold an image into a device for say, 5 seconds, 2. To take a photo of the image loaded into the device after it goes through an optical system. Let's say it takes 3 seconds for the image to be captured to be ready. So, in order for the VI to capture the right image (i.e. the image after it passes through the optical system), it will be good to start the execution of the 2nd task 3 seconds after I start the 1st task. I wonder what is the appropriate method for me to include a 3 seconds delay in the 2nd task when the 2 tasks are in the same frame of a flat sequence? Pardon me if I am asking an seemingly easy question. There are just too many things to learn when I need to embark into the many areas of LabView simultaneously! Quote Link to comment
crelf Posted July 31, 2006 Report Share Posted July 31, 2006 I wonder what is the appropriate method for me to include a 3 seconds delay in the 2nd task when the 2 tasks are in the same frame of a flat sequence? Don't be sorry for asking this question - it's very common for people starting out using LabVIEW. The concept you need to understand is "dataflow". Each node on your block diagram will begin executing once there is data at all its inputs - for example, if you have wires connected from the output of one subVI to the input of another subVI, the second one cannot run until the first one has completed and put its output data on the wire. To solve your problem: you have two operations (subVIs) in on frame and want to force some sort of timing control over them: put a "wait" function between them. I don't usually recommend express VIs, but in your case I think they're appropriate: look for the wait express VI, and then wire the "error out" output from your first subVI into the "error in" input of the wait, then wire the "error out" from the wait into the "error in" of the second subVI - this will force dataflow and ensure that they each execute in turn. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.