32.11.2.2 Explanation of the JSUB and JSUBP Instructions

The JSUB and JSUBP instructions are time subtraction instructions. When a JSUB instruction is executed, the time variable in operand S2 will be subtracted from the time variable in operand S1, and the result of the subtraction is stored in the time variable in operand D1. The JSUB and JSUBP instructions always pass power.

Time Variable

Time Variable

Variables Settings

Description

VariableName.HR

Integer Variable

Hours are input in BCD.

VariableName.MIN

Integer Variable

Minutes are input in BCD.

VariableName.SEC

Integer Variable

Seconds are input in BCD.

In the JSUB instruction, you cannot run time subtract operations on individual time variable elements (.HR .MIN .SEC).

The time variables and each element thereof are saved as BCD data.