02-24-2010 06:35 PM - edited 02-24-2010 06:40 PM
Hello,
The example code uses two counters for taking measurements of one encoder. If a second encoder has been added, my suggestion would be to implement measuring the position and velocity using one counter; then implement changes to integrate the second counter/encoder. Please refer to the example included in my first post or select the first link below for directions on how to accomplish this. For the purposes of making the forum topics searchable for our customers, please create a new forum post for new questions/issues.
1. Measure Position and Velocity of Angular Encoder Using One Counter:
http://digital.ni.com/public.nsf/allkb/9844C0526ECF4152862576660079ADBB?OpenDocument
2. NI-DAQmx: Using the BNC-2120 to Measure an Angular Quadrature Encoder:
http://sine.ni.com/devzone/cda/epd/p/id/4999
3. Quadranture Encoder Measurements: How To Guide:
http://zone.ni.com/devzone/cda/tut/p/id/7109#toc1
Regards,
Ali M
Applications Engineer
National Instruments
02-24-2010 06:35 PM - edited 02-24-2010 06:36 PM
02-27-2010 11:16 PM
hi,
i have some more doubts.. regarding the vi u gave previously for getting the speed from the encoder...
if i want to access every sampled value of the speed , do i get it only when i connect the wires to the speed vaue inside the while loop or take the speed data to the outside of the while loop?
why is it that when i am taking the speed data from inside the while loop and performing calculations on it ? that i get wrong values for the speed readings itself??
is it due to the fact that when i doit so ,
1.the entire while loop is being slowed down
2. or that the clear daq task is not occuring hence wrong speed data is got?
3.what can i do to access the speed values continuously and perform calculations using it , while the vi is reading the accurate speed data ??
regards
fesmi.
03-01-2010 06:46 PM - edited 03-01-2010 06:53 PM
Hello Fesmi,
The speed data readings are acquired inside the while loop. If you have the set up outside the While Loop, the data will only update after stopping the program. I have tested the example VI and it works correctly on this end. Since it was intended to get you started, I would highly recommend reviewing additional examples on encoder measurements which can be found by exploring the following resources: LabVIEW»Help»Find Examples»Select the search tab and search "encoder." More examples are included at www.ni.com/community (use the "Search Within Community" for related keywords: e.g. angular velocity, encoder.
Thank you
Regards,
Ali M
Applications Engineer
National Instruments