HESG447271R2工控自动化卡件
(字18)远程EGD交换–交换数据长度:字18包含要写入远程EGD设备的交换数据的长度(以字节为单位)。交换数据长度不得超过1400字节或PLC中所选内存类型的可用内存量,以较小者为准。(Word 19)远程服务器-网络地址类型:Word 19指定远程PLC地址的格式。单词19必须包含值1。这表示使用每个十进制数字的单独寄存器表示的虚线十进制IP地址。(字20)远程服务器-网络地址长度:字20指定此COMMREQ命令块中远程PLC IP地址的字长度。单词20必须包含4。(字21-24)远程服务器-IP地址:字21-24指定要访问的远程PLC的小数点IP地址的四个整数,每个字一个整数。PAC系统™ RX3i和RSTi EP TCP/IP以太网通信用户手册第6节GFK-2224Y 2019年8月编程EGD命令124 6.9屏蔽写入EGD交换(4004)屏蔽写入EGE交换命令可用于在远程生产者节点中的配置以太网全局数据交换的单个字节中写入一个或多个位。EGD协议禁止写入消耗的交换机。该命令可发送至PACSystems PLC和其他EGD 2类设备。在PACSystems PLC中,写入EGD交换会修改配置为在交换中以指定偏移传输的PLC参考存储器位置。因此,将更新当前流程数据,而不是上次在交换中传输的数据。6.9.1屏蔽写入EGD交换命令块字偏移值描述字1命令数据块的长度总是17字2 0总是0(无等待模式请求)字3(参见字9和字10的表被忽略。字10将0或1写入所选位。设置字9中位掩码所选位的值。(续…)进一步考虑存储器位置1-11(字7)EGD命令编号:字7请求发生屏蔽写EGD交换操作。如果该命令被成功处理,将导致指定EGD交换的数据位从客户端写入服务器。(Word 8)命令重试时间:Word 8指定传输命令时以太网接口在重试之间等待的时间(以毫秒为单位)。总共将尝试四次发送命令。如果在四次尝试之后(即四次重试时间值之后)没有收到响应,则COMMREQ状态字中将返回错误状态。如果命令重试指定为零,则使用默认值1秒。(字9)位掩码:字9-10指定要写入远程EGD交换机的单个数据。位掩码和数据的使用在下面的屏蔽写入EGD交换位掩码和位数据中描述。(最低有效字)EGD交换ID字15远程交换ID(最高有效字)字16远程交换偏移字节偏移(基于0)在应读取的交换中。Word 17网络地址类型必须为1。表示将使用IP地址。字18 IP地址的网络地址长度必须为4。不允许使用组ID(多播)。远程PLC的字19至字22 IP地址四个整数,指定为远程PLC的虚线十进制IP地址的每个字一个整数。
(Word 18) Remote EGD exchange – Exchange Data Length: Word 18 contains the length (in bytes) of the exchange data to be written to the remote EGD device. The exchange data length may not exceed 1400 bytes or the amount of memory available in the PLC for the selected memory type, whichever is less. (Word 19) Remote Server - Network Address Type: Word 19 specifies the format of the remote PLC address. Word 19 must contain the value 1. This indicates a dotted-decimal IP address expressed using a separate register for each decimal digit. (Word 20) Remote Server - Network Address Length: Word 20 specifies the length in words of the remote PLC IP address in this COMMREQ Command Block. Word 20 must contain 4. (Words 21 – 24) Remote Server - IP Address: Words 21–24 specify the four integers, one integer per word, of the dotted-decimal IP address of the remote PLC to be accessed. PACSystems™ RX3i and RSTi-EP TCP/IP Ethernet Communications User Manual Section 6 GFK-2224Y August 2019 Programming EGD Commands 124 6.9 Masked Write to EGD Exchange (4004) The Masked Write to EGD Exchange command can be used to write one or more bits in a single byte of a configured Ethernet Global Data exchange in a remote producer node. EGD protocol prohibits writing to a consumed exchange. This command can be sent to PACSystems PLCs and to other EGD Class 2 devices. In a PACSystems PLC, writing an EGD exchange modifies the PLC reference memory locations configured to be transferred at the specified offset in the exchange. Thus, current process data will be updated, not the data that was transferred last in the exchange. 6.9.1 Masked Write EGD Exchange Command Block Word Offset Value Description Word 1 Length of command data block Always 17 Word 2 0 Always 0 (no-wait mode request) Word 3 (See table of Word 9 and Word 10 are ignored. Word 10 Write 0 or 1 to selected bit. Value to set the bit selected by the bit mask in Word 9. (Continued …) Further Consideration of Memory Locations 1-11 (Word 7) EGD Command Number: Word 7 requests that a masked write EGD exchange operation occur. If the command is processed successfully, it will result in a data bit for a specified EGD exchange being written from the client to the server. (Word 8) Command Retry Time: Word 8 specifies the time (in milliseconds) the Ethernet interface will wait between retries when transferring the command. A total of four tries will be made to send the command. If no response is received after the four tries (i.e. after four times the retry time value), an error status will be returned in the COMMREQ status word. If the command retry is specified as zero, the default value of one second is used. (Word 9) Bit Mask: Words 9 – 10 specify the individual data to be written to the remote EGD exchange. The usage of the Bit Mask and Data are described in Masked Write to EGD Exchange Bit Mask and Data Bits, below. (least significant word) EGD Exchange ID Word 15 Remote Exchange ID (most significant word) Word 16 Remote Exchange Offset Byte offset (0-based) in the exchange that should be read. Word 17 Network address type Must be 1. Indicates an IP address will be used. Word 18 Network address length Must be 4 for IP address. Group ID (multicast) is not permitted. Word 19 to Word 22 IP Address of the remote PLC Four integers, specified as one integer per word of the dotted-decimal IP address of the remote PLC.