Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Deterministic updating of retriggerable pulses, part 2.

Re: Question posted by Vern on 6/27/01 on ?Deterministic updating of retriggerable pulses?.
I?m using LABVIEW in a very similar application to Vern, namely fuel injection control of an engine. I've managed to combine the Pulse Width Modulation VI and Retriggerable Pulse Generation VI, such that a pulse is generated on each occurrence of a pulse at the counter?s gate (which comes from an encoder on the engine). However, the VI executes only once, and the gives ?Error ?10609 occurred at Counter Control?, which is called a ?transferInProgError?. The only way to change the pulse width is to restart the VI, which runs once and then gives the same error. I am using a PCI-6071E DAQ board. Why is this happening?
0 Kudos
Message 1 of 3
(3,265 Views)
Start off with just using the retriggerable pulse generation example as it is in the LabVIEW >> Examples >> Daq >> Counter >> Daq-stc directory. When that works fine each time you apply an edge to the counter gate, then add in the pulse width modulation idea of using the pulse spec VIs and switch cycle operation, using an appropriate timer for the while loop, so that you don't accidentally try to switch cycle while a pulse is in progress.

Regards,
Geneva L.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 3
(3,265 Views)
That is precisely what I tried, prior to posting my question here. I still get the "10609 transfer in progress error".

For testing of the VIs, I am using an electric motor to drive my encoder, whose pulses are routed to the gate pin of a counter. The pulses come every 24msec, and I've set my phase 1 to 1msec (delay), and my phase 2 to be 5msec (pulse). I've modified the sub-vi "calculate pulse specs" found in the PWM vi to accept phase 1 and 2 time duration directly, rather than frequency and duty-cycle inputs.

As you can see, the pulse generation (6msec total) should be finished by the time the new gate pulse arrives. Therefore, switching cycles while a pulse is in progress should not be a problem.
The oscilloscope shows a 5msec h
igh pulse, followed by a 19msec low pulse. The low pulse becomes longer if the motor speed is decreased slightly, proving that the operation is gated. The VI runs once, and as long as the motor is driving the encoder, the pulses appear. However, their duration cannot be changed without re-starting the vi.

I'm attaching the relevant VIs for reference.

Thank you for your help Geneva.
Regards,

John
Download All
0 Kudos
Message 3 of 3
(3,265 Views)