bionframe.blogg.se

Rslogix using tag as timer preset
Rslogix using tag as timer preset












rslogix using tag as timer preset rslogix using tag as timer preset
  1. Rslogix using tag as timer preset upgrade#
  2. Rslogix using tag as timer preset code#

In the example above, this value is set to 10000. The timer will begin counting at from 0 until it reaches the value specified by the Preset integer. For something like a motor run hour timer, the resolution issues may not be a problem. Programming example in RSLogix 500: Outcome: The RTO instruction will begin counting as soon as the B3:0/10 XIC is energized. You can also use bits from the free running clock to trigger the addition of time to a floating point number, but you will miss time slices when you enable and disable the timing, but not between. Warning: Be very careful that you do not put a negative number into the timer accumulator or you will fault the processor. Adjust the resolution according to your needs.

Rslogix using tag as timer preset code#

The following mnemonic code shows a floating point long duration timer in F8:0 with a time resolution of 0.001 hours. Ive done this many times to create high resolution long duration timers. This way you won't loose any time due to scan rates. If it is, subtract that duration from the accumulator, leaving any result >= 0 in the accumulator, and add that value to a floating point number. If this matters to your application then you should not use the timers DN bit, but rather set the timer preset to 32767 and use a comparrison insturuction to see it the timer value is greater than a certian time duration. Then the execution moves on to the next alarm. Let’s say the condition for alarm one becomes true and the timer starts timing. Just as one example, let’s say it’s an alarm block with a delay timer. What this means is that if your scan is long enough, and your timer happens to time out in mid scan and its location in the logic is such that it is not picked up until the next scan, you can have significant cumulative error. So if there is a timer inside the AOI it is shared across all instances of that instruction in the program. With a 100,000 hour meter, scan rate/timer resoultion differences can add up to be significant.

Rslogix using tag as timer preset upgrade#

If it does not, you can download a flash upgrade from ab.com that will let you upgrade the PLC firmware to support floating point math. First off you will need to make sure your version of ML1200 supports floating point math (series C OS).














Rslogix using tag as timer preset