03-17-2011 04:30 AM
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
Solved! Go to Solution.
03-17-2011 05:33 AM
03-17-2011 05:39 AM
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
03-17-2011 06:09 AM
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.
03-17-2011 10:16 AM
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.
03-17-2011 10:09 PM
Kudos to Dennis,
By the how did i missed it?