HIMA HSD9044工控模块机器人备件
在该示例中的传输完成之后,469从机11将存储以下设置点信息:地址数据1180 01F4 1181 01DE主传输:字节示例/描述从机11的从机地址1 0B消息功能代码1 10存储设置点数据起始地址2 11 80设置点地址1180设置点数量2 00 02 2设置点(共4字节)字节计数1 04 4字节数据数据1 2 01 F4地址数据1180 DATA 2 2 01 DE数据地址1181 CRC 2 DB B1 CRC由主从机响应计算:BYTES示例/描述从机11功能代码1 10存储设置点DATA STARTING address 2 11 80设置点地址1180 NUMBER OF setpoint 2 00 02 2设置点CRC 2 45 B6 CRC由从机GE Multilin 469电机管理继电器6-9 6计算通信6.2 MODBUS功能6 6.2.9功能代码16:执行命令某些PLC可能不支持使用功能代码5执行命令,但支持使用功能码16存储多个设置点。要使用功能代码16(10H)执行此操作,必须同时向469写入特定的命令序列。序列包括:命令功能寄存器、命令操作寄存器和命令数据(如果需要)。命令函数寄存器必须写入值5,表示请求执行操作。然后,命令操作寄存器必须写入内存映射中显示的命令列表中的有效命令操作编号。如果命令操作需要数据,则必须使用有效数据写入命令数据寄存器。所选命令将在收到有效传输后立即执行。消息格式和示例:对469(操作代码1)执行重置6.2.10错误响应当469检测到CRC错误以外的错误时,将向主机发送响应。功能码字节的MSbit将被设置为1(即,从从机发送的功能码将等于从主机发送的功能代码加上128)。以下字节将是一个异常代码,指示发生的错误类型。469将忽略从具有CRC错误的主机接收的传输。从机对错误(CRC错误除外)的响应为:•从机地址:1字节•功能代码:1字节(MSbit设置为1)•异常代码:1个字节•CRC:2字节469实现以下异常响应代码。01:非法功能传输的功能代码不是469支持的功能之一。02:非法数据地址主机发送的数据字段中引用的地址不是469的允许地址。03:非法数据值主机传输的数据字段中引用的值不在所选数据地址的范围内。主传输:字节示例/描述从机11的从机地址1 0B消息功能代码1 10存储设置点数据起始地址2 00 80设置点地址0080设置点数量2 00 02 2个设置点(总共4字节)字节计数1 04 2寄存器=4字节命令功能2 00 05地址0080命令操作2 00 01地址0081 CRC 2 0B D6 CRC数据主从机响应:BYTES示例/描述从机11的从机地址1 0B响应消息功能代码1 10存储设置点数据起始地址2 00 80设置点地址0080设置点数量2 00 02 2个设置点(总共4字节)CRC 2 40 8A由从机6-10 469电机管理继电器GE Multilin 6.3存储器映射6通信6 6.3存储器映射6.3.1存储器映射计算信息469中存储的数据分为设定值和实际值。设置点可由主计算机读取和写入。实际值为只读。所有设定值和实际值存储为双字节值。也就是说,每个寄存器地址都是两字节值的地址。地址以十六进制列出。数据值(设定点范围、增量、出厂值)以十进制表示。许多Modbus通信驱动程序将40001d添加到寄存器地址的实际地址。例如:如果要读取地址0h,则40001d将是Modbus通信驱动程序所需的地址;如果要读取地址320h(800d),则40801d将是Modbus通信驱动程序所需的地址。6.3.2用户自定义内存映射区469具有一个强大的功能,称为用户
After the transmission in this example is complete, 469 slave 11 will have the following Setpoints information stored: Address Data 1180 01F4 1181 01DE MASTER TRANSMISSION: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B message for slave 11 FUNCTION CODE 1 10 store setpoints DATA STARTING ADDRESS 2 11 80 setpoint address 1180 NUMBER OF SETPOINTS 2 00 02 2 setpoints (4 bytes total) BYTE COUNT 1 04 4 bytes of data DATA 1 2 01 F4 data for address 1180 DATA 2 2 01 DE data for address 1181 CRC 2 DB B1 CRC calculated by the master SLAVE RESPONSE: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B response message from slave 11 FUNCTION CODE 1 10 store setpoints DATA STARTING ADDRESS 2 11 80 setpoint address 1180 NUMBER OF SETPOINTS 2 00 02 2 setpoints CRC 2 45 B6 CRC calculated by the slave GE Multilin 469 Motor Management Relay 6-9 6 COMMUNICATIONS 6.2 MODBUS FUNCTIONS 6 6.2.9 FUNCTION CODE 16: PERFORMING COMMANDS Some PLCs may not support execution of commands using function code 5 but do support storing multiple setpoints using function code 16. To perform this operation using function code 16 (10H), a certain sequence of commands must be written at the same time to the 469. The sequence consists of: command function register, command operation register and command data (if required). The command function register must be written with the value of 5 indicating an execute operation is requested. The command operation register must then be written with a valid command operation number from the list of commands shown in the memory map. The command data registers must be written with valid data if the command operation requires data. The selected command will execute immediately upon receipt of a valid transmission. MESSAGE FORMAT AND EXAMPLE: Perform a reset on 469 (operation code 1) 6.2.10 ERROR RESPONSES When an 469 detects an error other than a CRC error, a response will be sent to the master. The MSbit of the Function Code byte will be set to 1 (i.e. the function code sent from the slave will be equal to the function code sent from the master plus 128). The following byte will be an exception code indicating the type of error that occurred. Transmissions received from the master with CRC errors will be ignored by the 469. The slave response to an error (other than CRC error) will be: • SLAVE ADDRESS: 1 byte • FUNCTION CODE: 1 byte (with MSbit set to 1) • EXCEPTION CODE: 1 byte • CRC: 2 bytes The 469 implements the following exception response codes. 01: ILLEGAL FUNCTION The function code transmitted is not one of the functions supported by the 469. 02: ILLEGAL DATA ADDRESS The address referenced in the data field transmitted by the master is not an allowable address for the 469. 03: ILLEGAL DATA VALUE The value referenced in the data field transmitted by the master is not within range for the selected data address. MASTER TRANSMISSION: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B message for slave 11 FUNCTION CODE 1 10 store setpoints DATA STARTING ADDRESS 2 00 80 setpoint address 0080 NUMBER OF SETPOINTS 2 00 02 2 setpoints (4 bytes total) BYTE COUNT 1 04 2 registers = 4 bytes COMMAND FUNCTION 2 00 05 data for address 0080 COMMAND OPERATION 2 00 01 data for address 0081 CRC 2 0B D6 CRC calculated by the master SLAVE RESPONSE: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B response message from slave 11 FUNCTION CODE 1 10 store setpoints DATA STARTING ADDRESS 2 00 80 setpoint address 0080 NUMBER OF SETPOINTS 2 00 02 2 setpoints (4 bytes total) CRC 2 40 8A CRC calculated by the slave 6-10 469 Motor Management Relay GE Multilin 6.3 MEMORY MAP 6 COMMUNICATIONS 6 6.3MEMORY MAP 6.3.1 MEMORY MAP INFORMATION The data stored in the 469 is grouped as Setpoints and Actual Values. Setpoints can be read and written by a master computer. Actual Values are read only. All Setpoints and Actual Values are stored as two-byte values. That is, each register address is the address of a two-byte value. Addresses are listed in hexadecimal. Data values (setpoint ranges, increments, factory values) are in decimal. Many Modbus communications drivers add 40001d to the actual address of the register addresses. For example: if address 0h was to be read, 40001d would be the address required by the Modbus communications driver; if address 320h (800d) was to be read, 40801d would be the address required by the Modbus communications driver. 6.3.2 USER-DEFINABLE MEMORY MAP AREA The 469 has a powerful feature, called the User