Delta DVP-ES3 — 6.1.2 Explanation of Comparison Instructions

DVP-ES3 Series Programming Manual Declare two variables in the program. 2. Declare VarPR1, VarTR1, VarCR1, and VarHCR1 in the function block, and assign the data types POINTER, T_POINTER, C_POINTER, and HC_POINTER to them respectively. 3. Call the function block FB0 in the program, and assign D29999, T0, C511, and HC50 to VarPR1, VarTR1, VarCR1, and VarHCR1 in FB0 respectively. _6 4. Use the CHKADR instruction to check whether VarPR1, VarTR1, VarCR1, and VarHCR1 exceed the range. 5. When chkPR is ON, the actual device represented by VarPR1 is D29999. Since the legal range of devices is from D0 to D29999, and D29999+10-1=D30008 which exceeds the range, PR_ChkBit is OFF. 6.

When chkTR is ON, the actual device represented by VarTR1 is T0. Since the legal range of devices is from T0 to T511, and T0+10-1=T9 which does not exceed the range, TR_ChkBit is ON. 6-38