The text of a manual · part 8 of 29
AnS(H) CPU User's Manual, pages 48 to 57
Pages 48 to 57 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 48
4. AnSHCPU 4.1.6
MELSEC-A
Self-diagnosis The self-diagnosis function allows the AnSHCPU to detect its own errors. Self-diagnosis is carried out when the PC power supply is turned ON and if an error occurs while the PC is in the RUN status. If the AnSHCPU detects an error, it displays an error message and stops to prevent faulty PC operation. The operation of the AnSHCPU when an error is detected by the self-diagnosis function can be selected as either stop mode or continuous mode by making a parameter setting. In the stop mode, PC operation is stopped when the error is detected; in the continuous mode, PC operation is continued. When an error occurs, the error occurrence and the error content are stored in a special relay (M) and special register (D). In the continuous mode, in particular, the program should read the details of the error and take appropriate action to prevent faulty PC and machine operations. Operation stops and all outputs (Y) are immediately turned OFF after the selfdiagnosis function detects an error which stops PC operation. If the self-diagnosis function detects an error during which PC operation continues, the part of the program where the error was detected is skipped and the rest of the program is executed. If an I/O module verify error is detected, the operation is continued with the I/O addresses at the time the error occurred. Explanations of the errors detected by the self-diagnosis function are given in Table 4.2.
REMARKS (1) In Table 4.2, in the I/O error, I/O module verify, fuse blown, special function module error, and operation check error diagnoses, the CPU status can be selected as either stop or run; and the RUN LED status as either flashing or ON by using peripheral devices. (2) The LED Display Message column in Table 4.2 lists messages displayed by the peripheral devices' PC diagnosis.
4 - 10
Page 49
4. AnSHCPU
MELSEC-A Table 4.2 Self-diagnosis
Diagnosis
Diagnosis timing
CPU status
"RUN" LED status
LED display message
Memory error Instruction code check
When the corresponding instruction is executed
INSTRUCT. CODE ERR.
Parameter setting check
When power is switched ON or a reset is executed When switched from STOP/PAUSE to RUN
PARAMETER ERROR
No END instruction
When M9056 or M9057 is switched ON When switched from STOP/PAUSE to RUN
Instruction execution disable
When CJ, SCJ, JMP, CALL(P), FOR and NEXT instruction is executed When switched from STOP/PAUSE to RUN
CAN'T EXECUTE (P)
Format (CHK instruction) check
When switched from STOP/PAUSE to RUN
CHK FORMAT ERR.
Instruction execution disable
When an interrupt occurs When switched from STOP/PAUSE to RUN
CAN'T EXECUTE (I)
CPU error RAM check
When power is switched ON or a reset is executed When M9084 is switched ON during STOP
RAM ERROR
Operation circuit check
When power is switched ON or a reset is executed
OPE. CIRCUIT ERR.
Watchdog error check
When an END instruction is executed
END instruction not executed
When program processing reaches the end of the program
Stop
Stop
Flashing
Flashing
MISSING END INS.
WDT ERROR END NOT EXECUTE
Endless loop execution
At any time
I/O error I/O module verify
When an END instruction is executed (Not checked when M9084 is ON)
WDT ERROR
Fuse blown
When an END instruction is executed (Not checked when M9084 is ON)
Special function module error Control bus check
When a FROM, TO instruction is executed
Special function module error
When a FROM, TO instruction is executed
Link module error
When power is switched ON or a reset is executed When switched from STOP/PAUSE to RUN
LINK UNIT ERROR
I/O interruption error
When an interruption occurs
I/O INT. ERROR
Special function module assignment
When power is switched ON or a reset is executed When switched from STOP/PAUSE to RUN
SP. UNIT LAY. ERR.
Special function module error
When a FROM, TO instruction is executed
Link parameter error
When power is switched ON or a reset is executed When switched from STOP/PAUSE to RUN
Run
ON
LINK PARA. ERROR
Battery error Battery low
At any time (not checked When M9084 is ON)
Run
ON
BATTERY ERROR
Stop Operation check error
When the corresponding instruction is executed
Flashing
Stop
Flashing
Run
ON
FUSE BREAK OFF.
CONTROL-BUS ERR.
Stop
Stop
Flashing
Flashing
Run
Run
4 - 11
UNIT VERIFY ERR.
SP. UNIT DOWN
SP. UNIT ERROR ON
OPERATION ERROR ON
Page 50
4. AnSHCPU 4.1.7
MELSEC-A
Devices A device is any contact, coil, or timer used in PC program operations. AnSHCPU devices and their range of use are shown below. The items marked "*" can be used and set for range change by setting the parameters. Set parameters which are appropriate for the system configuration and its program. Section 4.1.6 gives details about parameter settings. Table 4.3 Devices Device
Application range (Number of points)
Explanation
A1SHCPU : X/Y00 to X/YFF (X, Y total 256 points) A2SHCPU : X/Y000 to X/Y1FF (X, Y total 512 points) A2SHCPU-S1 : X/Y0 to X/Y3FF (X, Y total 1024 points)
Provides a command or data from an external device, (e.g. pushbutton, select switch, limit switch, digital switch) to the PC.
Special relay
M9000 to M9255 (256 points)
Predefined internal relay for special purposes.
M
Internal relay *
M0 to M999 (1000 points)
Internal relay in the PC which cannot be directly output.
L
Latch relay*
L1000 to L2047 (1048 points)
S
Step relay*
Can be used by setting a parameter (0)
Used in the same manner as an internal relay (M) e.g., as a relay indicating the stage number of a step-by step process operation program.
B
Link relay
B0 to B3FF (1024 points)
Internal relay for MELSECNET which cannot be output. May be used as an internal relay if not assigned for data link use.
F
Annunciator
F0 to F255 (256 points)
Used to detect a fault. When switched ON during RUN by a fault detection program, it stores a corresponding number in a special register D.
T
100 msec timer*
T0 to T199 (200 points)
T
10 msec timer*
T200 to T255 (56 points)
T
100 msec retentive Can be used by setting a parameter timer* (0 points)
C
Counter*
C0 to C255 (256 points)
C
Interrupt counter*
Can be used by setting a parameter (0 points)
Forward counters are available in normal and interrupt types.
D
Data register
D0 to D1023 (1024 points)
Memory for storing values.
D
Special register
D9000 to D9255 (256 points)
Predefined data memory for special purposes.
W Link register
W0 to W3FF (1024 points)
Data register for MELSECNET. May be used as a data register if not assigned for MELSECNET use.
R
File register*
Can be used by setting a parameter (0 points)
Extends the data register utilizing the user memory area.
A
Accumulator
A0, A1 (2 points)
Data register for storing the operation results of basic and application instructions.
Z
Index register
Z (1 point)
V
Index register
V (1 point)
Used to index device numbers (X, Y, M, L, B, F, T, C, D, W, R, K, H, P).
N
Nesting
N0 to N7 (8 levels)
Indicates the nesting of master controls.
X
Input
Y
Output
M
Provides the program control result to an external device, e.g. solenoid, magnetic switch, signal light, digital display.
Number of M + L + S = 2048
Internal relay in the PC which cannot be directly output. Backed up during power failure.
Forward timers are available in 100 msec, 10 msec and 100 msec retentive types.
4 - 12
Page 51
4. AnSHCPU
MELSEC-A Table 4.3 Devices (Continued)
Device
Application range (Number of points)
Explanation
P
Pointer
P0 to P255 (256 points)
Indicates the destination of branch instructions (CJ, SCJ, CALL, JMP).
I
Pointer for interruption
I0 to I31 (32 points)
Indicates an interrupt program corresponding to the interrupt source.
K
Decimal constant
K-32768 to 32767 (16-bit instruction) K-2147483648 to 2147483647 (32-bit instruction)
H
Hexadecimal constant
H0 to FFFF (16-bit instruction)
Used to specify the timer/counter set value, pointer number, interrupt pointer number, the number of bit device digits, and basic and application instruction values.
Used to specify the basic and application instruction values.
H0 to FFFFFFFF (32-bit instruction)
REMARK The step relay (S) may be used in the same manner as the internal relay (M). The step relay is useful when writing a program which has two functions or applications, i.e., the step relay can be used specifically in accordance with the function or application, independently of the internal relay.
4 - 13
Page 52
4. AnSHCPU 4.1.8
MELSEC-A
Parameter setting ranges The parameters specify various PC functions, device ranges and user memory assignments of the AnSHCPU. As shown in Table 4.4, the parameters have default settings so the user does not have to set all the parameter items. If any parameter item needs to be modified, please refer to the table for the allowed setting range. The operating manuals for each peripheral device give details on parameter settings.
Table 4.4 Parameter setting ranges Setting Setting range
PU
GPP
6 k steps
1 to 8 k steps (in units of 1 k steps)
ϒ
ϒ
1 to 14 k steps (in units of 1 k steps)
ϒ
ϒ
1 to 4 k points (in units of 1 k points)
ϒ
ϒ
ϒ
ϒ
ϒ
ϒ
ϒ
ϒ
ϒ
Item A1SHCPU Main sequence program area A2SHCPU(S1) File register capacity
None A1SHCPU
Comment capacity
None A2SHCPU(S1)
0/8 to 16 k bytes
Data memory
None
Absent/present Absent/present (2 to 8 k bytes)
File register Memory capacity
0/8 k bytes
Device setting Sampling trace
0 to 3648 points (in units of 64 points) 0 to 3648 points (in units of 64 points)
Memory capacity Status latch
Valid peripheral devices
Default value
Device number
Execution condition
None
Per scan Per time 0 to 1024 times (in units of 129 times)
Sampling count
Microcomputer program i
Setting of latch (power interruption compensation) range
Setting of link range
A1SHCPU
None
0 to 14 k bytes (in units of 2 k bytes)
A2SHCPU (S1)
0 to 26 k bytes (in units of 2 k bytes)
Link relay (B)
B0 to B3FF (in units of 1 point)
Timer (T) Only for L1000 to L2047. None for others
Counter (C)
T0 to T255 (in units of 1 point) C0 to C255 (in units of 1 point)
Data register (D)
D0 to D1023 (in units of 1 point)
Link register (W)
W0 to W3FF (in units of 1 point)
Number of link stations Input (X)
A1SHCPU
1 to 64 None
4 - 14
X0 to FF (in units of 16 points)
Page 53
4. AnSHCPU
MELSEC-A Table 4.4 Parameter setting ranges (Continued) Setting Default value
Setting range
Item A2SHCPU
X0 to 1FF (in units of 16 points)
A2SHCPU-S1
X0 to 3FF (in units of 16 points)
A1SHCPU
Y0 to FF (in units of 16 points)
Input (X)
Setting of link range
Output (Y)
A2SHCPU
None
Y0 to 1FF (in units of 16 points)
Valid peripheral devices PU
GPP
ϒ
Y0 to 3FF (in units of 16 points)
A2SHCPU-S1 Link relay (B)
B0 to B3FF (in units of 16 points)
Link register (W)
W0 to W3FF (in units of 1 point) None
X/Y0 to X/Y1FF (in units of 16 points)
ϒ
M0 to M999 L1000 to L2047 None for S
M/L/S 0 to 2047 (M, L, S are serial numbers)
ϒ
ϒ
200 msec
10 msec to 2000 msec (in units of 10 msec)
ϒ
ϒ
100 msec : T0 to T199 10 msec : T200 to T255
256 points of 100 msec, 10 msec, and integrating timers (in units of 8 points). Timers have serial numbers.
ϒ
ϒ
No interrupt counter
256 points (in units of 8 points) for counters and interrupt counters. Must be consecutive numbers.
ϒ
None
X0 to X1FF
ϒ
Stop/continuation
ϒ
Operation status prior to re-output of STOP
Output before STOP or after operation execution
ϒ
Print title entry
None
Up to 128 characters
ϒ
Keyword entry
None
Max. 6 digits in hexadecimal (0 to 9, A to F)
ϒ
ϒ
I/O assignment Setting of internal relay (M), latch relay (L), and step relay (S) setting Watchdog timer setting
Setting of timer
Setting of counter
Setting of remote RUN/PAUSE contact *
A1SHCPU A2SHCPU
X0 to XFF
A2SHCPU-S1 Fuse blown Operation mode at the time of error
Continuation
I/O verify error
Stop
Operation error
Continuation
Special function module check error STOP → RUN display mode
*
X0 to X3FF
Stop
It is not possible to set a PAUSE contact alone.
4 - 15
Page 54
4. AnSHCPU 4.1.9
MELSEC-A
Memory capacity settings (main programs, file registers, comments, etc.) The A1SHCPU, A2SHCPU(S1) provides 64 k (192 k) bytes of user memory area (RAM). Data for parameters, T/C set values, main programs, sampling trace, status latch, file registers, and comments can be stored in the user memory area. (1)
Calculating memory capacity The user memory can be divided into several memory blocks in accordance with the parameter settings.
Table 4.5 Parameter settings and memory capacity Item
Setting module
Memory capacity
4 k bytes (fixed)
Sequence program
1 k steps
(Main sequence program capacity) × 2 k bytes
Microcomputer program
2 k bytes
(Main micro computer program capacity) ×1 k byte
Parameter, T/C set values Main program
Not available/ available
0/8 k bytes
Data memory
Not available/ available
0/8 k bytes
File registers
Not available/ available
(File registers' memory capacity) 1 k byte
Sampling trace
Status latch
File registers
1 k points
Comments
64 points
Storage onto ROM
Possible
Impossible
Occupies 4 k bytes for parameters and T/C set values
The memory capacity for the file register status latch is determined by the number of file register points set using parameters.
(File registers' number of points) × 2 k bytes (Number of comments)
1 k byte is occupied by the system when setting comment capacity.
+ 1 k byte
64
(2)
Remark
Storage priority in user memory The data set in the parameters is stored in the following sequence. Make sure that the memory protect range does not cover the areas, such as sampling trace and file register, to which data will be written during sequence program execution. (a)
When the A1SHCPU is used 2
Even if the main program is stored in an E PROM/EPROM, the capacities of the sampling trace, status latch, file register, and comment areas cannot be increased, because the system uses the internal RAM area (area indicated by *1 in the following figure) as in RAM operation.
4 - 16
Page 55
4. AnSHCPU
MELSEC-A
(a) In RAM operation
(b) In E2PROM/EPROM operation Parameter area T/C set values area
ROM memory capacity (max. 32 k bytes)
Sequence program are (required min. 1 k step)
Not used Stored in ROM 3 k bytes 1 k byte
Not used *1 Not usable (used by system)
Sequence program are (required min. 1 k step)
Memory write 1 to 8 k bytes protect range (2 to 16 k bytes) (32 k bytes)
Microcomputer program area
Internal RAM memory area (64 k bytes)
(b)
Parameter area T/C set values area
Microcomputer program area
Not used
Not used
Extension file register area
Extension file register area
Sampling trace area Status latch area File register area Comment area
Sampling trace area Status latch area File register area Comment area
Usable with SW0GHPULTP-FN1.
When the A2SHCPU(S1) is used 2
Even if the main program is stored in an E PROM, the area cannot be used for the extension file register, because the system uses the internal RAM area (area indicated by *2 in the following figure) as in RAM operation.
(b) In E2PROM operation
(a) In RAM operation
Parameter area T/C set values area ROM memory capacity (max. 64 k bytes)
Stored in ROM 3 k bytes 1 k byte
1 to 14 k steps Memory write protect range (2 to 28 k bytes) (32 k bytes)
Internal RAM memory area (64 k bytes)
Sequence program are (required min. 1 k step)
Not used
Parameter area T/C set values area Sequence program are (required min. 1 k step)
Microcomputer program area
Not used *2 Not usable (used by system)
Microcomputer program area
Not used
Not used
Extension file register area
Extension file register area
Sampling trace area Status latch area File register area Comment area
Sampling trace area Status latch area File register area Comment area
4 - 17
Usable with SW0GHPULTP-FN1.
Page 56
4. AnSHCPU 4.2
MELSEC-A
Functions The following table describes the functions of the AnSHCPU. Table 4.6 List of functions Description
Section reference
Constant scan
• Executes the sequence program at the predetermined intervals independently of the scan time. • Setting allowed from 10 to 2000 msec.
4.2.1
Latch (power interruption compensation)
• Retains device data while the PC is switched OFF or reset or a momentary power interruption of 20 msec or longer occurs. • L, B, T, C, D and W can be latched.
4.2.2
Remote RUN/STOP
• Allows remote RUN/STOP control from an external device (e.g. peripheral, external input, computer) with the RUN/STOP switch in the RUN position.
4.2.3
PAUSE
• Stops operation with the output (Y) status retained. • Pause function may be switched ON by using either of the following : Remote PAUSE contact Peripheral device
4.2.4
Status latch
• Stores all device data in the status latch area in the AnS when the status latch condition is switched ON. • The stored data can be monitored by a peripheral device.
4.2.5
Sampling trace
• Samples the specified device operating status at predetermined intervals and stores the sampling result in the sampling trace area in the AnS. • The stored data can be monitored by a peripheral device.
4.2.6
Offline switch
• Allows the device (Y, M, L, S, F, B) used with the OUT instruction to be disconnected from the sequence program processing.
4.2.7
Priority setting ERROR LED
• Sets the ON/OFF status of the ERROR LED in the event of an error.
4.2.8
Clock *1
• Executes clock operation in the CPU module. • Clock data includes the year, month, day, hour, minute, second, and day of the week. • Clock data can be read from special registers D9025 to D9028.
4.2.9
Function
REMARK The AnSHCPU cannot do "step operation", "PAUSE using RUN/STOP key switch", or "I/O module replacement at online". *1
Handling the year 2000 Year 2000 is a leap year, so February 29 comes after February 28. The AnSHCPU automatically fixes date by the clock element in the CPU module, so the user does not have to manually set the date to the clock element. The year only contains the last two digits of the year. Therefore, when the clock data is read from the PC CPU and used in the sequence control, the year data may have to be fixed using a sequence program depending on the usage. Year 1999 → "99" Year 2000 → "00" When comparison is made only with the last two digits of the year read, the year 2000 and consecutive years are considered older than the year 1999.
4 - 18
Page 57
4. AnSHCPU 4.2.1
MELSEC-A
Constant scan Because the processing time of each individual instruction in a sequence program differs depending on whether or not the instruction is executed, the scan time differs accordingly for each scan. The constant scan function sets varying scan times to a fixed value regardless of the sequence program processing time. Scan time - constant scan function not used
END
Sequence program END processing END 0 END
0
50 msec
0
END
60 msec
0
50 msec
Scan time - scan time fixed to 70 msec Sequence program END processing END
END
0
0
END
Wait 50 msec 70 msec
60 msec 20 msec
0 10 msec
END
50 msec
70 msec
0 20 msec
70 msec
Fig. 4.4 Constant scan function
(1)
Constant scan application When executing simple positioning by turning output (Y) ON/OFF, the positioning time may vary since the ON/OFF timing of output (Y) differs for each scan. When using the constant scan function, variation in the positioning timing can be decreased by the ON/OFF timing of output (Y).
(2)
Setting range (a)
Constant scan time can be set in the range of 10 to 2000 msec. Enter the required constant scan time in special register D9020 in units of 10 msec (setting value between 10 and 2000 msec). If the D9020 setting is outside the range of 1 to 200, the constant scan time will be as indicated below. Setting for D9020
Constant scan time
-32768 to 0
Not set
1 to 200
10 to 2000 msec
201 to 32767
2000 msec
4 - 19