LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

encoder position WITHOUT counter input

Question:

 

I have three incremental encoders connected to my M-Series DAQ board (PCI-6229) that has TWO Counter input channels.  I am measuring the position of each encoder.  How do I measure the position of the third encoder if I have used-up both counter inputs?  Is there a manual way to accomplish this using my older version of Labview (version 7 express)?  Any help is appreciated.

 

-Clarkam1 

0 Kudos
Message 1 of 8
(3,159 Views)

clarkam1 wrote:

Question:

 

I have three incremental encoders connected to my M-Series DAQ board (PCI-6229) that has TWO Counter input channels.  I am measuring the position of each encoder.  How do I measure the position of the third encoder if I have used-up both counter inputs?  Is there a manual way to accomplish this using my older version of Labview (version 7 express)?  Any help is appreciated.

 

-Clarkam1 


 

I wrote code to monitor DI lines using analog years ago... and it is not trivial and depending on your signals and the hardware limitaions, may not even be possible. So my first reply to this question is, why not just get another deveice with more counters?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(3,152 Views)
Ben,
 
I'm on an extremely small budget and can only use the items available to me at present time.  That being said, is there no way to use one counter for multiple encoders?  Or could an external device be used to count which the DAQ board would read?  I appreciate your timely responses.  I'm trying to explore all other options.
0 Kudos
Message 3 of 8
(3,133 Views)
Are all three encoders running at the same time?  If not, you could use a digital output to drive a cheap relay that would determine which encoder is routed to the counter input.  Not too elegant, but easy to do and cheap.
Message Edited by nathand on 03-15-2010 04:15 PM
0 Kudos
Message 4 of 8
(3,125 Views)

All three encoders are running and need to be computed simultaneously.  Here's a thought: since the max output frequency for each encoder is 200kHz (which is 100 times slower than the 80MHz counters) could the counter handle all three encoder inputs at the same time?  The output of the counter would then need to be divided into groups.

0 Kudos
Message 5 of 8
(3,117 Views)

clarkam1 wrote:
Ben,
I'm on an extremely small budget and can only use the items available to me at present time.  That being said, is there no way to use one counter for multiple encoders?  Or could an external device be used to count which the DAQ board would read?  I appreciate your timely responses.  I'm trying to explore all other options.

So do you work for free?

 

If you are determined to get all three counters going with that device, you have a big challenge ahead of you. I'll try to explain. At teh input of your counters you have signal conditioning that feeds the counter itself. To do the same thing using analog input channels (since all of the counters are already used) you will have to develop code that simulates the signal conditioning, converts the analog to digital (this may sound easy but if you need to implement over-sampling its not) and then do the work of the counter, again in software.

 

If my customer was forcing this on me I would first review the behavour of the hardware and use it to establish the requirements of my code. So if you do not have an EE background, you will first have to learn the hardware so you can write software that does the same thing.

 

So if you work for free then you may want to chase down the examples that NI ships for their FPGA targets that implement serial protocols and the like. You may be able to harvest some code and examples from there. If you don't work for free, then you really have to decide if you want to re-invent in software what you can purchase.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 8
(3,079 Views)

hey,

i really work for free as a project student and they are not ready to give me extra hardware so please if you have got any vi or method which get the position of encoder without counter input it will be really helpfull .

 

Thank you 

0 Kudos
Message 7 of 8
(2,807 Views)

Wire up the 3rd encoder to a couple lines of digital port 0.  Set up a buffered DI task.  Then the fun starts.

 

You'll (probably) have to constantly service the DI task and send it through some processing to perform a software quadrature

decode.  You *must* get every digital transition for the quad decode to be valid.  You can either do a change-detection based

task or else do oversampling.   If change-detection based, you'll have to solve the puzzle of time-correlating your buffered DI

task to your (presumably) buffered encoder tasks.

 

If you use a constant sampling clock, you'll need to oversample and share the clock among all 3 tasks to keep time correlation.

That clock must come from either an analog task or some external source.  Oversampling means you'll have a very high data

rate to manage and you'll need to learn how to program quite efficiently.

 

If you're fairly new to this, you can expect to be tied up for weeks.  It's definitely a case of "penny wise, pound foolish" to ask

you to do this job without the full set of needed tools.  Like asking you to dig a canal with a spoon.

 

-Kevin P

 

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 8 of 8
(2,799 Views)