03-28-2011 08:50 AM
Hi!
I would like to create a simple vi (it will function as a watchdog subvi in a project) to send TTL 5V for 3 seconds, 0V for 3 seconds, iterating in a loop.
I use a PCI 6703 card for this purpose (beside this I use it for analog static waveform generation on several channels). I also have a USB6212 DAQ card, and I test my digital output with an digital input of this USB card via MAX.
The strange is that, when I execute my code in "highlight execution" mode, I get what I want: 3 seconds 5V, 3 seconds 0V, iterating.
When I try to run it in "normal mode", I only see the 5V constantly from the output through my digital input in MAX.
I know I do something wrong, but no idea, what...
Please find attached the simple vi.
Thanks in advance!
Regards,
Solved! Go to Solution.
03-28-2011 09:00 AM
Your overall loop time is 3 seconds (3000 msec wait). You have a 3 second delay between writing the true and writing the false. But as soon as the false is written, the loop immediately reiterates (the overall 3 second wait operates in parallel to the Write-Delay-Write sequence) so the True gets written immediately after the False. It will be just a blip. While if you run in highlight execution, the code runs slowly enough that you see the False boolean while LabVIEW takes its time drawing the data flowing down the wires.
Put a Delay function after your DAQmx write false, as well.
03-28-2011 09:03 AM
oh, amateur error from me ! 🙂
I understand now,
Thanks very much!