Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

use 7332 DIO to trigger individual encoder read

I have 7332 motion card used to control a stepper motor. A lever is attached to the stepper shaft and used to close 30 individual switches. I have attached an incremental encoder to and display when each individual contact are closed. I am using the motion card digital I/O line to continuously read its digital I/O and capture the encoder value. The problem is if I run stepper fast I can’t capture the same encoder values for each run. What can I do so I can capture the encoder values for individual switches with high accuracy?

 

My encoder rotate from 0 to 90degrees and back to 0 degree. The run should last less than 2 seconds.

 

I am investigating DAQ card with edge trigger capability. I would like to know which one to use so I can capture 30 individual encoder values.

0 Kudos
Message 1 of 3
(3,378 Views)

Depending on your accuracy requirements and other circumstances there are several approaches to tackle this application. Here are some ideas

  1. If you were using a 7352 instead of a 7332 you could use the buffered high speed capturing feature that allows you to latch position data into the onboard memory whenever a trigger signal occurrs. This method would require an external signal conditioning to OR all the signals of your switches to generate a single trigger signal.
    There are some potential drawbacks and limitations for this method:
    • external circuitry needs to be designed
    • works only fine if there is no overlap of the high-levels of the signals.
    • only the position of the rising edge is acquired (might be compensated by a second run that acquires the positions of the falling edges)
  2. You could use multiple counter/timer boards (e. g. PCI-6602) to run multiple (30) position measurements. Depending on your requirements (do you need to acquire only the rising edge or do you need the pulse length, too?) the board provides several operating modes to meet your needs. This would be the most accurate option with accuracy in the lower nanosecond range. Easy cabling can be accomplished by routing the encoder signal to all boards and counters through the internal RTSI connector.
    Potential drawbacks:
    • At least 4 boards with 8 counters are required
    • Only three counters on each board can transfer their data through DMA, the others will need to use IRQ transfer (higher CPU load). As the data rate is quite low, this shouldn't be a real issue.

  3. Use a multifunction DAQ board like the PCI-6254. This board provides 32 clocked digital I/Os (10 MHz), 2 counters and 32 analog inputs. Connect your switches to the digital lines and generate a clock signal with one counter. This clock signal is used to latch the digital data and position data that is acquired with the second counter. As a result you get two data arrays that contain switch signal states over time and position data over time which can be correlated. With this method you will be able to get an accuracy in the higher nanoseconds / lower microseconds range (depending on your clock speed).
    Potential drawbacks:
    • This method is slightly less accurate than method 2.)


I think optin 3.) should be the best compromise between accuracy and system complexity/cost. In the end it depends on your requirments which option is the best fit for you. Please note, that depending on your voltage levels signal conditioning might be necessary.

Kind regards,

Jochen Klier
National Instruments

 
0 Kudos
Message 2 of 3
(3,366 Views)

Thank you, Jochen. Option 3 seems plausible.

0 Kudos
Message 3 of 3
(3,355 Views)