Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 9 of 29

AnS(H) CPU User's Manual, pages 58 to 67

Pages 58 to 67 of 242

The original document is the PDF (3.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Mitsubishi A1S38

Page 58

4. AnSHCPU

MELSEC-A (b)

The watchdog timer setting must be greater than the constant scan time setting. If the watchdog timer setting is smaller than the constant scan time setting, a WDT error might occur. The relationship between the constant scan time setting and the watchdog timer setting is indicated below. (Constant scan time setting) ≤ (WDT setting) - 1

(c)

The set constant scan time must be greater than the maximum scan time of the sequence program. If the sequence program scan time is longer than the constant scan time, the constant scan function will not be executed correctly. Constant scan setting

Constant scan

0

0 Sequence program

10

20

30

40

END

0

35 msec

10

20

30

40

10

20

30

END 0 5 msec

40 msec

53 msec

40

END 0

10

20

END

35 msec

34 msec

37 msec

40 msec

0 6 msec

2 msec

Scan in which constant scan is not executed correctly

If scan time exceeds 37 msec, constant scan cannot be executed correctly in the succeeding scan

Fig. 4.5 Scan timer larger than constant scan setting

(3)

Setting for constant scan execution (a)

Constant scan execution A constant scan time setting is written to D9020 using the sequence program or a peripheral device (1 - 200).

(b)

Constant scan not executed The value "0" is written to D9020 using the sequence program or a peripheral device.

4 - 20

Page 59

4. AnSHCPU

MELSEC-A (4)

Precautions (a)

The constant scan time setting value stored in D9020 is cleared to zero (0) when the AnSHCPU power is turned ON or reset using the RUN switch. Therefore, it is necessary to write the following program if a constant scan is required from the first scan immediately after the AnSHCPU is turned ON or reset. Contact normally ON

M9036 MOVP

K

D9020 Constant scan time setting value

(b)

If a momentary power interruption within the allowable time occurs, the constant scan time is lengthened by the time taken up by the momentary power interruption. Accordingly, the constant scan function does not operate correctly.

(c)

During constant scan time processing, the following interrupt processing is allowed. Interrupt

Processing time

I/O interrupt

AD51(S3) general data processing : 0.2 to 0.5 msec Interrupts from AI61 or AD51(S3) : 0.2 msec + (interrupt program execution time of I0 to I17)

10 msec interrupt

1.0 msec + interrupt program execution time of I29 to I31

Interrupt from peripheral devices

0.2 msec

When the above interrupts overlap, the interrupt processing time becomes the total of the overlapping interrupts.

4 - 21

Page 60

4. AnSHCPU 4.2.2

MELSEC-A

Power interruption compensation for device data in the AnSHCPU (LATCH function) Data of all the AnS devices except devices specified as latch area are returned to default values (OFF for bit devices and 0 for word devices) when the power for AnSHCPU is interrupted or the reset switch is turned ON. The latch function retains the device data if (a) the AnSHCPU is reset by turning ON the power, (b) the AnSHCPU is reset using the RUN/STOP switch, or (c) a momentary power interruption lasting 20 msec or more occurs. The sequence program operation is the same whether or not the data is latched. (1)

Latch application Even if a momentary power interruption occurs, the processing currently being carried out can continue because the latch function retains the data for production volume, number of defective products, and addresses.

(2)

Latch devices and latch range setting (a)

The devices whose data can be latched are listed below : 1)

Latch relays (L0 to L2047)

2)

Link relays (B0 to B3FF)

3)

Timers (T0 to T255)

4)

Counters (C0 to C255)

5)

Data registers (D0 to D1023)

6)

Link registers (W0 to W3FF)

POINT Device data within the latch range is backed up by the battery (A6BAT) installed in the AnSHCPU. (1) (2)

The battery is required even when sequence program is stored in a ROM. Device data within the latch range is destroyed if the battery connector is disconnected from the AnSHCPU while the AnSHCPU power is turned OFF.

4 - 22

Page 61

4. AnSHCPU

MELSEC-A (3)

Clearing the latched data (a)

To clear the latched data, perform the latch clear operation. The latch clear operation also clears unlatched device data as described below. After the latch clear operation, the data in the each device is set as follows :

(b)

1)

Y, M/L/S, F, B

: Turned OFF.

2)

Special relays (M9000 to M9255)

: Data is retained.

3)

T, C

: Contacts and coils are turned OFF, the present value is set to 0.

4)

D, Z, V, W, A

: Data is set to 0.

5)

R

: Data is retained.

6)

Special registers (D9000 to D9127)

: Data is retained.

Latched data can be cleared using either of the following two methods. 1)

Using the RUN/STOP switch i)

Turn the RUN/STOP switch from the STOP position to the L.CLR position until the "RUN" LED flashes at high speed (goes ON and OFF at 0.2 sec intervals). Flashing of the RUN LED at high speed indicates that the latched data is ready to be cleared.

ii)

Turn the RUN/STOP switch from the STOP position to the L.CLR position while the RUN LED is flashing. The latched data is cleared.

POINT To cancel the latch clear operation, turn the RUN/STOP switch to the RUN or RESET position while the "RUN" LED is flashing. (1) RUN position : The AnSHCPU starts program processing. (2) RESET position : The AnSHCPU is reset.

2)

Using the GPP function The A6GPP "DEVICE MEMORY ALL CLEAR" of the test functions in the PC mode can be used to execute a latch clear. (The GPP Operating Manual gives details.)

4 - 23

Page 62

4. AnSHCPU 4.2.3

MELSEC-A

Running and stopping the AnSHCPU using external devices (remote RUN/STOP function) The RUN switch is used for AnSHCPU RUN/STOP control. "Remote RUN/STOP" operation means controlling the AnSHCPU RUN/STOP status with external signals (commands from peripheral devices, remote RUN contacts) with the RUN switch at the RUN position. (1)

Application of remote RUN/STOP Remote RUN/STOP control is useful in the following cases :

(2)

(a)

When the AnSHCPU is at a remote location.

(b)

When the AnSHCPU is located in a control box.

Executing a remote RUN/STOP Remote RUN/STOP operation is possible using the following methods : (a)

Remote RUN contacts Remote RUN/STOP control is possible by turning a remote RUN contact set in the parameters ON and OFF. 1)

When the remote RUN contact is turned OFF, the AnSHCPU is set to the RUN status.

2)

When the remote RUN contact is turned ON, the AnSHCPU is set to the STOP status. Switching between RUN and STOP is executed after execution of the END(FEND).

Step 0

END

Step 0

END 0

ON Remote RUN contact

OFF STOP

RUN/STOP status

RUN

STOP status

Fig. 4.6 Remote RUN/STOP timing chart when using a remote RUN contact

4 - 24

Page 63

4. AnSHCPU

MELSEC-A (b)

The AnSHCPU RUN/STOP operation is executed by specifying remote RUN/STOP from a peripheral device, computer link module, or the AD51(S3).

Step 0

END

Step 0

END 0

ON Remote STOP command

Peripheral device

Remote RUN command

AnSHCPU : RUN/STOP status

OFF

ON

OFF STOP RUN

STOP status

Fig. 4.7 Remote RUN/STOP timing chart when using the remote RUN/STOP command from a peripheral device

(3)

Precautions (a)

Because the AnSHCPU gives priority to the STOP command, the following points must be kept in mind : 1)

An AnSHCPU is turned to the STOP status when a STOP command is received from any of the following : a remote RUN contact, a computer link module or a programming device.

2)

In order to turn the AnSHCPU to the RUN status when the AnSHCPU is in the STOP status due to a remote STOP command, all the STOP factors have to be changed to RUN.

4 - 25

Page 64

4. AnSHCPU 4.2.4

MELSEC-A

Stopping the sequence program operation while retaining output status (PAUSE function) The PAUSE function stops AnSHCPU operations while retaining the status of all outputs (Y). (1)

Application The PAUSE function is useful for systems that do not allow output to be turned off even while the CPU is in the STOP status.

(2)

Method Either remote PAUSE contacts or peripheral devices can be used. (a)

Using a remote PAUSE contact 1)

The PAUSE status contact (M9041) closes after execution of the END(FEND) instruction of the scan during which the remote PAUSE contact closes and the PAUSE enable flag (M9040) is set. When the END(FEND) instruction of the scan after M9041 setting is executed, the AnS is set to PAUSE and its operation stops.

2)

When the remote PAUSE contact is opened or M9040 is switched OFF via an external device (peripheral device, computer etc.), the PAUSE status is canceled and sequence program operations resume from step 0.

0 0

END

END

0 0

END

ON Remote PAUSE contact

OFF ON

M9040

OFF ON

M9041

OFF PAUSE

RUN/PAUSE status

RUN

PAUSE status Turned ON when conditions for setting the CPU module in the PAUSE status are satisfied

Fig. 4.8 PAUSE timing using a remote PAUSE contact

4 - 26

Page 65

4. AnSHCPU

MELSEC-A (b)

Peripheral devices 1)

The PAUSE status contact (M9041) closes after execution of the END (FEND) instruction of the scan during which the remote PAUSE command from a peripheral device is received. When the END (FEND) instruction of the scan after M9041 has set is executed, the AnS is set to PAUSE and its operation stops.

2)

When a remote RUN command from a peripheral device is received, the PAUSE status is canceled, and sequence program operations resume from step 0.

0 0

END

END

0 0

END

ON Remote PAUSE command

OFF

Remote RUN command

OFF

ON

ON OFF

M9041

PAUSE RUN/PAUSE status

RUN

Turned ON when conditions for setting the CPU module in the PAUSE status are satisfied

PAUSE status

Fig. 4.9 PAUSE timing chart when using a peripheral device

POINT (1) (M9041) is used as an interlocking contact to switch ON or OFF the output (Y) in the PAUSE status, take interlock with the PAUSE status contacts (M9041). M20 Y70

In the PAUSE status, the status of M20 determines the status of Y70.

Y71

Switches OFF in the PAUSE status.

Y72

Switches ON in the PAUSE status.

M9041

M20

M9041

4 - 27

Page 66

4. AnSHCPU 4.2.5

MELSEC-A

Status latch The status latch function copies all device data to the status latch area when an SLT instruction is executed. After the data has been copied, the data in the status latch area can be monitored by a programming device. Status latch data can be read by using the GPP function in oder to monitor it. AnSHCPU

Peripheral device (GPP function)

Transfer by SLT instruction

Device memory area

Status latch area

File register area

Reading in the PC mode

Display for monitoring Status latch area

Fig. 4.10 Status latch operation

(1)

Applications The status latch function can be used to check device data when an error is found during debugging. It is also used to find out the cause of an error during sequence program execution. This is achieved by making a program that will execute the SLT instruction if an error condition arises.

(1)

Processing (a)

The following data is stored in the status latch area when an SLT instruction is executed. 1)

Device memory X, Y, M, L, S, F, B : ON/OFF data

2) (b)

T, C

: Contact and coil ON/OFF data and present values

D, W, A, Z, V

: Stored data

File register (R)

: Stored data

Data is stored in the status latch area when an SLT instruction is executed. With devices which turn ON/OFF or store data using the same condition, the data to be stored in the status latch area differs before and after executing an SLT instruction.

4 - 28

Page 67

4. AnSHCPU

MELSEC-A Example : If a device which is turned ON and OFF by the same condition occurs before and after the SLT instruction in a program, the ON/OFF status display will differ before and after the execution of the SLT instruction. [Circuit example]

[Monitor display of status latch data]

X0

(3)

X0 Y10

Y10

SLT

SLT

Y11

Y11

When the SLT instruction is executed, Y10 is ON and ON is displayed.

When the SLT instruction is executed, Y11 is OFF and OFF is displayed.

Precaution (a)

Executing an SLT instruction causes the scan time to be increased by the time indicated below. Therefore, take this into consideration when determining the watchdog timer setting and the constant scan time setting for the AnSHCPU.

Device memory only

Device memory and file register

8.5

17

Processing time (msec)

4 - 29