LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx write (digital) works in "highlight execution" mode, not in normal mode

Solved!
Go to solution

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,

0 Kudos
Message 1 of 3
(2,504 Views)
Solution
Accepted by topic author Blokk

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.

0 Kudos
Message 2 of 3
(2,500 Views)

oh, amateur error from me ! 🙂

I understand now,

Thanks very much!

0 Kudos
Message 3 of 3
(2,498 Views)