From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse Train does not seem to run for the proper amount of time

I was hoping someone could assist with a pulse train I am trying to code.

I need to be able to trigger a relay to stay on for 500ms and stay off for 600000ms

 

My duty cycle for this is 500/600500, or .0008

 

That is all fine and well, but how do I actually have this work correctly?

My code is attached. What am I missing?

Attached is image of the code and also the VI

 

pulse_train.PNG

0 Kudos
Message 1 of 5
(2,237 Views)

you have no loop to let this code run, you start it then almost immediatly stop it.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 5
(2,232 Views)

Right, yes, that's missing, but how do I ensure that it runs for the exact time I need it to? That is what I am not sure about.

 

How do i tie in the time component to this?

0 Kudos
Message 3 of 5
(2,229 Views)

I do not understand how I'm supposed to have the pulse stay high for the allotted amount of time and then stay off..

0 Kudos
Message 4 of 5
(2,226 Views)

Hi Belopsky,

 

You have already calculated your duty cycle, which is great. Next, you need to set your frequency, which is the inverse of time. Since the total pulse width (total time) is 600500 ms, or 600.5 s, your frequency is 1/600.5 which is approx 0.0017 Hz.  Since it doesn't divide evenly, it won't be exact, but it should be within tolerance if your low time is 10 minutes. Don't forget the loop too!

0 Kudos
Message 5 of 5
(2,175 Views)