[?]: Increment in LAD every 20 ms

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Post Reply
Posts: 1
Joined: Sat May 14, 2011 12:39 pm

[?]: Increment in LAD every 20 ms

Post by mgax » Fri May 25, 2018 11:33 am

Hello, please answer my two questions, they seem to be simple, but how to do it correctly in the language of LAD, I did not understand.
These two questions relate to the LAD language.

The first question is how to perform increment/decrement.
I need every 20 ms, variable to increase or decrease by 1 (well, or a fractional number).

The second question is how to protect against zero in formulas in which there is multiplication / division, just putting the comparator on the EN of the mathematical element does not work, as soon as the comparator is disabled, all the variables of this formula get some maximum values.

Post Reply