Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

M Series Digital Input Trigger

I am using a USB-6251, trying to read a digital input line.  I have an encoder on a spinning shaft, and want to read a prox switch at each pulse of the encoder.  I can achieve this much by creating a digital input reading with external timing pointing to my encoder pulse.  That's not a problem, and it works great.

 

However, I need my readings to start at the same position every time (1 PPR line on encoder).  I've read that you can't trigger a digital line on M series due to the lack of a dedicated clock for the digital lines or something, and I've looked at the examples of how to get around it, but I don't understand how to adapt them to my application.  Can anyone help out, show me how to do this?  I need to read a digital input line at every rising edge of a different digital input, starting at the rising edge of a third digital input.

 

Thanks.

Jeremy Backer
CLAD
0 Kudos
Message 1 of 2
(2,813 Views)
Jeremy, I use a 6259 to read a shaft encoder and acquire analog signals every encoder pulse (A-pulse).  I read one of the three encoder outputs (Z-pulse) as an analog input, and did a comparison of the analog voltage level compared to a trigger level to provide a Software Reset signal inside of a While loop.  When the Z-pulse went high (5v) I started storing AI reads in an array every A-pulse.  This method could be configured to count pulses and begin storing data X events after a trigger event.  This would all be done in software inside the While loop.  You can still read DIs inside the loop as well for triggering and/or for your prox probe switch.  If this sounds like something you want to pursuit, look at the attached example (which includes an option to trigger off of a digital signal as well).
0 Kudos
Message 2 of 2
(2,784 Views)