08-22-2014 07:29 AM
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
08-22-2014 07:51 AM
you have no loop to let this code run, you start it then almost immediatly stop it.
08-22-2014 07:56 AM
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?
08-22-2014 08:02 AM
I do not understand how I'm supposed to have the pulse stay high for the allotted amount of time and then stay off..
08-25-2014 11:31 AM
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!