10-20-2008 10:01 AM
I have a electric 6 position valve that operates using two contact closure; one to step to the next position and a second closure to more the valve to the home or first position. I have been using the compact fieldpoint relay to control the valve using a push button Boolean set to switch until released. The valve offers no feedback to the position it is currently in. I have to count to figure out what position the valve is in. I tried to convert the Boolean to an integer but when I release the button the integer goes back to zero. How can I count the number of times the button has been true and then reset the count using a second Boolean button?
Cheers
Danny
10-20-2008 12:53 PM
Danny,
Best way to keep track of something like that is with a shift register. I've attached a simple example. Depending on how your code is structured, it may be advantageous to implement the shift register in a 'Functional Global Variable'. http://decibel.ni.com/content/docs/DOC-2143
10-21-2008 02:04 PM
Centerbolt,
Thank you for the help. That should work great for my application.
Cheers