Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Is It Possible To Use NI cFP-CTR-502 as Quad Encoder?

Instead of going the route of using a Quad Encoder (which requires additional cost and work to install for a project), I was wondering whether is it possible to configure the cFP-CTR-502 to count directionally using a Digital Input for direction and a prox-switch?

 

If I used the DI as a Gate to count the prox-switch on two separate counters, then read the count when the Gate was TRUE and FALSE respectively, then did a subtraction of these two counts - couldn't I get the overall count in a particular direction?

 

Is there anything wrong with the above?

If not, I am pretty sure I can do something like this in software but was wondering if the cFP Module could be configured somehow to do it?

 

Cheers

 

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 1 of 3
(5,951 Views)

Hi jgcode,

 

I think what you're suggesting could work. If digital input TRUE indicates movement to the left, and digital FALSE is movement to the right, then subtracting the two counts would work (this is what a quad encoder does, after all). The catch is that you cannot count edges when the gate is false, so the digital state can't be directly linked to a single counter gate. You would need to use two digital outputs and two counters on the CTR-502 to get around this. Writing TRUE to the gate of counter 1 could be one direction, and TRUE to the gate of counter 2 could be the other. Then you'd just subtract the two counts in software to find your position.

 

Hope this helps!

Andy H.
National Instruments
Message 2 of 3
(5,919 Views)

 


@Andy H NI wrote:

Hi jgcode,

 

I think what you're suggesting could work. If digital input TRUE indicates movement to the left, and digital FALSE is movement to the right, then subtracting the two counts would work (this is what a quad encoder does, after all). The catch is that you cannot count edges when the gate is false, so the digital state can't be directly linked to a single counter gate. You would need to use two digital outputs and two counters on the CTR-502 to get around this. Writing TRUE to the gate of counter 1 could be one direction, and TRUE to the gate of counter 2 could be the other. Then you'd just subtract the two counts in software to find your position.

 

Hope this helps!


 

Thanks for your reply Andy. I am glad you think the concept will work.

 

On further brainstorming of the idea, we discovered the same as above (cannot gate counter on FALSE) so am thinking we can have a non-gated count and a gated count and just do some maths to get around it.

 

Or we can do as you suggested.

 

Cheers!

 

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 3 of 3
(5,910 Views)