From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

I have an incremental encoder with three outputs(A,B,Z) and I would like to begin the scanning with the reference signal(Z) and I would like to take one scan (analog signal) sincronized with the impulses of channel A or B. I´m using an Lab-Pc-1200.

I have an incremental encoder with three outputs(A,B,Z) and I would like to begin the scanning with the reference signal(Z) and I would like to take one scan (analog signal) sincronized with the impulses of channel A or B. I´m using an Lab-Pc-1200.

The idea is to relate every sample (analog signal) with one pulse of the channel A or B.

Thank you for your answers.
0 Kudos
Message 1 of 5
(2,675 Views)
It sounds like you want to collect analog samples that are equally spaced according to the angular position of some moving thingamabob, and not necessarily equally spaced in time. Right?

I don't think you can program your board to initiate sampling on both the rising and the falling edges of both the A & B channels of the encoder. You probably can sample on 1 edge of 1 signal though. You'll still get data equally spaced by angular position, but you'll only have 1/4 the position resolution.

Use either the A or B channel as an external scan clock, and the Z channel as a digital start trigger.

Since you're using an older ISA board, you must also have an older version of NI-DAQ. I suspect, but can't verify, that there are e
xamples to show how to configure an analog acquisition with digital triggering and/or an external scan clock. Hopefully, that can get you started.

-Kevin P.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 5
(2,675 Views)
Thanks for your answer.

I have found one example whwre you can use an exterenal scan clock and the digital start trigger.

Before, I had thinked to use the counter clock to mesure every encoder position, but then I wanted acquire one sample (analog channel) for every counter increment but I had problems with the sample rate and the iteretion of while loop.

Do you think the best option is the first (external scan clock...) or there are any possibility to use the second option.

Thank you.
0 Kudos
Message 3 of 5
(2,675 Views)
Hello Nacho,

if the external clock approach satisfies your needs, it's surely the best option.

I'm not sure I understand exactly why you want/need to use the counter, is it for knowing the encoder's position?
In that case, it would be fine (at least in E-series boards) to route the encoder's output to BOTH external clock AND a counter and have 2 tasks running in parallel (externally clocked AI + counter input). What's definitely not very efficient is to have just the encoder wired to the counter and via software check for an update to initiate a sampling operation on the analog channel/s.

Regards,

Jorge M.
0 Kudos
Message 4 of 5
(2,675 Views)
Hello

Yes is for knowing the encoder position, but at the same time I have to read from analog imput, one sample for one increment of encoder. I can do it using channel A as a scan clock but then I can't take the frecuency becouse I don't konw the scan rate (is an external signal)

How can I konw the frequency of the scan clock?
0 Kudos
Message 5 of 5
(2,675 Views)