LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my plot timing off?

My VI is intended to generate two seperate square waves to drive a pair of solenoids. Everything works well except that the timing appears to be running at about 2/3 the pace expected. What am i doing wrong?

 

 

0 Kudos
Message 1 of 7
(3,071 Views)

Are you talking about the period or the On Time? I ran your VI, and on my computer, the period (set at 15) was fine. When you zoom in and look at the (very fast) On Time pulse, it will appear off due to the time it takes to reach full amplitude (about 1mS). So the peak of the pulse looks too short, and the valley looks too long.

 

 

Richard






0 Kudos
Message 2 of 7
(3,043 Views)

When I run the VI a period of 15 s takes more like 26s in real time. So everything appears to be ok except the that time scale in general is taking almost twice as long as it claims.

 

I'll try another machine and see if i have the same result.

0 Kudos
Message 3 of 7
(3,035 Views)
Tried to simplify the VI by generating DAQmx code. The plot timing is now off by even more.
Download All
0 Kudos
Message 4 of 7
(3,021 Views)
one of those should be B here it is
0 Kudos
Message 5 of 7
(3,018 Views)

Your DAQmx code does not make much sense to me. I don't know why you are using a Sample Clock with an Output task, I don't know why you are Starting the task repeatedly in the loop, etc. This code should throw multiple errors.

 

What does your graph look like when you run code that works?

Richard






0 Kudos
Message 6 of 7
(2,993 Views)
Ok corrected those... still experiencing the same problems...
0 Kudos
Message 7 of 7
(2,984 Views)