Chapter 9 PLC Operation

9.2 Online Change in RUN

The user programs can be modified during operation while retaining the output status as is. This is called the “program change while running” function. To modify the user programs, special programming software or programmer is required. Refer to the individual manuals on the operation.

Program change while running cannot be executed in the following situations. Perform this operation after satisfying the conditions.

Table 9.4 Conditions for performing program change while running

 

Conditions under which

 

 

No

program change while

Specific situation

How to satisfy the conditions

 

running cannot be performed

 

 

1

When READ-occupying

Other programming device is connected.

Change other programming devices to off-line.

2

 

When a personal computer or panel, etc. is

Change the personal computer or panel to off-line.

 

 

connected and monitoring is being executed.

(When monitoring, it is convenient to use the

 

 

 

occupancy unnecessary task code.)

3

END instruction is not executed.

A program that runs in an infinite loop is being

Correct the program so that it does not run in an

 

 

executed.

infinite loop.

4

Attempted to modify a program

Performing program change while running for a

An explanation of how to perform program change

 

that includes control

circuit containing a control instruction may cause

while running for a circuit that contains a control

 

instructions.

operation to stop depending on the type of the

instruction is given in the programming software

 

 

program modification error.

manual.

5

A password has been set.

A program protected by a password cannot be

Execute after having the system administrator

 

 

modified.

remove the password.

(When the CPU is stopped, the update is executed without displaying a message confirming program change while running.)

The MICRO-EH operation when the user program is changed in RUN is shown below.

Program change while running

Program modification

Assemble

NG

 

 

check

Error stop

Program change

OK

while running

(output shuts off)

Scanning stops

including control

at END scan

 

command

 

 

 

 

Transfer to operation

 

 

HALT time

execution memory

 

 

 

 

 

 

Displays that program change while running is being performed (programming device)

Scan resumes

Transfer to

FLASH memory

Note

The special internal output R7EF turns on during the transfer to the FLASH memory.

If the power supply to the CPU is turned off during transferring to the FLASH memory, the programs may be destroyed. Before the power supply to the CPU is turned off it should be confirmed that R7EF is off, or it should not be turned off until after approximately two minutes upon the completion of program transfer.

(If the pulse is being output, turn off the power supply approximately two minutes after the pulse output stops.)

Figure 9.16 Internal processing for program change while running

Transfer to the FLASH memory

Unlike the conventional H/EH series, the MICRO-EH transfers its user program to the FLASH memory, the backup memory, during the idle time of the CPU processing. Because of this, when the transfer to the operation execution memory is completed, the peripheral unit displays that the transfer is complete. However, the transfer to the FLASH memory is not completed at this stage. If the power supply to the CPU (especially CPUs without battery or CPUs whose data maintenance guarantee time is over) is turned off at this status, a user memory error (31H) occurs when the power supply to the main unit is turned back on. Therefore, it should be confirmed that the FLASH memory writing flag (R7EF) is off before the power supply to the main unit is turned off, or it should not be turned off until after approximately two minutes upon the completion of program transfer. (During pulse output, programs are not transferred to the FLASH memory until the pulse output is stopped. If the pulse is being output, turn off the power supply approximately two minutes after the pulse output stops.)

CPU HALT time

When performing program change while running, the program to be written to the CPU is checked if there are no errors, then the CPU is halted temporarily (RUN → HALT).

The program of the modified area is written to the CPU while it is halted, and the CPU is set to operate (HALT → RUN) again.

At this time, the following equation shows the approximate time the CPU is halted (it is not necessarily the maximum value). HALT time (ms) = 45 ⋅ Program capacity (k steps) + 20

An example of a calculation of the HALT time for the MICRO-EH using the above equation is 155 ms.

9-9

Page 242
Image 242
Hitachi NJI-350B manual Online Change in RUN, Conditions for performing program change while running, CPU Halt time