FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Bugs: TimeOff vi

 

I found a bug in the Labview TimeOff VI.

 

If the input is only on for one scan, the output comes on but it never goes off regardless of the time input.

If the input is on for more than one scan, the output comes on and it goes off  xx ms after the input goes off as it should. 

 

I suspect that the TimeOn function has a similar bug. 

 

Our team has worked around this by writing our own TimeOff Vi. 

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

Can you share the code you're using that exhibits the bug?

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

 

I'm using the Timer Off Delay function block described here:

http://zone.ni.com/reference/en-XX/help/370622M-01/lvfbhelp/timeroffdelay_fb/

 

For the "preset time", create a constant with any time say 1 second

For the "input", create a one shot of a boolean that is on for one scan and then off. 

Create an indicator for the output. 

Put this in a while loop that runs at say 0.1 s4

 

Then test by firing the one shot.

 

I had this in a complex bit of code and then I created a stand alone vi with just the input and an output indicator as described above and the problem still existed. 

 

That's all that's required to generate the problem. The output will come on when the one shot goes true but it never goes off until another pulse is generated on the input. 

 

I'm away from our development PC with labview on it for a few days so I can't cut a picture of the code or upload the test vi.

 

 

 

 

 

 

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

Do you mean it goes high and never goes low again?  Or, do you mean it doesn't stop making a pulse train?

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

It just never goes off. 

 

When another pulse is provided to it's input, it completes the sequences and turns off after the time delay. 

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