bbean Posted April 24, 2007 Report Share Posted April 24, 2007 I have a USB6211 DAQ device I'm using to control a strobe and a stepper motor. The strobe is controlled by ctr 0 (a high pulse fires the strobe). ctr 0 is also jumpered to P0.0 (a digital input) to trigger acquisition of some analog signals. The stepper is controlled by ctr1 and Digital Input P0.1 is used to find a zero position on the stepper index (high is zero). http://forums.lavag.org/index.php?act=attach&type=post&id=5611 Everything seems to work fine most of the time, but sometimes the USB6211 gets in a weird state where every time the stepper zero input (P0.1) goes high or the ctr1 task for stepping starts, the strobe (ctr 0) fires. This undesirable behavior seems to happen after the user hits the stop/abort button and then restarts the program. Its almost as if there's crosstalk between the P0.1 and P0.0 inputs that gets fed back to the CTR0 output via the jumper. If I send a reset device command via max this behavior stops. Does anyone know what might be happening? Do I need an additional pulldown resistor on the ctr0 output to hold it low? Thanks, Brian Quote Link to comment
bbean Posted May 3, 2007 Author Report Share Posted May 3, 2007 Found the problem. Turns out even though the USB-6211 has 2 ctr outputs (Ctr0 and Ctr1), you can only use one at a time if you are doing a finite pulse generatation. If you set up one ctr as finite pulse generation it uses the other ctr output for a gate. So in my case, when I moved the stepper motor using ctr1, it sent ctr 0 (gate) high (causing unwanted strobe). As a work around I moved the strobe to an analog output and used square wave generation to fire the pulses. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.