Skip to main content

NRC_RunqueueInsertUNTIL( int port, int value)

Insert UNTIL instruction in the run queue

Before calling this function, please call NRC_CreateNoFlieRunqueue() to create a fileless run queue

It needs to be used with NRC_RunqueueInsertENDUNTIL()

Type

int=>Insert UNTIL instruction in the run queue

Return valueDescription
0The function is called successfully
-101Invalid input parameter
-102The target object does not exist. This typically occurs when the system initialization is incomplete, and calling other functions may return this value
-103The target object is currently in an inoperable state

Parameter Option

ParameterTypeDescription
portintThe number of the digital input port to be detected, parameter range: port > 0
valueintThe input state to wait for; 0: low level; 1: high level

Sample code

//While running between UNTIL and ENDUNTIL, if the condition of UNTIL is met, the program will immediately interrupt the current running instruction and jump to ENDUNTIL for execution
NRC_RunqueueInsertUNTIL(5, 1);
NRC_RunqueueInsertMOVJ(100, pos1, 0);
NRC_RunqueueInsertMOVL(100, pos2, 0);
NRC_RunqueueInsertDOUT(1, 0);
NRC_RunqueueInsertTIMER(0.5);
NRC_RunqueueInsertENDUNTIL();