Discussion:
pause trigger strange behaviour
(too old to reply)
igor79
2008-06-23 23:10:08 UTC
Permalink
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
tnek
2008-06-24 19:40:12 UTC
Permalink
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 DevicesContinuous 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 <a href="http://zone.ni.com/devzone/cda/epd/p/id/317" target="_blank">DAQmx change detection event</a>. Regards,KentApplications Engineer
igor79
2008-06-25 20:40:13 UTC
Permalink
Hello, Kent
Thanks for reply.
I thought&nbsp;myself that&nbsp;change_detection, which if I get it right &nbsp;is based on hardware interrupts,&nbsp;could be fast enough for me (and easy on PC resources).&nbsp;As opposite to polling, which I can use&nbsp;for slow monitoring purposes only.
Unfortunately,&nbsp; 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&nbsp;use&nbsp;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.
&nbsp;
Regards,
Igor
tnek
2008-06-26 15:40:10 UTC
Permalink
Hi Igor, You are correct. The bus powered USB M-Series DAQ devices do not support change detection. <a href="http://digital.ni.com/public.nsf/allkb/8914FA5E30971E0C86256FEF005760FF?OpenDocument" target="_blank">Here</a> 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,KentApplications Engineer
Loading...