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

The text of a manual · part 10 of 29

AnS(H) CPU User's Manual, pages 68 to 77

Pages 68 to 77 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 68

4. AnSHCPU 4.2.6

MELSEC-A

Sampling trace It is not possible to check the transition of the ON/OFF status of bit devices and the data in word devices using a peripheral device monitor function. The sampling trace function samples the data from designated devices at fixed intervals and stores the sample data in the sampling trace area. After the STRA instruction is executed, the data stored in the sampling trace area is sampled the designated number of times and the device data is latched. Data stored in the sampling trace area can be read by using the GPP function to monitor it. Peripheral device (GPP function)

AnSHCPU Sample trace area

Device area File register area

Sample trace area

1

1st sample data

2

2nd sample data

3

3rd sample data

4

4th sample data

4

5

5th sample data

5

6

6th sample data

6 n-1

(n-1) sample data n n sample data

1 2

Read by peripheral device

3

Display of sampling trace data the designated number of times

Sampling trace data monitor n

After the data has been sampled n times, the next data sample overwrites the first data sample.

*

After the execution of the STRA instruction, device data sampling is carried out the designated number of times and the data in the sampling trace area is latched.

Fig. 4.11 Sampling trace

(1)

Application By using the sampling trace function, the debugging time can be shortened by verifying the data of the designated devices at defined intervals during debugging.

(2)

Devices which can be sampled The devices and the number of points which can be sampled are indicated below. (a)

Bit devices (X, Y, M, L, S, F, B, T/C coil, T/C contact)

(b)

Max. 8 points

Word devices (T/C present value, D, W, R, A, Z, V)

4 - 30

Max. 3 points

Page 69

4. AnSHCPU

MELSEC-A (3)

Number of sampling times The total number of sampling times and number of sampling times after the execution of the STRA instruction need to be specified. (a)

Total number of sampling times This number signifies the size of the area where the sampling data is stored. The allowed setting range is 0 to 1024 times in units of 128 times.

(b)

Number of sampling times after the execution of the STRA instruction When the number of samplings reaches this number, the CPU terminates sampling and retains the sampled data. The allowed setting range is 0 to 1024 times in units of 128 times.

The number of sampling times after the execution of the STRA instruction

≤

Total number of sampling times

≤

1024 times

STRA instruction executed

Number of sampling times after the execution of STRA instruction

Total number of sampling times Device data is latched after the designated number of sample times after the execution of the STRA instruction

Fig. 4.12 Number of sampling times

4 - 31

Page 70

4. AnSHCPU

MELSEC-A (4)

Sampling intervals The sampling interval can be selected as either of the following: after the execution of END instruction or at defined intervals. (a)

After execution of an END instruction Data is sampled each time an END instruction is executed.

(b)

At defined intervals Data is sampled at defined intervals, 10 × n msec (n : 0 to 199). In this case, data is sampled even during execution of the sequence program.

After execution of an END instruction Sequence program execution END

Step 0

END

Step 0

END

Step 0

Sampling trace execution

At defined intervals Sequence program execution 10 × n [msec] 10 × n [msec] 10 × n [msec] 10 × n [msec]

END Step 0

END Step 0

Sampling trace execution

Fig. 4.13 Sampling trace executions

4 - 32

Page 71

4. AnSHCPU 4.2.7

MELSEC-A

Offline switch function While the AnSHCPU is running (during the execution of a sequence program), it is not possible to turn sequence program OUT instruction devices ON and OFF using a peripheral device test function. The offline switch function allows these devices to be turned ON and OFF with a peripheral device test function while the AnSHCPU is running. It is possible to check operation of OUT instruction devices, which are not turned ON and OFF by the sequence program, and to check the wiring between the output module and an external device with the offline switch function.

Offline switch closed OUT instruction

Online status *1 Offline status *2

Offline switch opened

*1 : This online status is established when the offline switch is closed. The OUT instruction device is controlled (turned ON/OFF) by the sequence program. *2 : The offline status is established when the offline switch is opened. The OUT instruction is isolated from the sequence program. In the offline status, it is not possible to control the OUT devices using the sequence program.

Fig. 4.14 Offline and online status

(1)

Devices which can use the offline switch function The following devices can use the offline switch function : (a)

Outputs (Y)

(b)

Internal relays (M)

(c)

Latch relays (L)

(d)

Step relays (S)

(e)

Link relays (B)

(f)

Annunciators (F)

4 - 33

Page 72

4. AnSHCPU

MELSEC-A (2)

Status of devices in the offline status The status of devices in the offline status (offline switch opened) as follows.

(3)

(a)

The ON/OFF status that existed just before the offline status was established is retained.

(b)

When a forced set/reset is executed using a peripheral device in the offline status, the reset/set status after the forced set/reset is retained.

Operating procedures (a)

To set the AnSHCPU in the offline status, use a peripheral device to set the offline switch.

(b)

To return the AnSHCPU from the offline status to the online status, use either of the following two methods : 1)

Reset the offline switch setting using a peripheral device.

2)

Reset the AnSHCPU with the RUN/STOP keyswitch.

POINT (1)

(2)

Devices set in the offline status cannot be turned ON and OFF using a sequence program. Devices set in the offline status during testing must be returned to the online status by resetting the off line switch after completing the test operation. Devices returned from the offline status to the online status can be turned ON and OFF using a peripheral device. Before returning such devices to the online status, check the input conditions of OUT instructions. Make sure that no problems will arise when the devices are returned to the online status.

4 - 34

Page 73

4. AnSHCPU 4.2.8

MELSEC-A

Setting priorities for ERROR LED display By changing the setting, the following can be done : (a)

The ERROR LED can be made to stay OFF even when an error (see Table 4.7) that normally turns ON the ERROR LED occurs, if indication of the error is not necessary. For example, the ERROR LED can be made to stay OFF when an annunciator (F) is turned ON. However, the setting cannot be changed for errors that stop the sequence program.

(b)

An LEDR instruction can be used to reset annunciators. By setting the annunciator to the first priority, an LEDR instruction can be used to reset the annunciator even if another error occurs. (Normally, if a higher-priority error occurs, the annunciator cannot be reset.)

(1)

The default setting of priorities for ERROR LED display is shown in Table 4.7.

Table 4.7 Priority for ERROR LED display Priority High

Low

Error contents

Error item number

ERR LED

Error which causes the AnSHCPU to stop unconditionally

I/O module verification error Blown fuse error

1

Special module fault Link parameter error Operation error

2

CHK instruction execution

3

OFF

Annunciator (F) turning ON

4

Flashing

Battery error

6

Lit

4 - 35

Lit

Page 74

4. AnSHCPU

MELSEC-A (2)

Changing the priorities The ERROR LED display priority in D9038 and D9039 (the LED display priority storage register) is changed by changing the previously set error item number. Fig.4.15 shows the error number storage for each priority and the default values (initially set by the PC CPU).

[D9038, D9039] D9039 b15 to b4

D9038 b3 to b0 b15 to b12 b11 to b8 b7 to b4 b3 to b0

5th priority

4th priority

3rd priority

2nd priority

1st priority lgnored

Error item No. setting area

[D9038, D9039] D9039 b15 to b4 0

0

0

D9038 b3 to b0 b15 to b12 b11 to b8 b7 to b4 b3 to b0

6

4

3

2

1

Fig. 4.15 Error priority in D9038 and D9039 and error setting items

POINT (1)

The ERROR LED is not lit if an error in Table 4.7 for which error indication priority is not set occurs. If all bits are "0" in D9038 and D9039, for example, the ERROR LED will not be lit when any errors among those corresponding to error item numbers 1 to 6 occurs. Example : To make the ERROR LED stay OFF when an annunciator (F) is turned ON, change the error item number area initially set to "4" to "0". b15 to b4 0

0

0 b3 to b0 b15 to b12 b11 to b8 b7 to b4 b3 to b0

6

0

3

2

1

The error item setting area does not contain "4", so the ERROR LED will remain OFF even when an annunciator is turned ON.

(2)

In this case, however, M9008 (the CPU error flag) is set and the corresponding error code is stored in D9008 (CPU error register).

In order to change the priorities, store the error item number listed in Table 4.7 in each priority area of D9038 and D9039 (the LED display priority storage registers).

4 - 36

Page 75

4. AnSHCPU 4.2.9

MELSEC-A

Clock function The AnSHCPU has an internal clock function. Time management is made possible by reading clock data. Clock operations continue by using battery backup in the memory cassette even when the PC power is OFF or there is a momentary power interruption lasting 20 msec or longer. (1)

Clock data is the data of the clock inside the AnSHCPU. This data is shown below. Year, month, date, hour, minutes, seconds, day

Data Year

(2)

Last 2 digits

Month

1 to 12

Data

1 to 31 (Leap years automatically detected)

Hour

0 to 23 (24 hour)

Minutes

0 to 59

Seconds

0 to 59

Day

0 to 6 (Sunday to Saturday)

Clock accuracy varies according to ambient temperature as follows : Ambient temperature (°C)

(3)

Accuracy (Weekly difference, sec)

+ 55 within ± 11

+ 25 within ± 15

0 within ± 1

Clock data can be read and written using special relays, special registers or dedicated instructions. (a)

Device

The special relays used for the clock function are as follows : Name

Description

M9025

Request to set clock data

• Clock data stored in D9025 to D9028 is written to the clock device after the execution of END in the scan in which M9025 status is changed from OFF to ON.

M9026

Clock data error

• Turned ON if set clock data is not BCD code.

M9028

Request to read clock data

• Clock is read to D9025 to D9028 after the execution of END when M9028 is ON.

4 - 37

Page 76

4. AnSHCPU

MELSEC-A (b) Device

Special relays Contents

Description b15

D9025 b0

Clock data (Year, month)

Month (01 to 12 in BCD) Year (00 to 99 in BCD)

b15

D9026 b0

Clock data (Day, hour)

Hour (00 to 23 in BCD) Day (01 to 31 in BCD)

b15

D9027 b0

Clock data (Minute, second)

Second (00 to 59 in BCD) Minute (00 to 59 in BCD)

b15 b0

Day of the week (0 to 6 in BCD)

D9028

Clock data (Day of the week)

0

Day of the Sun Mon Tue Wed Thu week Store data

4 - 38

0

1

2

3

4

Fri

Sat

5

6

Page 77

4. AnSHCPU

MELSEC-A (4)

Clock data setting to the clock devices (a)

Store the clock data in D9025 to D9028 in BCD code.

(b)

When M9025 is turned ON, clock data stored in D9025 to D9028 is written to the clock device.

POINT Clock data is not set at factory shipment, clock data must be once set if the clock function is necessary. All clock data must be rewritten to the clock device even when part of the clock data needs to be changed. Normal clock operation cannot be performed if invalid data is written. Example Month : 13 Day : 32

(5)

Clock data read Clock data can be read to D9025 to D9028 from the clock device by turning on M9028.

(6)

Clock data write program example Request to write X00 MOVP

H9202

D9025

Year 92, Month 02

MOVP

H0111

D9026

Day 1, Hour 11

MOVP

H3524

D9027

Minute 35, Second 24

MOVP

H5

D9028

Tue. : 5

M9025

4 - 39