Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading motor amplifier encoder signal

Hello,

 

I have a Copley Xenus XSL amplifier, which is hooked up to their linear actuator.  I'd like to read the encoder signal, which is available from the amp., directly with Labview with my BNC-2120 and an M-series card.  Thanks.

 

m

0 Kudos
Message 1 of 6
(4,050 Views)
Take a look at this.  You should be able to piggyback the signals.
0 Kudos
Message 2 of 6
(4,045 Views)
Sorry.  You won't need to piggyback the signals, since your amp has them as outputs.
0 Kudos
Message 3 of 6
(4,043 Views)

I have a simple vi, which reads regular encoders, but when I connect the amp's A and B signals to it, the readout "drifts".  It just keeps rising at different rates.  The vi doesn't have an acquisition rate specified anywhere...

 

m

0 Kudos
Message 4 of 6
(4,034 Views)

Hey Maciekdp,

What exactly do you mean by saying that your readout "drifts?" Now I'm not sure how your simple vi works but the most common method of reading in encoder pulses is by using the counter inputs of your M-Series DAQ device.  If you are using your counter inputs then I would recommend running one of the provided examples first just to start with a clean slate. If you open up the NI Example Finder, you can find "Measure Angular Position.vi" under Hardware Input and Output>>DAQmx>>Counter Measurements>>Position. Although this is configured to find angular position, you can easily change this by selecting CI Linear Encoder and all of the other settings will be the same except the Pulses per Revolution input will now be "Distance per Pulse."

 

If you are using both of your counter inputs then you can certainly use Brian's link to that DevZone example to perform a similar task. 

 

Also, one quick clarification regarding your acquisition rates.  If you are using counter inputs then there actually isn't a need to set an aquisition rate. Your counter is actually registering your pulses in hardware with an 80 MHz timebase. The only timing that is involved in the position example is a 100 msec wait that is inside the while loop. This wait time determines how often you are polling the current counter value. Thus, even though you are only sampling the current counter value every 100 msec (10Hz), the counter is actually counting in hardware for you at a much faster rat. 

 

Please let me know if you have any questions!

 

Lars

0 Kudos
Message 5 of 6
(4,009 Views)

In order to read direction, I need to use two counters.  How does one configure two counters in labview?  Can they both be under the same task?

 

m

0 Kudos
Message 6 of 6
(3,763 Views)