Jump to content

Recommended Posts

Posted

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

Posted

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 '#'. 

Mr_PLC_MonitorTimer.JPG.4f9812d4755c8c87

Posted
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.

Posted

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.

Mr_PLC_ModifyCounter.JPG.6bde72977bde93d

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...