Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

pause trigger strange behaviour

Hello,
 
I use ctr0 of my usb-6212 card to produce a pulse train that drives a motor. To stop the motor precisely I use pause trigger issued either by quadrature encoder, wired to ctr1, or proximity sensor, wired to a PFI.
Most of the time it works just fine. Sometimes though, the motor does not stop at destination but continues to drive. Moreover, it continues at maximum speed (=100% train's duty cycle), while it was approaching the destination at slow speed.
Oscilloscope shows that pulse train (ctr0out) freezes in static high state after the pause trigger during these "malfunctioning" cases.
When configuring ctr1 task, I indicate "low" as idle state in CO_pulse_freq.vi.
Is pause trigger supposed to pull the ctr0out to wharever idle state indicated? If not, and it is supposed to just "freeze" whatever state ctr0out is at the moment, is there any way to force it to be low, so the motor can be stopped?
 
Thank you for your time,
Igor
0 Kudos
Message 1 of 4
(3,189 Views)

Hi Igor,

The pause trigger will not reset the state of the line when the trigger occurs. More information about this can be found in the DAQmx Help file. I have extracted the portion which relates to this issue and copied it below.

Pause Trigger Considerations for E Series and M Series Devices
Continuous pulse-train generation: The pulse-train generation pauses as soon as the Pause Trigger is asserted, not at the end of a pulse. The pulse train resumes after the Pause Trigger is deasserted. A Pause Trigger elongates either the high or low pulse depending on which one was being generated at the time the Pause Trigger was asserted.

This explains why you are currently seeing the behavior of your system. One way to achieve what you want may be to stop the counter output task when the trigger arrives. This can be done by polling the digital line or using a DAQmx change detection event.

Regards,
Kent
Applications Engineer

 
0 Kudos
Message 2 of 4
(3,175 Views)

Hello, Kent

Thanks for reply.

I thought myself that change_detection, which if I get it right  is based on hardware interrupts, could be fast enough for me (and easy on PC resources). As opposite to polling, which I can use for slow monitoring purposes only.

Unfortunately,  change_detection never worked for me. I always get -200077 error (Measurements: Requested value is not a supported value for this property). Are you sure that my USB-6212 card supports this feature?

I use one of the port0 lines as an input for my proximity sensor switch (as well as change detection source line). My DAQmx is v8.5.

 

Regards,

Igor

0 Kudos
Message 3 of 4
(3,165 Views)

Hi Igor,

You are correct. The bus powered USB M-Series DAQ devices do not support change detection. Here is an article which lists the devices which support change detection. It seems that the easiest way to accomplish what you are trying to do will be to read the digital line to tell the counter when to stop.

Regards,
Kent
Applications Engineer

 
0 Kudos
Message 4 of 4
(3,151 Views)