LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to decrease counter ?

Hi, and sorry for a newbie question written in bad English...

how can i control the count direction (up/down)of a counter by a DIO?
In my appliance a counter counts the low-high edges of a step frequency signal. (stepper: escap, DAQ: 6024E)
So when DIO is high (rotation direction right) the counter counts upwards, and when low (direction left) it counts downwards.

How to do it?
Thanks
Dietmar
0 Kudos
Message 1 of 4
(2,847 Views)
There should be several ways you can do it. My suggestion is you can use the while loop with shift register. If you want to count up, increase your value by using increments method and if you want to count down, decrease your value by using decrements method. I think you get what I mean. If my suggestion is not suitable for you I am sorry.
Saw Naing Aye..
0 Kudos
Message 2 of 4
(2,847 Views)
Dietmar,


Assuming you want to setup the encoder all in HW,
For CTR0, connect UP/DN to DIO6.
For CTR1, connect UP/DN to DIO7.

You can also reference this very detailed application note on using encoders with DAQ STC(the digital chip on our E-Series boards)

http://zone.ni.com/devzone/conceptd.nsf/webmain/6F25CBA2CD73417786256869005E5FC3?opendocument&node=DZ52326_US

This should do it for you.

Kevin R
0 Kudos
Message 3 of 4
(2,847 Views)
Thank you, that's exactly what i need.

D.
0 Kudos
Message 4 of 4
(2,847 Views)