Using the CPT compute function

The CPT function is used to compute mathematical equations easily in Ladder Diagram.

  • If the EN input is TRUE, the EXP string input will be processed and output the result in the OUT element.

  • Functions can also be used in the expression (EXP) string.

  • The result of the expression must match the data type of the variable being used to store the result.

Element Name Element Type Description
EN Input Executes the CPT function when TRUE.
EXP Input Expression to solve in string format. Max size of the EXP input is 100 bytes (100 characters).
ENO Output Outputs the value of EN.
OUT Output Result of the expression.Data type of variable mapped to OUT must match the result of the expression.

 

 

 

 

 

 

 

 

LP313