Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How to program encoder readings, using 7344

Hi

I would like to do encoder readings on my motors.  I have a 7344 and LabVIEW.
I though 'Read Encoder Position.vi' is the one that I need to use.  But I could not find any samples with the vi, and could not understand how to use this VI and read encoder values.

Has anyone performed motor encoder reading on LabVIEW continuously?
Which VIs should I use?  Is there any sample?
Can I use external clock and read encoder values at the rate of the sample clock?

 

Thanks in advance,

 

Merry

0 Kudos
Message 1 of 4
(3,585 Views)

Merry,

 

'Read Encoder Position' is the correct function to use and there shouldn't be anything special about it, except the fact, that you need to enable the encoder beforehand. Hardware timed readings can be accomplished with the High Speed Capturing (HSC) feature (see examples). Please note, that on the 7344 HSC requires a software re-enable of the HSC circuitry after each occurrence of the external hardware trigger, limiting the effective sampling rate to a value in the region of 200 Hz (depending on the performance of your PC).

 

If you require faster position sampling rates, you should use an additional DAQ board, like an NI 6220, in an adjacent slot and route the encoder signals to the RTSI bus (PC) or PXI trigger lines (PXI-system).The DAQ board can use these lines to acquire clocked position data with rates of 10 kHz and above.

 

I hope that helps,

Jochen Klier

National Instruments

0 Kudos
Message 2 of 4
(3,583 Views)

Jochen,
Thank you very much for your prompt reply.
I have two encoder inputs (use of 7344) and also I would like to read analog inputs at the same rate, using a 6052(DAQmx).
If I can do Hardware timed readings on 7344, I am thinking that using RTSI, I root the clock pulse to DAQ and acquire AIs.  In this way, the two devices are synchronized.  Am I right?  Is this possible?

However, like you said and this; http://digital.ni.com/public.nsf/allkb/2E15DB7C1B37163486256DC60049BCAF
if I can have the rate to be 200Hz or so, it is slow.

I looked at the example; http://zone.ni.com/devzone/cda/epd/p/id/3863
But I could not tell where the clock source and rate are specified.

Any ideas would be appreciated.

 

Merry

0 Kudos
Message 3 of 4
(3,579 Views)

Merry,

 

for HSC an external clock signal needs to be connected to the trigger inputs of the 7344. You could generate this clock signal with with your 6052 (counter or scan clock signal of hardware timed AI operation). Still this won't help you to exceed the acquisition rate limitations of the 7344 and you will stíll end up with a rate of 100 to 200 Hz. If this is not enough, you should consider other options:

  1. Exchange the 7344 with a 7354. The 7350 series provides hardware timed HSC rates of up to 2 kHz
  2. If option 1 is not possible, things get a bit more complicated. Unfortunatel ythe 6052 is an E-Series board, that doesn't provide good connectivity for quadrature encoders. With an M-Series board (6220 and above), you could either connect the encoder signals directly to the connector of the board or route them via RTSI from the 7344.

Regards,

Jochen

Message 4 of 4
(3,561 Views)