The text of a manual · part 9 of 37
Sharp Programmable Controller New Satellite JW10 User's Manual: Chapter 7 Memory Configuration of the JW10, pages 46 to 54
Pages 46 to 54 of 307, from Sharp Programmable Controller New Satellite JW10 User's Manual
The original document is the PDF (5.0 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.
Filed in the catalog under the Sharp jW-10CM
Page 46
Chapter 7. Memory Configuration of the JW10 7-1
Data memory
[1] Kinds of data memory Kind
Capacity
Input relay
Relay number (Note 1) Byte address (Note 1) File address (Note 1)
256 points (32 bytes)
00000 to 00377
コ0000 to コ0037
000000 to 000037
Output relay
256 points (32 bytes)
00400 to 00777
コ0040 to コ0077
000040 to 000077
Auxiliary relay (Note 2)
6656 points (832 bytes)
01000 to 15777
コ0100 to コ1577
000100 to 001577
Timer/counter contact
256 points (64 bytes)
T/C000 to T/C377, 001600 to 001677
Timer/counter current value
512 bytes, b0000 to b0777
002000 to 002777
Register
512 bytes, 09000 to 09777
004000 to 004777
512 bytes, 19000 to 19777
005000 to 005777
512 bytes, 29000 to 29777
006000 to 006777
512 bytes, 39000 to 39777
007000 to 007777
Note 1: All data memory is handled with octal (except "9" on the 4th digit of the register area). However, numerical figures displayed on support tools (such as JW-13PG and JW-50PG) can be selected from octal, decimal, or hexadecimal by setting system memory (#115). Note 2: Auxiliary relay and register include special relays and special registers. ■ Special relay Relay number
Capacity
07320 to 07337
Contents
16 points
Relay for high-speed counter
07340 to 07347
8 points
Relay for data link, remote I/O
07350 to 07377
24 points
Operation flag, error relay etc.
■ Special register Byte address
Capacity
Contents
コ0100 to コ0104
5 bytes
コ0110 to コ0114
5 bytes
コ0120 to コ0124
5 bytes
コ0130 to コ0134
5 bytes
コ0140 to コ0142
3 bytes
コ0150 to コ0152
3 bytes
コ0160 to コ0162
3 bytes
コ0170 to コ0172
3 bytes
コ0200 to コ0207
8 bytes
コ0210 to コ0237
24 bytes
Reserved register (Note 3)
コ0240 to コ0243
4 bytes
Register for analog output module (JW-12DA)
コ0244 to コ0277
28 bytes
Reserved register (Note 3)
コ0740 to コ0767
24 bytes
Register for high-speed counter
コ1400 to コ1557
112 bytes
Register for data link
コ1570 to コ1577
8 bytes
Register for clock data
Register for remote I/O
Register for analog input module (JW-14AD)
Note 3: For reserved register, do not use in user program.
7-1
7
Page 47
[2] Relay area (1) Input relay (00000 to 00377) • ON/OFF information of the input port is read into this area during input/output processing at every scan and will be retained for a period of 1 scan cycle. (Note 1) • Used for input information (contact, source of application instruction) by the user program. Note 1: Data memory will be overwritten by the results during the scan cycle, if input relay was used OUT instruction and destination of application instruction in the program. (2) Output relay (00400 to 00777) • Operational result is stored into this area by the users program as OUT instruction or destination of application instruction. • Operational result can be used for contact and source of application instruction in the program. • ON/OFF information of the every scan cycle is transferred to the output port at the input/output processing.
7
(3) Auxiliary relay (01000 to 15777 except for special relay and special register) • Operational result is stored into this area by the user program as OUT instruction or destination of application instruction. 00000 Input relay • Used for a temporary storage of the operational result that may 00337 not be required to send outside. 00400 Output relay • Operational result can be used for contact and source of 00777 application instruction in the program. 01000 • Relays from 07000 to 15777 in the auxiliary relays are latched Auxiliary relay relays. The latched relays keep their condition even after power failure. 06777 The latched relay area can be increased and decreased by 07000 setting the system memory (#230, #231). Latched relay
(4) Timer/counter contact (T000 to T377, C000 to C377) • When the current value of timer/counter (TMR, CNT) is "0," the timer contact and counter contact are ON. • TMR and CNT can not use same number.
15777
(5) Relay area byte address (コ0000 to コ1577) • The JW10 is the programmable controller capable of handling four math rules and data transfer in addition to the bit based operation such as AND and OR. • A data processing is handled in terms of byte or word. To operate relay area, these areas are accessed in terms of byte address. • The byte address is an address in terms of byte (8 bits) that corresponds to a relay number. To clearly indicate that it is the byte address, the address is prefixed with "コ" discarding the least significant digit of a 5 digits relay number. The term "コ" represents "code."
[Example] 02017
02016
02015
02014
02013
02012
02011
02010
The byte address for the above is コ0201. • Byte address is used by the application instruction to specify the relay area in terms of byte for source and destination.
7-2
Page 48
(6) Special relay (07320 to 07377) • The following special relays are provided. ■ Special relay for high-speed counter 07320
Count enable relay
[Mode1-1]
07330
Count enable relay
[Mode2]
07321
Preset relay
[Mode1-1]
07331
Preset relay
[Mode2]
07322
Preset release relay
[Mode1-1]
07332
Preset release relay
[Mode2] [Mode2]
07323
Preset status relay
[Mode1-1]
07333
Preset status relay
07324
Count enable relay
[Mode1-2]
07334
Reserved
07325
Preset relay
[Mode1-2]
07335
Reserved
07326
Preset release relay
[Mode1-2]
07336
Reserved
07327
Preset status relay
[Mode1-2]
07337
Reserved
■ Special relay for data link and remote I/O 07340
Data link or remote I/O communication flag
07341
Data link or remote I/O communication flag
07342
Data link or remote I/O communication flag
07343
Data link or remote I/O communication flag
07344
Data link or remote I/O communication flag
07345
Data link communication flag
07346
Data link communication flag
07347
Data link communication flag
7
■ Special relay 07350
Reserved
07360
0.1 second clock
07370
07351
Reserved
07361
Reserved
07371
CPU error
07352
Reserved
07362
Initialize pulse
07372
Battery error
07353
Reserved
07363
Reserved
07373
I/O error
07354
Non-carry flag
07364
1 second clock
07374
Communication error
07355
Error flag
07365
Reserved
07375
Reserved
07356
Carry flag
07366
Normally OFF
07376
Reserved
07357
Zero flag
07367
Reserved
07377
Power supply error
Memory error
• These special relays (07340 to 07377) are areas written by the CPU and used as contacts or sources of application instruction in the user program. • Do not use them for OUT instruction and destination of application instruction by the user program. Specific attention is required when using the instruction that uses data memory of more than 2 bytes. • Do not use the reserved area with the user program.
7-3
Page 49
1 07320 to 07337 (relays for high-speed counter) • Use these relays when using the high-speed counter which is integrated inside the basic module. • For details, see "Chapter 12: How to Use the High-Speed Counter." 2 07340 to 07347 (data link and remote I/O communication flag) • These areas indicate communication status of each station while data link or the remote I/O is used. • For details, see "13-3: Data link" and "13-4: Remote I/O." 3 07354 to 07357 (operation flag) • Set according to the kind of operation, when an application instruction is executed that may affect the flag. • Refer to page 9・24, "Operation flag" for details. 4 07360 (0.1 second clock) and 07364 (1 second clock) • Used for the clock of the CNT instruction and other application instruction. 0.1 sec.
1 sec.
7 07360 (0.1 second clock)
07364 (1 second clock)
5 07362 (Initialize pulse) • Turns ON during 1 scan cycle immediately after the run mode of the PC is started. • "Immediately after the run" indicates the following cases: a) The module power is input with the operation mode (monitor mode or change mode) b) Changed from stop mode (program mode) to operation mode. • Used to initially reset (initialize) a CNT instruction or shift register. When the module has started Example: operation, reset input turns ON CNT 0010 with one scan interval, and Count input 07362 001 counted value of the CNT001 is cleared. Reset input
Note 1: If the initialize pulse is used as operation execution trigger instruction input when operation condition changes from ON to OFF, it must be used within the level operation conditions.
F-47 ONLS 07362
F-01 BCD F-48 ONLR
Setting of level operation conditions 10
09000
At start of operation, transfer BCD constant 10 to register 09000. Resetting of level operation conditions
6 07366 (normally OFF contact) • Used for the contact that programmed to be normally OFF (a-contact) or normally ON (bcontact). 7 07370 to 07377 (self-diagnostic result) • If an error was met in a course of diagnosis, the relevant relay will be set ON. • For details, refer to, "8-3 Self diagnosis."
7-4
Page 50
(7) Special register • The following registers are provided as special register.
■ Special register for high-speed counter コ0740 Current value (lower bits) [Mode1-1] コ0750 Current value (lower bits) [Mode1-2] コ0760 Current value (lower bits) [Mode2] コ0741 Current value (upper bits) [Mode1-1] コ0751 Current value (upper bits) [Mode1-2] コ0761 Current value (upper bits) [Mode2] コ0742 Compare value (lower bits) [Mode1-1] コ0752 Compare value (lower bits) [Mode1-2] コ0762 Compare value (lower bits) [Mode2] コ0743 Compare value (upper bits)[Mode1-1] コ0753 Compare value (upper bits)[Mode1-2] コ0763 Compare value (upper bits)[Mode2] コ0744 Preset value (lower bits)
[Mode1-1] コ0754 Preset value (lower bits)
[Mode1-2] コ0764 Preset value (lower bits)
[Mode2]
コ0745 Preset value (upper bits)
[Mode1-1] コ0755 Preset value (upper bits)
[Mode1-2] コ0765 Preset value (upper bits)
[Mode2]
コ0746 Reserved
コ0756 Reserved
コ0766 Reserved
コ0747 Reserved
コ0757 Reserved
コ0767 Reserved
■ Special register for remote I/O コ0100 to コ0104 Input relay of slave station 1
コ0140 to コ0142 Output relay of slave station 1
コ0110 to コ0114 Input relay of slave station 2
コ0150 to コ0152 Output relay of slave station 2
コ0120 to コ0124 Input relay of slave station 3
コ0160 to コ0162 Output relay of slave station 3
コ0130 to コ0134 Input relay of slave station 4
コ0170 to コ0172 Output relay of slave station 4
■ Special register for data link コ1400 to コ1407 Master station to slave station 1 transmitting data コ1500 to コ1507 Master station to slave station 5 transmitting data receiving data コ1510 to コ1517 Slave station 5 to master station receiving data コ1410 to コ1417 Slave station 1 to master station コ1420 to コ1427 Master station to slave station 2 transmitting data コ1520 to コ1527 Master station to slave station 6 transmitting data receiving data コ1530 to コ1537 Slave station 6 to master station receiving data コ1430 to コ1437 Slave station 2 to master station コ1440 to コ1447 Master station to slave station 3 transmitting data コ1540 to コ1547 Master station to slave station 7 transmitting data receiving data コ1550 to コ1557 Slave station 7 to master station receiving data コ1450 to コ1457 Slave station 3 to master station コ1460 to コ1467 Master station to slave station 4 transmitting data コ1470 to コ1477 Slave station 4 to master station receiving data
■ Register for special I/O
■ Register for clock data
コ0200 to コ0207 Data for analog input
コ1570 to コ1577
Clock data
コ0240 to コ0243 Data for analog output
1 コ0740 to コ0767 (Register for high-speed counter) • Current values etc. of the high-speed counter are stored. • For details, see "Chapter 12. How to Use the High-Speed Counter." 2 コ0100 to コ0172 (Register for remote I/O) • Input/output data area of each slave station of the remote I/O. • For details, see "13-4 Remote I/O." • When these registers are not used as remote I/O, they can be used as auxiliary relays. 3 コ1400 to コ1557 (Register for data link) • Transmitting/receiving data area between master station and each slave station of data link. • For details, see "13-3 Data link." • When these registers are not used as data link, they can be used as auxiliary relays. 4 コ0200 to コ0207 (Register for analog input), コ0240 to コ0243 (Register for analog output) • The digital values for analog input module, JW-14AD, and the analog output module, JW12DA, will be stored here. • For details, see "Chapter 15. Analog input/output module" 7-5
7
Page 51
5 コ1570 to コ1577 (Data register for clock JW-1424K/1442K/1624K/1642K only) • JW-1424K, JW-1442K, JW-1624K, and JW-1642K have clock function. (JW-1324K/1342K do not have clock function.) • 8 bytes of registers from コ1570 to コ1577 are used for reading clock data and time setting. Register no. Contents 1) The JW10 automatically recognizes 30-day months, コ1570 Second: 00 to 59 (BCD) 31-day months and leap years. コ1571 Minute: 00 to 59 (BCD) 2) Year is represented by the lower 2 digits of the コ1572 Hour: 00 to 23 (BCD) Gregorian calendar year. Leap years are assumed to occur every four years コ1573 Day: 01 to 31 (BCD) ('92, '96, and 00 are identified as leap years). コ1574 Month: 00 to 12 (BCD) 3) Set the day of the week when adjusting the present コ1575 Year: 00 to 99 (BCD) time. It changes from 0 through 6 each time the day コ1576 Day of week: 0 to 6 (BCD) data is increased. Day-of-week data is not computed コ1577 Control according to the year/month/day setting. Day of week SUN MON TUE WED THU FRI SAT BCD value
00 01 02 03 04
05
06
7 4) The control byte is affected when register コ1577 bits are set as below : • Bit D0 is used to start/stop the clock. If it is set to ON, the clock stops. • Bit D3 is used for 30 sec. correction. Carry depends on the present second : 0 to 29 sec.: Reset to "00" sec., with no carry to the minutes digit. 30 to 59 sec.: Reset to "00" sec., with a carry to the minutes digit. • If D3 is set to "ON," the module automatically resets after completion of auxiliary function. • Bit D7, when setting to "ON," allows the time to be adjusted. When it is reset to "OFF," the time monitor mode is selected. Since time adjustment is done after I/O operation are completed, the sequence at right will allow the time to be adjusted without having to stop the clock (D0: ON). If D7 is set to "ON," the module automatically resets after completion of time adjustment. Note 1: Bits D0 and D7 of register コ1577 should not be left set to "ON" continuously with an application command, otherwise the clock will not function normally. Note 2: Do not set illegal clock data (e. g. 30th of February), or the clock may not function normally.
コ1577 ON OFF D0 15770 Stop clock Start clock D1 15771 Not in use D2 15772 D3 15773 30 sec. correction D4 15774 Not in use D5 15775 D6 15776 D7 15777 Time adjust Time monitor
00000
11 min. F-01W 1140 コ1570 BCD 40 sec. 04 o'clock, F-01W 2504 コ1572 BCD 25th F-01W 9604 コ1574 April '96 BCD
Time F-01W 8004 コ1576 BCD adjustment Thursday 00001
F-01 BCD
08
コ1577
30 sec. correction circuit
Note 3: The clock has an accuracy of ±30 sec./month (25˚C) and ±60 sec./month (0 to 55˚C). The temperature refers to the clock device's ambient temperature. • Indication time can easily be adjusted by using initial mode of the hand-held programmer JW13PG. 7-6
Page 52
[3] Timer/counter current value storage area • The 512 bytes area of b0000 to b0777 is the area to store current value of timer/counter (TMR,CNT). • For the total points is 256 for the TMR and CNT, 2 bytes are used per point. See the table 1 for relationship of the TMR and CNT number vs., b**** area.
(Table 1)
(Table 2)
TMR, CNT number
Data storage area
000 b0000, b0001
001 b0002, b0003
002 b0004, b0005
003 b0006, b0007
:
:
277 b0576, b0577
300 b0600, b0601
:
:
376 b0774, b0775
377 b0776, b0777
7 TMR 000 8 to TMR 277 0 TMR 300 8 to TMR 377 0 CNT 000 8 to CNT 377 0
6 5 (×100) 4
2
0 0 (×10-1) 4
2
0 0 (×101)
4
3
2 1 (×10-1)
0
1 (×102) 1
8
1
8
1
8
4 2 (×101) 4 2 (×10-2) 4 2
(×101) 1
8
4
1 1
(×100) 2
1
(×100)
4
2
1
8
4
0
0
(×103) 1
8
4
2
1
(×102) 2
1 n n+1 n n+1 n n+1
7 • The TMR or CNT current value can be used for operation when b0000 to b0777 are specified by the data processing instruction such as F-00. • The data format of b0000 to b0777 indicate "table 2." Note 1: Numerical data is handled in BCD for b0000 to b0777. Note 2: n and n+1 represent the order of addresses. For example, in case of TMR is 001, n = b0002, n+1 = b0003.
[4] Register area • 512 bytes each from 09000 to 09777, 19000 to 19777, 29000 to 29777, and 39000 to 39777 are registers for byte unit (8 bits) used to temporarily store operational results. • These can be used as source and destination area using application instruction of user program. • Data of the register area are latched at power failure. • Area from 39000 to 39777 can be used as ROM (EPROM, EEPROM). (JW-1424K, JW-1442K, JW1624K, and JW-1642K only).
7-7
Page 53
[5] File address • Concerning byte address, serial numbers are allocated in each area: relay area (コ0000 to コ1577), timer/counter current value area (b0000 to b0777), register area (09000 to 09777, 19000 to 19777, 29000 to 29777, and 39000 to 39777). A group of these areas is referred to as "file." • Serial numbers called file address are allocated for each file. • Use file address to assign indirect address using packaged transfer instruction (F-70, F-70w). (See page 9・21.) Note 1: Do not write data using indirect address for timer/counter contact point area (file address 001600 to 001677) and CPU's internal processing area (file addresses 001700 to 001777, 003000 to 003777, and 010000 or up).
7
JW10 memory map File address (oct) 000000 Input relay 000037 000040 000077 000100
Byte address コ0000
(32 bytes) Output relay (32 bytes)
コ0037 コ0040 コ0077 コ0100
Auxiliary relay (832 bytes)
001577 001600
コ1577 Timer/counter contact (64 bytes)
001677 b0000
002000 Timer/counter current value (512 bytes)
b0777
002777 003000
003777 004000
09000 Register (512 bytes)
004777 005000
09777 19000 Register (512 bytes)
005777 006000
19777 29000 Register (512 bytes) 29777 39000
006777 007000 Register (512 bytes) 007777
7-8
39777
Page 54
7-2
Program memory • The program memory is the areas in which the user program is stored. As the programmable controller begins to operate, the program is stated to read from the top address to do operation according to the program. • In the JW10, the program memory capacity varies with the kinds of basic module . JW-1324K/1342K 0000 STR 00000 0001 OR NOT 00001 0002 STR NOT 00002 0003 OR 00003 0004 AND STR 0005 OUT 00400 0006 NOP 0007 NOP : : : : 2776 NOP 2777 F-40 (END) ↑ Program address (oct)
1.5 K words (3 K bytes)
JW-1424K/1442K JW-1624K/1642K 0000 STR 00000 0001 OR NOT 00001 0002 AND 00002 0003 OUT 00410 0004 STR 01000 0005 TMR 100 0006 1500 0007 F-00 0010 09000 0011 19000 0012 NOP 0013 NOP : : : : 7776 NOP 7777 F-40 (END) ↑ Program address (oct)
4 K words (8 K bytes)
7
• To represent the program memory capacity, the term "word" is used, instead of "byte." (1 K bytes expressed as 0.5 K words.) • As 1 K represents 1024, 1.5 K words represents 1536 words. • After program memory has been cleared, END instruction (F-40) and NOP instruction (instruction of not to operate) are written in final address and other addresses, respectively. • Program address is expressed in octal notation. By setting system memory (#115), indication of program address on a support tool such as JW-13PG can be chosen from oct, dcml, or hex. Basic module JW-1324K/1342K JW-1424K/1442K JW-1624K/1642K
Program memory capacity (Number of words)
OCT
Program address DCML
HEX
1.5 K words
0000 to 2777
0000 to 1535
0000 to 05FF
4 K words
0000 to 7777
0000 to 4095
0000 to 0FFF
• Instructions are available with 1-word, 2-word, 3-word and 4-word. Each word consists of 2 bytes.
1-word 2-word 3-word 4-word
(Example of 4-word instruction)
Typical instruction Bytes required STR, AND etc. 2 TMR, CNT etc. 4 F-00, F-01 etc. 6 F-10, F-11 etc. 8
F-10 09000 09002 09004 ADD 4th word 3rd word
See the "9-1 Description of instructions" concerning no. of words for each instruction.
7-9
2nd word 1st word