The text of a manual · part 12 of 14
Series One/Series Three Data Communications User's Manual: Chapter 6 Serial Interface Protocol, pages 114 to 121
Pages 114 to 121 of 134, from Series One/Series Three Data Communications User's Manual
The original document is the PDF (14 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 GE Fanuc IC630MDL357A, Fanuc IC630MDL357A and GE IC630MDL357A
Page 114
GEK-90477
Serial
Interface
Protocol
6-9
PC%-844060
SEND
EOT
I
I
SEND ACK
READ
EOT
I
SEND LOT TO END SESSION
1
9EE CONDITION 5, TABLE 6.2 +QGNCE 2SEE CONDITION 7, TABLE 6.2 2SEE CONDITION 8; TABLE 6.2 4 Figure
6.7
READ DATA
I
/
BLOCKS,
MASTER
OR SLAVE
Page 115
GEK-90477
Write
Serial
Interface
Data Blocks,
Master
6-10
Protocol or Slave (See Figure
6.6)
Write data block. e Is there a time-out on the data block response? (Condition 6, Table 6.2) If YES, is data block response ACK or NAK? If NO, is data block response ACK or NAK? If not ACK or NAK, send EOT to other device and exit. If ACK or NAK, is it a NAK? If YES, has data block been retried 3 times? If NO, return to “Write Data Block”. *If NO, is it last data block? If NO, set up next data block and return to “Write Data Block”. If YES, send EOT to end session. Is this device a Master? If YES, exit N Sequence. If NO, read EOT. Is there a time-out on EOT or is character not an EOT? (Condition 8, Table 6.2) If there is a time-out or the character is not EOT, send EOT and exit N Response. If EOT is OK, session is complete. Exit N response.
Read Data Blocks,
Master or Slave (See Figure
6.7)
Read data block. Is there a time-out on the first character of the data block? (Condition 5, Table 6.2) If YES, send an EOT and exit. If NO, is there a time-out on the entire data block? (Condition 7, Table 6.2) If YES, send an EOT and exit. If NO, is the data block OK? If NO, has the data block been retried 3 times? If YES, send EOT and exit. If NO, send NAK and return to “Read Data Block”. If YES, send ACK. “Is it the last data block? If NO, return to “Read Data Block”. If YES, read EOT. Is there a time-out on the EOT or is the character not an EOT? If there is a time-out or the character is not EOT, send EOT and exit. If EOT is OK, is this device a master? If NO, the session is complete, exit N Response. If YES, send EOT to end session, exit N Sequence. l
*
For Series One and Series One Junior communications, only one partial data block can be sent per request based on the time outs in Table 6.2. Therefore, it is always the last. The flow chart and accompanying explanation describe the full functionality of CCM2 protocol.
Page 116
GEK-90477
Serial
MASTER-SLAVE
Interface
6-l 1
Protocol
MESSAGE TRANSFERS
As explained before, when the master wishes to initiate a data transfer, it issues a The receiving device responds by sending a three-character enquiry sequence. three-character acknowledge or negative acknowledge sequence. This establishes a link which permits the transfer of a message. Message transfers consist of a 17-byte header, sent by the master, followed by a block of data.
HEADER
BLOCK
A header block header specifies is sent before the text data block to describe transfer of data. The the direction of the data transfer, the amount and location of the data to be transferred, and the destination of the transfer. The header is composed of 17 bytes; the header format is shown in Figure 6.8. _
. S 0 H
1
D0J ID
DATA FLOW DIR
2
3
4
DCU MEM TYPE
ADD
ECU MEM ADD
COMP DATA
MSB
LSB
BLKS
LAST BLK
09
10
12
DCU MEM
5
67 A
NO
11
NO BYTES
13
.
(OlH) DCU (target) ID Number (not encoded the same as the target address) BYTES 4 + 5 Data flow direction, DCU memory type BYTES 6 + 7 Most significant byte of address of requested data BYTES 8 + 9 Least significant byte of address of requested data BYTES 10 + 11 Number of complete data blocks to follow the header Series One and Series One Junior data communications, byte is always zero). BYTES 12 + 13 Number of bytes in incomplete last block. BYTES 14 + 15 Source ID Number BYTE 16 ETB (17H) BYTE 17 LRC (Exclusive “OR” of Bytes 2-15) BYTE BYTES
1 SOH 2 + 3
Figure The information in bytes 2-15 hexadecimal values are 30H-39H than one byte, the most signif icant
6.8
SERIAL
HEADER are ASCII coded (O-9) and 41 H-46H byte is transmitted
(In this
FORMAT hexadecimal. (A-F). For first.
Valid ASCII fields requiring coded more
Page 117
GEK-90477
Serial
Interface
Protocol
6-12
DCU or DCM ID Number The DCU or DCM ID (target ID) is the identification number of the DCU or DCM and it is set with DIP switches= This number can range from 1 to 90. (In ASCII coded HEX: 01 to 5A). This is not encoded the same as the Target-__Address in the enquiry sequence. See the section, Normal Enquiry Sequence, in this chapter.
Data Flow Direction and Memory
Bytes 4 and 5 inform type involved.
Type the DCU or DCM of the direction of the transfer and the memory
Byte 4 - Direction
1
CONTEKTS OF BYTE 4 DEC HEX ASCII 30 38
48 56
Byte 5 - Memory
DATA FLOW DIRECTION 4
0 8
Read from DCU or DCM Write to DCU or DCM
Type
CONTENTS OF BYTE 5 DEC HEX ASCII
*
49
31
1
50
32
3
54 55 57
36 37 39
6 7 9
TARGET ME?IORY TYPE
(Memory Type 1) Data Registers* and CPU Timer/Counter Memory (Memory Type 3) CPU Discrete I/O Status values (External and Internal Input/Output values, shift registers, and Timer/Counter complete* bits) (Memory Type 6) CPU Scratch Pad Memory (Memory Type 7) CPU User Logic Memory (Memory Type 9) DCU or DCM Diagnostic Status Words
Timer/Counter complete references Plus and Series Three CPUs only.
Target Memory and Data Registers in Series
One
One/Junior/Plus or can be accessed
Address
The target meiory address specifies the address Series Three CPU where the transfer is to begin.
within the Series
Page 118
GEK-90477
Serial Interface
Protocol
6-l 3
Memory Type 1 The target memory address specifies the Timer/Counter accumulator or Data Register (Series One Plus and Series Three PCs only) where the data transfer is to begin. The mapping of reference numbers to numbers used for the target memory address is shown in Tables 5.1 (Series One), 5.2 (Series One Junior), 5.3 (Series One Plus), and 5.4 (Series Three). Valid Range
Series One OOOlH-0040H
Series One Plus OOOlH-0080H
Series One Junior OOOlH-0015H
Series Three OOOlH-OOCOH
Memory Type 3 The target memory address specifies the Input or Output point where the data transfer is to begin. The transfer begins with the byte that contains the specified The mapping of discrete I/O reference numbers to numbers used for Input or Output. target memory address is shown in Tables 5.1 (Series One), 5.2 (Series One Junior). 5.3 (Series One Plus), and 5.4 (Series Three). Valid Range
Series One OOOlH-0030H
Series One Plus Series One Junior OOOlH-OOZOH OOOlH-0040H (excluding 0009H-OOOBH)
Memory Type 6 The target memory which the data transfer is to begin. Valid Range address specifies
Series One Series One Junior OOOOH or 0016H OOOOH or 0016H
Series Three OOblH-0080H the CPU Scratch-Pad
Series One Plus OOOOH, OOOZH, OOO4H, or 0016H reference at
Series Three OOOOH or 0016H l
The address can be either OOOOHto access CPU operation mode status or OO16t-i to access PC Type status. Operation mode and PC type each consist of 2 bytes. See the section, Accessing the CPU Scratch Pad.
Memory Type 7 The target memory address specifies the User-Logic memory word at which the data transfer is to begin. Timer and Counter instructions must be written in their entirety (2 words or 4 bytes). To clear User-Logic memory, write FF to each byte to cleared. Valid Range
Series One OOOOH-06BBH
Series One Junior OOOOH-02BBH
Memory Type 9 The target memory address which the data transfer is to begin. The only 5 words (10 bytes) must be read or written. Valid Range
Series One OOOOH
See the section,
Diagnostic
Series One Plus OOOOH-06BBH
Series Three OOOOH-OFFEH specifies the Diagnostic Status Word at valid target memory address is OOOOH. All
Series One Junior OOOOH
Series One Plus OOOOH
Series Three OOOOH
Status Words, in Chapter
5 for the definition of each word.
Page 119
GEK-90477
Serial
Interface
Number of Complete
Protocol
Data Blocks to Follow
6-14
Header
*
This specifies the number of 256-byte data blocks to be transferred following the header. This number can range from 0 to 20H for Series One Plus or Series Three communications, but must be 0 for Series One or Series One Junior communications using the serial time outs in Table 6.2. For more information, see the section on Text Data Blocks. The information below defines the unit length and accessible lengths for each Series This information will help you to One/Junior/Plus and Series Three memory type. determine how many 8-bit bytes are required for a particular transfer.
SERIES ONE/JUNIOR/PLUS SERIES THREE MEMORY TYPE
1:
1: 3. 61 7. l
9. 0
Number
Timer/Counter Accumulator Data Registers (Series One Plus and Three Only) Discrete Scratch Pad I/O Bytes User Logic Word Diagnostic Status Word of Bytes in IncomPlete
UNIT LENGTH
ACCESSIBLE LENGTHS
1 Accum = 16 bits 1 Data Reg = 8 bits 1 Point ==8 1bits bit Byte 1 Word = 16 bits 1 Word = 16 bits
Accumulator(s) Multiples of 2 Reg Multiples 2 of 8 Points Bytes Word(s) 5 Words
Last Block
This specifies the number of bytes in the last data block. data blocks is zero, this number specifies the total number
When the number of complete of bytes to be transferred.
For Series One Plus and Series Three communications, this number of bytes in the last block can vary from 0001 H to OOFFH. For Series One and Series One Junior communciations, this number is restricted because of the limitation of accessing memory through the DCU. For more information, see the section on Text Data Blocks.
Source ID Number The source ID number is the identification CPU, this ranges from 1 to 5AH.
number of the source device.
For a Series Six
Page 120
GEK-90477
Serial interface
6-l 5
Protocol
Text Data Block The maximum data block size is 256 (OOFFH) bytes for Series One Plus and Series Three CPUs but is less than this for Series One/Junior CPUs using the time outs in Table 6.2. This does not affect reading or writing to memory types 6 (Scratch Pad) or 9 (Diagnostic Status Words). Reading and writing to memory types 1 (T/C Accumulators), 3 (l/O and Shift Registers), and 7 (User Memory) are restricted as shown in the table below.
TYPE OF COMMUNICATION REQUEST
MAXIMUM AMOUNT OF DATA FOR EACH COMMUNICATION
SERIES ONE PC* 58 Act
Read from Memory Type 3 (I/O and Shift Reg) Write to Memory Type 3 (I/O and Shift Reg)
368
I/O
46 Bytes
24
I/O
3 Bytes
75 Words
150 Bytes
25 Words
50 Bytes
45 Words
90 Bytes
20 Words
ZIO Bytes
* CPU Revision
Communication Not Supported
All 21 Act
42 Bytes
Read from Memory Type 1 (T/C Accumulators) Write to Memory Type 1 (T/C Accumulators)
Read from Memory Type 7 (User Memory) Write to Memory Type 7 (User Memory)
116 Bytes
SERIES ONE JR PC
Communication Not Supported 176 I/O
22 Bytes
No I/O, Communication Times Out
C or later. NOTE
If you are writing a CCM protocol interface for the Series One or Series One Junior, the time outs for conditions 5, 6, and possibly 7 in Table 6.2 must be lengthened to transfer more data per request. The time outs in the Series Six CCM2 and CCM3, however, are fixed and cannot be made lonaer.
The text data block always starts with a Start-Of-Text (STX) character which is followed by the text. The text is followed by an End-Of-Text (ETX) character. This is then followed by the text data checksum. This checksum is used to verify the data’s integrity. The checksum, (LRC) is an exclusive r’OR’f of all the text data bytes. When 16-bit information (registers or user logic) is being transferred in a text data block, the least significant byte is transferred first followed by the most significant byte.
Page 121
GEK-90477
HEADER
Serial
Interface
Protocol
AND TEXT DATA
BLOCK
6-16
RESPONSE
The header and text data blocks are responded to with an acknowledge (ACK) acknowledge (NAK). An ACK means that the header or text was acceptable permission to the sending device to start sending the next data block. A NAK means that the header or text the header or data. The unacceptable or negative and grants was not acceptable and asks for a retransmission header or text is retried three times.
of
MESSAGE TERMINATION After the ACK to the final text data block has been received, the device receiving the ACK sends an End-Of-Transmission (EOT) character to close the serial link. The master always terminates the link with an EOT.
TIMING
CONSIDERATIONS
Serial Link Time-Outs A time-out occurs on a serial link when the DCU or DCM does not receive a response, a header, or data from another device within a fixed amount of time. Time-outs are used on the serial link for error detection, error recovery, and to prevent missing end-of-block sequences. Whenever a serial link time-out occurs, the DCU or DCM will abort the conversation and send an EOT to the other device. After an EOT, a new enquiry sequence must be sent to restore communications. Refer to Table 6.2 for time-outs at any point in the serial protocol.
Turn-Around
Delays
Turn-around delay options of 0 to 10 ms for the DCU or DCM can be selected by DIP switch. A lo-ms turn-around delay should be selected when using modems in the half-duplex mode of operation or when using full-duplex modems in multidrop configurations. This delay allows a computer or Series Six the time needed to signal the modem to turn on and ringing on the line to stop before actual transmission of data. The DCU or DCM will delay 10 ms before header, or the start of a text data block. When the 10 ms turn-around serial time-outs in Table 6.2.
delay is selected, sending the a control time character, is automatically the start of added to the