Posted 31 Mar 2022 Hello everbody i need a little bit of help with my counter. So basically i have a counter that shows numbers on a hmi screen and when the counter counts down from 10 000 to 1000 i need to create a function that make that my right numbers picks up the numbers from the middle counter and countinues to count down. any tips on how to program this in cs/cj Share this post Link to post Share on other sites
Posted 31 Mar 2022 A timer has 2 output elements to it. A BOOL that will turn ON when the value reaches 0 (zero). The other element is the current value. The compiler will choose which to use depending upon the instruction used. You will reference it the same (Tx). It's kind of like a hidden structure. Be mindful of the timer's Data Type. In this example I'm using a Binary (or Decimal) timer and preceding my value with a '&'. A BCD timer will require a preceding '#'. Share this post Link to post Share on other sites
Posted 31 Mar 2022 Quote a function that make that my right numbers picks up the numbers from the middle counter and countinues to count down This sentence makes no sense to me. If all you need is to force a counter to specific value, do it by MOV instruction. Share this post Link to post Share on other sites
Posted 31 Mar 2022 I guess I was still sleeping this morning..... Here is an example comparing to the counter. Same rules as the Timer. Also, to Sergei's point, an example to modify the current value. Share this post Link to post Share on other sites