<< Prev        Next >>

ID : 7967

Program Operation Command (0001)

Function

This command controls the operating state of the program specified in data area 2 based on the setting of data area 1.

Format

Command Area (4 bits, input)

0001

Data Area 1 (8 bits, input)

00000001: Program reset start

00000010: Program start

00000100: Continue start

00010000: Step stop

00100000: Instantaneous stop

01000000: Reset

10000000 : Activation of supervisory tasks

10000001 : Deactivation of supervisory tasks

An error will occur if data is other than the above is set.

Data Area 2 (16 bits, input)

Program number: Program number to start

When the number given in data area 2 is n, the operating state of PROn will be controlled as given in data area 1. If the program number is negative in the case of a step stop, instantaneous stop or reset command, all programs will stop or be reset. If the program number is negative with a program reset start or program start command, an error will result.

Status area (16 bits, output)

Nothing will be output.

Description

00000001 Program Reset Start

This command is executable under the normal operation mode only. If this command is executed under the direct mode, an error occurs.

This command initializes and starts the program of the program number specified in data area 2. PRO0 to PRO32767 can be started.

If the program number specified in data area 2 is negative, an error will occur.

Either of the following operations takes place according to the operating status of the program:

  • If the specified program is terminated (stopped), step-stopped or immediately stopped, it will start from the beginning.
  • If the specified program is running, an error will be displayed, and the program will stop.

00000010 Program Start

This command is executable under the normal operation mode only. If this command is executed under the direct mode, an error occurs.

This command starts the program of the program number specified in data area 2. PRO0 to PRO32767 can be started.

If the program number specified in data area 2 is negative, an error will occur.

One of the following operations takes place according to the operating status of the program.

  • If the specified program is terminated (stopped), it will start from the beginning.
  • If the specified program is step-stopped, it will resume from the step following the suspended step.
  • If the specified program is immediately stopped, it will resume from the step following the suspended step. When the program is instantaneously stopped in while in execution of an operation command, it will resume from the operation still undone.
  • If the specified program is running, an error (ERROR21F5) will be displayed, and the program will stop.

00000100 Continue Start

This command is executable under the normal operation mode only. Also, this command can be executed only when the Continue Start Permitted signal is on. The data area will be ignored.

00010000 Step Stop

This command step-stops the program of the program number specified in data area 2. PRO0 to PRO32767 can be step-stopped.

If the program number specified in data area 2 is negative, all programs being executed will step-stop.

Either of the following operations takes place according to the operating status of the program.

  • If the specified program is terminated (stopped), step-stopped or immediately stopped, nothing will happen.
  • If the specified program is running, it will step-stop. If started after a step stop, the stopped program will resume from the step following the suspended step.

00100000 Instantaneous Top

This command immediately stops the program of the program number specified in data area 2. PRO0 to PRO32767 can be stopped immediately.

If the program number specified in data area 2 is negative, all programs being executed will step-stop.

Either of the following operations takes place according to the operating status of the program:

  • If the specified program is terminated (stopped), step-stopped or immediately stopped, nothing will happen.
  • If the specified program is running, it will immediately stop. If started after an instantaneous stop, the stopped program will resume from the suspended step. If the program is immediately stopped in the middle of execution of an operation command, it will resume, starting from the last uncompleted operation.

01000000 Reset

This command immediately stops and also initializes the program of the program number specified in data area 2. PRO0 to PRO32767 can be stopped.

This command cannot be used together with the program start command.

To start a step-stopped or cycle-stopped program from the beginning, use the program reset start command.

If the program number specified in data area 2 is negative, all programs being executed will be reset.

One of the following operations takes place according to the operating status of the program.

  • When the specified program is terminated (stopped), nothing will happen.
  • When the specified program is step-stopped or immediately stopped, it will be initialized. The initialized program will resume from the beginning.
  • When the specified program is running, it will immediately stop and also be initialized. If started after an instantaneous stop, the stopped program will resume from the beginning.

10000000 Activation of Supervisory Tasks

A program which program number is specified in data area 2 is executed as Supervisory task. Supervisory task of TSR0 to TSR32767 can be executed.

[0xffff] activates all supervisory tasks of root, [0xfffe] activates all supervisory tasks.
Other than above, if the program number specified in data area 2 is negative (Bit 15 on the data area 2 is "1"), an error will occur.

10000001 Deactivation of Supervisory Tasks

This command stops a supervisory task which program number is specified in the data area 2. Supervisory task of TSR0 to TSR32767 can be stopped.

If the data area 2 is negative (Bit 15 on the data area 2 is "1"), all Supervisory tasks currently running will stop.

ID : 7967

<< Prev        Next >>