11 - 472 11 - 472
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Available only in execution mode
ZURGENCY
Instruction
Z URGENCY
• Changes the priority of a program.
ZURGENCY <priority>
Syntax
priority
• • • •
Specify an execution priority order from 0 to 10 when
operating programs in multitask operations. The
smaller the number is, the higher the priority is.
Examples
ZURGENCY 3
• • • •
Sets the program's priority to 3.
Description
• The ZURGENCY instruction is used to change the execution priority of the program. The
priority of a program that executes the ZURGENCY instruction is changed when operating
BASIC programs in multitask operations in the communication module.
• The communication module can concurrently execute up to eight BASIC programs. The
OS of the communication module executes these programs in parallel while switching
between the execution in sequence according to each program's priority.
• When each program is started up, the priority is set to 1.
• The ZURGENCY instruction has the functionality to change the priority of the program that
executes this instruction.
• In <priority>, specify the number that the communication module's OS can use as a guide
to determine the program to execute when multiple programs are executable.
Note that if -1 is specified, it is assumed that 0 is specified.
• The smaller the number specified in <priority> is, the higher the priority of the program is (a
program with higher priority will more often be given the execution right by the OS).
• It is possible to execute multiple programs with the same priority. However, an error occurs
if a number -2 or less or from 11 to 99 is specified in <priority>.
• Do not specify a value of 100 or greater in <priority>; the communication module cannot
guarantee the operation of the program and the execution result. An error will not occur
although a value of 100 or greater is specified.
REMARK
See Sections 8.1 and 8.4 for the details about the priority of tasks.