11-23-2008 09:37 PM
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
11-24-2008 05:37 AM
11-24-2008 05:40 AM
11-24-2008 08:28 AM
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
11-24-2008 04:18 PM
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
01-21-2009 08:05 PM
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