The text of a manual · part 13 of 19
C-series SYSMAC LINK System Manual, pages 114 to 123
Pages 114 to 123 of 174
The original document is the PDF (983 KB). 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 Omron C200HW-SLK24
Page 114
Section 6-5
CV-mode Commands for PCs
Kind of data Bits 0 to 2 indicate the kind of data, as shown in the following table. Bit status 2 1 0
Kind of data
0
0
0
None
0
0
1
I/O data
0
1
0
Program
0
1
1
Comments
No. of comments (response): If the block contains comments data, this byte indicates the number of comments. Block data (response): The 256 bytes of data from the indicated block.
6-5-16 FILE MEMORY BLOCK WRITE Writes the 256 bytes of data in the command to the indicated block of file memory. This command can be used with the C1000H and C2000H only. Command Block 22
11
256 bytes
Command Block no. Kind of code data No. of comments
Data
Response Block 22
11
Command code
Parameters
Response code
Kind of data (command): Indicate the kind of data in the block, as follows: Bit
7
6
5
4
3
0
0
0
2
1
0
Kind of data (see table below) 1: Protected 1: Block contains END(01) (program only)*
Kind of data Bits 0 to 2 indicate the kind of data, as shown in the following table. Bit status 2 1 0
Kind of data
0
0
1
I/O data
0
1
0
Program
0
1
1
Comments
Note *Turn bit 7 ON when the block contains the END(01) instruction or the block is the last.
100
Page 115
Section 6-5
CV-mode Commands for PCs
No. of comments (command): If the block contains comments data, indicate the number of comments in this byte. Block no. (command): The block number of the block to which data will be written. The block no. must be between 0000 and 03E7 (0 to 999 decimal) for 1000 block file memory, or 0000 and 07CF (0 to 1999 decimal) for 2000 block file memory. Data (command): The 256 bytes of data that will be written to the indicated block.
6-5-17 FORCED SET/RESET Force-sets (ON) or force-resets (OFF) bits/flags or releases forced status. Bits/ flags that are forced ON or OFF will remain ON or OFF and cannot be written to until the forced status is released, e.g., by using this command. Command Block 23
01
Command No. of code bits/flags
Set/Reset specification
Set/reset specification
Bit/flag Memory area code
Bit/flag Memory area code
Forced set/reset data
Forced set/reset data
Response Block 23
01
Command code
Parameters
Response code
No. of bits/flags (command): The number of bits/flags to be forced set/reset or released. Set/Reset specification (command): The action to be taken for each bit/flag Value
Note
Name
0000
Force-reset (OFF)
0001
Force-set (ON)
8000
Forced status released and bit turned OFF (0)
8001
Forced status released and bit turned ON (1)
FFFF
Forced status released
1. In the C1000H and C2000H, only the Force-reset (0000) and Force-set (0001) actions can be specified. Furthermore, only one bit can be force set/ reset at a time. If force set/reset data for more than one bit is included in the command, only the last bit will be force set/reset. The forced status of the other bits/flags in the command will be released. 2. In the C200H/C200Hj, two or more bits can be force set/reset. (Forced status will be maintained unless a forced status release action is performed.) 3. The Forced status released and bit turned OFF (8000) and Forced status released and bit turned ON (8001) actions cannot be performed on timer/ counter Completion Flags. If these actions are specified, they revert to the Force-reset (0000) and Force-set (0001) actions, respectively. Memory area code (command): The memory area of the bit or flag to be controlled. Bit/Flag (command): The bit or flag to be controlled.
101
Page 116
Section 6-5
CV-mode Commands for PCs
Memory Areas The bits (flags) in the following memory areas can be forced set/reset or released (refer to 6-4 Memory Area Designations for memory area designations): Memory area
Data
IR, SR, LR, HR, and AR
Bit status
Memory area Bytes/ code item 00 1
Timer/Counter
Completion Flag status
01
1
Only the number of bits/flags indicated in No. of bits/flags will be forced set/reset or released.
6-5-18 FORCED SET/RESET CANCEL Cancels all bits (flags) that have been forced ON or forced OFF. Command Block 23
02
Command code
Response Block 23
02
Command code
Response code
6-5-19 FORCED STATUS READ Reads the forced status of a specified number of consecutive memory area words or Timer/Counter Completion Flags starting from the specified word or flag. All words must be in the same memory area (here, all memory areas with the same memory area code are considered as one area). This command can be used with the C200H, C200HS, C200HX, C200HG, and C200HE PCs only. Command Block 23
0A
Command First code word/flag Memory area code
No. of items
Response Block 23
0A
Command code
Parameters
102
Response First code word/flag Memory area code
No. of items
Data
Memory area code (command and response): The data area to read forced status. First word/flag (command and response): The address of the first word or flag whose forced status will be read.
Page 117
Section 6-6
CV-mode Commands for SYSMAC LINK Units
No. of items (command and response): The number of items to be read. The number of items must be 0001 to 0040 (1 to 64 decimal).The forced status of up to 64 consecutive words or 512 flags can be read. Data (response): The forced status data from the specified words or flags is returned in sequence starting from the first word/flag. The total number of bytes is calculated as follows: Bytes/item x No. of items When a bit is ON in the forced status data returned in the response, the status of the corresponding bit or flag has been forced (either force-set or force-reset). When a bit is OFF in the forced status data, the status of the corresponding bit or flag has not been forced. Memory Areas The following data can be read (refer to 6-4 Memory Area Designations for PC word/bit address designations): Memory area
6-6
Forced status data
IR, SR, LR, HR, and AR
Word
Memory area Bytes/ code item 80 2
Timer/Counter
Completion Flag
01
1
CV-mode Commands for SYSMAC LINK Units
6-6-1 DATA LINK START Activates data links in the SYSMAC LINK Network. This command will be completed normally when link words are allocated automatically or via data link tables only. Command Block 04
01
Command code
Response Block 04
01
Command code
Response code
6-6-2 DATA LINK HALT Stops data links in the SYSMAC LINK Network. This command will be completed normally when the data link is in operation. If the data link is not in operation, an error will occur. Command Block 04
02
Command code
103
Page 118
Section 6-6
CV-mode Commands for SYSMAC LINK Units Response Block 04
02
Command code
Response code
6-6-3 RESET Resets the SYSMAC LINK Unit. No response is returned when this command is executed. Command Block 04
03
Command code
6-6-4 CONTROLLER DATA READ Reads the following data from the SYSMAC LINK Unit: • Model and version • Type of cable (coaxial or optical fiber) • RAM size • Node number Command Block 05
01
Command code
Response Block 05
01
Command code
Parameters
104
Response code
20 bytes
20 bytes
Model
Version
Node number Cable type, RAM size
Model and version (response): Both the SYSMAC LINK Unit’s model and version are read in ASCII codes (20 bytes (i.e., 20 ASCII characters) max. each). If the model or version requires fewer than 20 characters, the remaining bytes will be filled with spaces (ASCII code 20).
Page 119
Section 6-6
CV-mode Commands for SYSMAC LINK Units
Cable type and RAM size (response): The type of cable being used and the size of the RAM buffer in the controller are provided as follows: Bit
7
6
5
4
3
0
0
0
0
Cable type 0: Coaxial 1: Optical fiber
2
1
0
RAM size (see table below)
Bit status 2 1 0
RAM size
0
1
0
4K bytes (C200HW-SLK13/23)
0
1
1
8K bytes (C1000H-SLK11/SLK21-V1)
1
0
0
16K bytes (C200HW-SLK14/24)
Node number (response): The value of the byte returned indicates the Unit’s node number in 2-digit hexadecimal. The node number range is 01 to 3E (1 to 62 decimal).
6-6-5 CONTROLLER STATUS READ Reads the status of the SYSMAC LINK Unit. Command Block 06
01
Command code
Response Block 06
5 bytes
01
Command code
Response code
00
Current status
8 bytes
8 bytes
Event occurrences
Member node list
Data link status
Parameters
Data link status (response): The operating status of the data link as follows: 00: Halted 01: Active Current status (response): These five bytes provide information on the current status of the Unit. First byte: Bit
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
Test operating status: 0: Stopped 1: Active
105
Page 120
Section 6-6
CV-mode Commands for SYSMAC LINK Units Second byte: Bit
7
6
5
4
0
0
0
0
3
2
1
0
0
0
0
Power supply status: 0: No power 1: Power supplied
Third byte: Bit
7
6
5
4
3
0
0
0
0
0
2
1
0
1: Node number range error 1: Node number duplication error 1: Network parameter mismatch error
A network parameter mismatch error occurs when the parameters set in the Unit at initialization do not match those of the currently operating network. The network parameters will be reset automatically. Fourth byte: Bit
7
6
0
5
4
3
0
0
2
1
0
1: Communications controller watchdog timer error 1: Communications controller memory error 1: Communications controller chip bad 1: Communications controller transmitter bad 1: Local node internode echo test error
Fifth byte: Bit
7
6
5
4
0
0
0
3
2
1
0
0 1: Network parameter error 1: Data link table error 1: System setup error 1: EEPROM error
Event occurrences (response): These eight bytes indicate how many times the following events have occurred. Each number is 2-digit hexadecimal, so 00 to FF (0 to 255 decimal) occurrences can be recorded. If an event occurs more than 255 times, the number will remain at 255. First byte: CRC errors Second byte: Token retransmission Third byte: Token rejections Fourth byte: Token passing time outs Fifth byte: Polling time outs Sixth byte: Polling unit changes Seventh byte: Member node changes Eighth byte: Communication controller data transfer stops
106
Page 121
Section 6-6
CV-mode Commands for SYSMAC LINK Units
Member node list (response): These eight bytes indicate which node numbers are members of the network. When a bit in the following matrix is ON, the corresponding node is in the network. Bits 6 and 7 of the eighth byte are always OFF. Bit
7
6
5
4
3
2
1
0
First byte
8
7
6
5
4
3
2
1
Second byte
16 15 14 13 12 11 10 9
Third byte
24 23 22 21 20 19 18 17
Fourth byte
32 31 30 29 28 27 26 25
Fifth byte
40 39 38 37 36 35 34 33
Sixth byte
48 48 46 45 44 43 42 41
Seventh byte
56 55 54 53 52 51 50 49
Eighth byte
-
-
62 61 60 59 58 57
6-6-6 NETWORK STATUS READ Reads the status of the SYSMAC LINK Network. Command Block 06
02
Command code
Response Block 06
Command code
8 bytes
31 bytes
02 Response code
Network Communications member data cycle time
62 bytes
Cyclic Cyclic error continuation errors log
Current polling unit node number
Cyclic transmission status Cyclic operation
Parameters
Network member data (response): Four bits are allocated to each node number to provide information on the status of nodes in the network as shown below. The function of each of the 4 bits is shown in the diagram following the table. Bits 4 to 7
Bits 0 to 3
Byte 1
Byte
Node number 2
Node number 1
Byte 2
Node number 4
Node number 3
Byte 3
Node number 6
Node number 5
Byte 31
Node number 62
Node number 61
Bit
3/7 2/6 1/5 0/4
0 1: In network (0: Not in network) 1: Exited because of an error.* (0: Normal exit) 1: Unit does not respond to polling.
107
Page 122
Section 6-6
CV-mode Commands for SYSMAC LINK Units
Note *Bit 1/5 is used to indicate why the node is not in the network when bit 0/4 is OFF. Communications cycle time (response): The actual communications cycle time is provided here in 4-digit hexadecimal in increments of 100 ms. Current polling unit node number (response): The node number of the unit that currently is the polling unit. Cyclic operation (response): Indicates the current status of cyclic operation, as follows: 00: Stopped 01: Active Cyclic transmission status (response): Indicates the current status of cyclic transmission, as follows: 00: No transmission 01: Transmission Cyclic continuation errors (response): These eight bytes indicate nodes in which non-fatal errors occurred in cyclic transmission. When a bit in the following matrix is ON, a non-fatal error occurred in the corresponding node. Bit 0 of the first byte and bit 7 of the eighth byte are always OFF. Bit
7
6
5
4
3
2
1
0
First byte
7
6
5
4
3
2
1
-
15 14 13 12 11 10 9
8
Second byte Third byte
23 22 21 20 19 18 17 16
Fourth byte
31 30 29 28 27 26 25 24
Fifth byte
39 38 37 36 35 34 33 32
Sixth byte
47 46 45 44 43 42 41 40
Seventh byte
55 54 53 52 51 50 49 48
Eighth byte
-
62 61 60 59 58 57 56
Cyclic error log (response): One of these 62 bytes is allocated to each node to indicate how many cyclic errors occurred since start-up. The first byte is allocated to node number 1, the second to node number 2, etc. Each number is 2-digit hexadecimal, so 00 to FF (0 to 255 decimal) errors can be recorded for each node. If more than 255 errors occur, the number will remain at 255.
6-6-7 DATA LINK STATUS READ Reads the status of the data link. The various data link status information described here will not be updated while the data link is halted. Command Block 06
03
Command code
Response Block 06
Command code
108
31 bytes
03 Response Present Max. code refresh time refresh time Status flags
Data link status
Page 123
Section 6-6
CV-mode Commands for SYSMAC LINK Units Parameters
Status flags (response): This byte contains flags providing information on overall data link status, as follows: Bit
7
6
5
4
3
2
0
0
0
0
1
0
1: Data link table error 1: No data link table 1: Automatic link word allocation (0: Allocation via data link tables) 1: Data link is active. (0: Data link is halted.)
Present and Max. refresh time (response): The present and maximum data link refresh times in 4-digit hexadecimal in increments of 1 ms. The range is 0005 to 00FF (5 to 255 ms, in decimal). Data link status (response): Four bits are allocated to each node number to provide information on the status of the data links, as shown below. The function of each of the 4 bits is shown in the diagram following the table. Bits 4 to 7
Bits 0 to 3
Byte 1
Byte
Node number 2
Node number 1
Byte 2
Node number 4
Node number 3
Byte 3
Node number 6
Node number 5
Byte 31
Node number 62
Node number 61
Bit
3/7 2/6 1/5 0/4
1: PC is in RUN or MONITOR mode 1: PC is stopped because a fatal error has occurred. 1: Not in network or communication error has occurred. 1: Data link is active.
6-6-8 INTERNODE ECHO TEST Performs an internode echo test with the indicated node. Command Block 08
01
Command code
512 bytes max.
Test data
Response Block 08
Command code
Parameters
512 bytes max.
01 Response code
Test data
Test data (command and response): Up to 512 byte of test data can be included in the command. This data is transmitted to the indicated node and returned unchanged if communications are normal. If the data returned in the
109