Appendix Example in ST: var1 := 7*2*4*7; Example in FBD: 10.5.3.3 SUB Subtraction of one variable from another of the types: BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL and LREAL. A TIME variable may also be subtracted from another TIME variable resulting in third TIME type variable. Note that negative TIME values are undefined. Example in IL: LD 7 SUB 8 ST var1 Example in ST: var1 := 7-2; Example in FBD: 10.5.3.4 DIV Division of one variable by another of the types: BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL and LREAL. Example in IL: LD 8 DIV 2 ST var1 Example in ST: var1 := 8/2; Example in FBD:
If you define functions in your project with the names CheckDivByte [ } 335] , CheckDivWord [ } 336] , CheckDivDWord [ } 337] and CheckDivReal [ } 335] , you can use them to check the value of the divi- sor if you use the operator DIV, for example to avoid a division by 0. The functions must have the above listed names. TwinCAT 2 PLC Control 313 Version: 1.0