Ferdinan Posted May 12 Report Posted May 12 i have my counter error in cx programmer. i have set my value in reversible counter (C0000) at #1, when the set value has become 1, the NO / NC contact C0000 didn't go on. please, how should i do
chelton Posted May 12 Report Posted May 12 What is the error? It would be helpful for you to look at the instruction help. Select the CNTR instruction right click then select instruction help.
Sergei Troizky Posted May 12 Report Posted May 12 The counter contact activates if the present value become equal to the set value as a result of counting. It will not activate if either value was forcibly set to match another one.
chelton Posted May 12 Report Posted May 12 38 minutes ago, Sergei Troizky said: The counter contact activates if the present value become equal to the set value as a result of counting. It will not activate if either value was forcibly set to match another one. As per my previous attachment for the CNTR instruction, the completion flag will be turned on when the PV is incremented from the SV back to 0 and will turn off again when the PV is incremented from 0 to 1.
Ferdinan Posted May 13 Author Report Posted May 13 16 hours ago, chelton said: As per my previous attachment for the CNTR instruction, the completion flag will be turned on when the PV is incremented from the SV back to 0 and will turn off again when the PV is incremented from 0 to 1. i dont understand, so when the pv = sv, the contact will not go on (as my programs) until it crossed the sv?. i just want to when counter pv = sv, the contact will on. then when pv < sv, the contact off. what should i do?. is this the nature things of the cx programmer?
IO_Rack Posted May 19 Report Posted May 19 If that is the operation you desire, then use a compare instruction. If your SV is going to be #0001, then you should consider using the SET / RSET instructions.
chelton Posted May 19 Report Posted May 19 I'm one that never uses counter instructions. I much prefer to increment/decrement a register (@++ / @--) and use comparison instructions where required.
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