SYS1 Interrupt setting

This sets the interrupt input based on the contents specified by the character constant.

This sets the input specified by the first keyword as the interrupt input, and changes the input conditions to the contents specified by the second keyword. The first and second keywords are separated by a comma.

Keyword setting

INT2,UP

INT2

Interrupt Input

INT0–INT7: X0–X7

UP

Effective edges

UP: Rising edge

DOWN: Falling edge

BOTH: Rising and falling edged

For the FP-X you can set INT0–INT13.

Remarks

  • Executing this instruction does not rewrite the contents of the system ROM in the control unit. As a result, turning the power supply off and then on again rewrites the contents of the system registers specified by the tool software.

  • We recommend using differential execution with this instruction.

  • When UP or DOWN has been specified, the contents of the system registers change in accordance with the specification, so a verification error may occur in some cases, when the program is verified. When BOTH has been specified, the contents of the system registers do not change.

  • Separate first and second keywords with a comma "," and do not use spaces.

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if any character other than a keyword is specified

  • if no comma is between the first and second keywords

  • if small letters of the alphabet are used to specify the keyword

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if any character other than a keyword is specified

  • if no comma is between the first and second keywords

  • if small letters of the alphabet are used to specify the keyword

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		bSetEdge: BOOL:=FALSE;
		DT_value: DT:=DT#2010-06-30-11:15:00;
		bEno: BOOL:=FALSE;
	END_VAR

POU body

When InterruptX1 turns on, the input condition of interrupt input X1 is changed to "Rising Edge".

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_F,E_SET_RTC_DT!,Instance,20,1,28,5,,?DEN?DIN?AENO);
B(B_VARIN,,DT_value,18,3,20,5,);
B(B_CONTACT,,bSetEdge,7,2,9,4,R);
B(B_COIL,,bEno,37,2,39,4,);
L(1,3,7,3);
L(9,3,20,3);
L(28,3,37,3);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

if (DF(InterruptX1)) then
    SYS1('INT1, UP');
end_if;
NOTE

The values entered at s* will be right aligned automatically by the compiler.

Modified on: 2024-03-08Feedback on this pagePanasonic hotline