08-08-2005 10:37 AM
08-08-2005 10:44 AM
08-08-2005 10:55 AM
Are you talking about "Test Pulse Generators.vi"?
I don't know what your code does, but in each sequence frame you have two independent code fragments. ("output ttl ..." and "Generate 1 ttl..."). Does it matter which one executes first? Can both execute independently or is there some dependency e.g. via the hardware?
Why is there a wait 2000ms in the second frame? This does not make sense because the VI is over by then. Do you possibly need also a wait in the first frame?
Are you possibly running this using the "Continuous run" button??? That's NOT recommended!
08-08-2005 10:57 AM
08-08-2005 11:59 PM
08-09-2005 12:28 AM - edited 08-09-2005 12:28 AM

Message Edited by altenbach on 08-08-2005 10:29 PM
08-09-2005 01:00 AM
Okay, so if this is a sequencing structure, then I don't think my problem is fixed (I am not in the lab right now and can't physically check it).
I know that the subvi called TTL Pulse AO1 will run simultaneously with the Gen TTL subvis. It is supposed to. When the Gen TTL subvi runs, it needs a trigger pulse, which it gets from the TTL Pulse AO1 vi. The TTL Pulse AO1 sends out multiple pulses so that the Gen TTL is triggered regardless of exactly when the TTL Pulse AO1 program started.
Now, I can try adding error in and outs to my subvis and threading them throught my sequence structure so that there is data flowing between the structures to make sure that it is actually sequencing. But if what you say is true about these really being sequencing structures and that no data flow is required...then this shouldn't make a difference. I will try it anyway because I am desperate.
The guy from National Instruments who has been helping me on the other thread says my program works perfectly on his hardware.
08-09-2005 03:39 AM
I can't look at the code, but like Altenbach said, this is probably a timing issue. Placing the VIs in the same frame does not gurantee simultaneous execution. Theoretically, one VI could execute and the other will only start 2 minutes later.
You say the pulse VI sends multiple pulses, but what happens if the gen VI listened before the pulse VI started? Another option - is there some sort of timeout (listen only for n ms)? If you want to run one VI and then start running another while the first is running you can use the Run VI method with Wait Until Done set to F or you can use some synchronizing mechanism (for example, a global or something from the Advanced>>Synchronization palette) to make sure things happen in the proper order.
Another point is that in general it is very important to handle the errors properly. You should use the error clusters, if only for that.
08-09-2005 09:28 AM
There is no reason that LabVIEW cannot do what you want. Maybe you can solve your issues by combining the "TTL pulse AO" and "Gen TTL" into a single subVI and mesh the functional parts on a finer scale. Maybe the two tasks need to start in a defined order? Can the "TTL Pulse AO" run all the time? Start it at the beginning of the program in an independent code segement.
@snidjer wrote:
Okay, so if this is a sequencing structure, then I don't think my problem is fixed (I am not in the lab right now and can't physically check it).
I know that the subvi called TTL Pulse AO1 will run simultaneously with the Gen TTL subvis. It is supposed to. When the Gen TTL subvi runs, it needs a trigger pulse, which it gets from the TTL Pulse AO1 vi. The TTL Pulse AO1 sends out multiple pulses so that the Gen TTL is triggered regardless of exactly when the TTL Pulse AO1 program started.
08-09-2005 12:55 PM