LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx write does not "track" input

Solved!
Go to solution

I am stuck with a probably simple problem, but I cannot solve it despite a lot a searching.

 

I need a digital output that "tracks" the state of a signal (here, for test purpouses: a button on the front panel).

 

I configured a "DAQmx write" VI (Digital Bool 1 Line 1 Point) connected to a "Digital output" task where I chose "On Demand" (I also tried to chose "continuous" but get an error message in MAX). However, the output is only updated once (at the end of the run). I then packed the thing into a loop, but the result is the same (the output is only updated when the VI terminates).

 

I thought the logic in LabView was that a "block" is executed when the input conditions would change, but this seems not to be the case.

 

Thanks for your help

 

Pascal

 

 

 

 

 

 

 

0 Kudos
Message 1 of 6
(2,691 Views)
PASNI,
Regards
Guru (CLA)
0 Kudos
Message 2 of 6
(2,684 Views)

Pasni,

 

Did to try exploring the examples that shipped along with LabVIEW? If not try them as they give you a fair idea on how to code in LabVIEW...

 

As is see the top loop is running contineouly writing a TRUE OR A FALSE value based on the boolean. I suggest you to check the DO channel manually by using a multimeter for proper wiring. You can also see the status of the DO by connecting it back to DI and verifying programatically (if the hardware supports the same)

 

Also the top loop will never stop since the "Loop condition" will be always a False.... try wiring a local variable to stop the top loop when the bottom loop finishes the execution

Regards
Guru (CLA)
0 Kudos
Message 3 of 6
(2,683 Views)

Yes, I did look at the examples. However, they do not correspond to the case here.

 

The digital output is wired to the analog input, so that I can check see the state of the output.The analog input works.

 

However, the state of the output is only updated once during each run.

 

0 Kudos
Message 4 of 6
(2,678 Views)
Solution
Accepted by topic author pasni

The top loop is not running at all because you've wired the bottom's stop button to it. Basic dataflow issue. It will not start until the bottom loop finishes and then immediately stop because the bottom loop will pass a True to the termination terminal. I would suggest you start with the LabVIEW 101 tutorial.

Message 5 of 6
(2,657 Views)

Kudos to Dennis,

 

By the how did i missed it?

Regards
Guru (CLA)
0 Kudos
Message 6 of 6
(2,643 Views)