LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing quadrature encoder data with analog input

I need to synchronize data acquisiton from a quadrature encoder and three analog input channels. I believe that the basic solution is to set up the counter acquistion as a buffered acq. and then use the Route Signal Vi to set the gate of the counter to the AI Scan Start. Assuming that I am headed down the right path, I am having difficulty implementing this type of solution. Does anyone have any suggestions, examples, or resources that would be of help. I have an AT-MIO-16E-1 card and am collecting analog data from accelerometers and load cells, scan rate needs to be in the neighborhood of 10kHz. Thanks for the help
0 Kudos
Message 1 of 5
(4,248 Views)
I would suggest to use the LabVIEW shipping example 'Count Buffered Edges (DAQ-STC) VI' and then be sure to wire the B output of your encoder to the up/down pin on your AT-MIO-16E-1. Your counter will always be counting, but the data(count) will be latched to memory when a gated signal is received. So you will need to have a signal to gate the buffered counter acquisition.

You could then use the gating signal of your counter as the scan clock for analog input. Take a look at the shipping example 'Cont Acq&Graph ExtScanClk VI' for an example of using an external clock for analog acquisition. I hope this helps.

Regards,
Todd D.
Message 2 of 5
(4,248 Views)

Hey

 

Even my issue sounds similar to the one given by ELD

 

In my case, i have to get or generate form of synchronized quadrature encoder signal from 2 independant functional generators with a phase shift of 90 deg. I dont know whether we can generate such signal without the encoder itself......just trying it out.

 

This is basically for Analog input channels, can we achieve the same signal from counter channels as well? As we have got couple of counter channels.

 

The example what you suggested like Cont Acq & Graph ExtScanClk VI, i couldn't find that VI in examples.

 

Any sugesstions in making this concept to work it out.

 

Thank you in advance

 

Regards

Kirit

 

0 Kudos
Message 3 of 5
(3,827 Views)

Hi Kirit,

 

The reason why you may be unable to see the example Cont Acq & Graph ExtScanClk VI is because this is a Traditional NI-DAQ (Legacy) example. To view this, you must have NI-DAQ installed and browse the Example Finder by directory. This example should be under daq » counter » daq-stc.llb.

 

I'm not sure if I understand exactly what you are trying to achieve, could you tell us what signal you are trying to acquire and what you are trying to generate? Could you also tell us what hardware you are using?

 

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 4 of 5
(3,805 Views)

Hey Hong,

 

My idea is to get the synchronized pulses with 2 counter inputs with 90 deg phase shift. This is usually achievable through angular encoder but here i use 2 signals(pulses or square wave form) from 2 functional generators with 90 deg phase shift. This is done, as i dont have the angular encoder.

The Hardware what i use is PCI-6624 with 8 counter inputs and PCI-6036E with 2 counter inputs. I am using Ni-DAQmx . Do you think this can be done better in Traditional NI-DAQ.

I have a query like, whether these type of signals with phase shift can be achieved without utilizing any of the Analog inputs?If yes, then how they are synchronized.

Does these ideas or explanation make sense?

 

Thank you

 

Regards

Kirit

0 Kudos
Message 5 of 5
(3,782 Views)