TPE Posted September 20, 2011 Report Share Posted September 20, 2011 Hi All, I have configured input I0 as a high speed counter but the Operand it is connected to counts up. Is it possible to configure the operand to count down ? Thanks in advance Aaron Link to comment Share on other sites More sharing options...
Walkerok Posted September 20, 2011 Report Share Posted September 20, 2011 High speed couters in my history count up. Im not sure what the end goal is, but if you need to for example show a decreasing value down to zero you can take the total value and subtract, then show this value on screen. For example when I have written programs for wire cutting machines in the past I can chose to either count up as the encoder spins till I meet the customers length then make a cut, or I can count down from the wanted length to zero then make the cut. After the cut I reset to either zero or the maximum value and do it all over again. If the goal is to know if something is spinning forwards or backwards (and how far it went) then you will need a quadrature encoder that will allow you know what direction you are turning and you will add in one direction and subtract in the other. In any case make sure you do not compare a high speed input value using an equals function block you should always use a greater than or equals or a less than or equals. Thanks Keith Link to comment Share on other sites More sharing options...
TPE Posted September 21, 2011 Author Report Share Posted September 21, 2011 Thanks very much Keith. I'll do as you suggest and count from zero up to the desired count and calculate the displayed value. Aaron Link to comment Share on other sites More sharing options...
Emil Posted September 21, 2011 Report Share Posted September 21, 2011 What about multiplying the counter value by -1, keep the result in another register - MI or ML and display it? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now