LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous digital pulse train with variable duty cycle

Solved!
Go to solution

I have a vi that is like the one shown here (figure 3): http://zone.ni.com/devzone/cda/tut/p/id/2991

The duty cycle updates when the value is changed on the front panel as it should. However, if I have another vi send this one a duty cycle it never updates. I have tried using a global variable instead of a local variable and it did not change. Your help is greatly appreciated

0 Kudos
Message 1 of 5
(3,107 Views)
Solution
Accepted by topic author theresmychippy
never mind, I figured it out
0 Kudos
Message 2 of 5
(3,096 Views)
Please post in your message what you did that answered your question.  That way if anyone searching for the same question finds yours, you'll be able to help them.  Just saying you figured it out isn't really a solution.
0 Kudos
Message 3 of 5
(3,081 Views)
Sorry, I've attached my new vi. I took out the while loop because it wasn't necessary if i run the second vi continuously. Now, every time the duty cycle changes on the second vi, it changes in the vi I attached.
0 Kudos
Message 4 of 5
(3,066 Views)

You should not be using the Run continuous button.  That is only there for debugging purposes.  If you want the code you attached to run more than one time, you should have a while loop around it and a Stop button attached to the loop's stop terminal.

 

But you don't want to continuously create and kill the task.  You should go through the examples in the example finder for DAQmx and see the various ways the DAQmx functions can be used to continuously update your task.

Message Edited by Ravens Fan on 04-02-2010 03:39 PM
0 Kudos
Message 5 of 5
(3,056 Views)