Mitsubishi — 3.14.3.4 Data Conversion

Chapter 3 Creating and Editing Screens  The data of V1 and V2 will be exchanged after executing XCHG command. Example Exchange the data of $11 and $2 (this is an operation of unsigned 16-bit data). If $11 = 1234H and $2 = 5678H, $2 = 1234H and $1 = 5678H after executing XCHG command.  MAX (Get Maximum Value of a Range of Data) Equation Var1 = MAX (Var2, Var3) Explanation Get the maximum value from Var2 and Var3 and store the result in Var1. Remark  The calculation result can be stored as signed or unsigned WORD and DWORD.  Var1 can be internal memory only. Var2 and Var3 can be internal memory or constant.

Example Get the maximum value from $0 and $1 and store the result in $2 (this is an operation of unsigned 16-bit data). If $0 = 2 and $1 = 10, $2 = 10 after executing MAX command. 3-338 Revision May, 2010