【正文】
the PLC with an SendRRData encapsulation mand, they have to be routed via the Connection Manager object of the 1756ENET module, . embedded like this: Service: CM_Unconnected_Send (0x52) Path: Connection Manager (class 0x06, instance 1) encoded timeout, embedded message Path: Port 1(back plane), Link (slot of PLC). This embedded message reads a tag named ?TEST?: Service: CIP_Read_Data (0x4C) Path: ?TEST? (ANSI extended symbol segment) Elements: UINT 1 On success the interface forwards the reply from the PLC, the Connection Manager bees transparent: Service: CIP_Read_DataReply (0xCC) Response: CA 00 00 80 38 3B = REAL The CIP_Write_Data service (0x53) allows modification of tags on the PLC via similar embedding. In contrast to other munication protocols, no change to the ladder logic is required! The CIP Read/Write services can access all controller tags with no need to previously mark them as “published” or “consumed” in the PLC programming software. This includes access to I/O modules: The first channel of an analog input module in slot 1 is available as “Local:1:”. This type of transfer is called explicit unconnected messaging, because the tag name is explicitly mentioned and each packet is individually routed. For connected messaging, the Message Router on the PLC is instructed to open a connection: Service: CM_Forward_Open (0x54 Path: Connection Manager (class 0x06, instance 1) timeout, connection ID, update interval, … Connection Path: Port 1, Link 0 (back plane, PLC slot), Message Router (class 0x02, instance 1) The reply provides a serial number. The CIP_Read_Data requests can now be sent as connected messages with SendUnitData encapsulation, prefixed by a sequence number, without embedding them in a routing CM_Unconnected_Send message. 4 DESIGN DECISIONS Unconnected messaging is used since the advantages of connected messaging do not transfer from ControlNet to EtherNet/IP: Ether does not reserve bandwidth。 各明確信息的標簽傳輸信息是雙向的請求。交換網(wǎng)絡拓撲結(jié)構(gòu)也使網(wǎng)絡的不確定性減到了最小。 EPICS 使用起來很方便。 整個 BOOL 數(shù)組傳輸時間平均是在 15ms 內(nèi),所有 REAL 的 數(shù)組傳輸了 25ms,以便于記錄能更容易地在選定的掃瞄速率上更新。 而當使用普通設置時,輸入輸出控制器 (IOC)配置了 352個二進制的輸入記錄,以 10Hz掃描一個 BOOL 數(shù)組的元素。其它辦公室個人計算機和 Linux 文件服務器連接到同樣的集線器上。 以上情況在 PPC 和奔騰輸入輸出控制器 (IOC)68K 上都作了測試。 這樣會出現(xiàn)一個問題,以 BOOL 數(shù)組為例,他們會被作為 DINT 值傳輸。 對于輸出記錄, 每當記錄被處理時,驅(qū)動都將發(fā)送一個 CIP_Write_Data 消息。這樣就決定了傳送時間會大量減少,但 可能會產(chǎn)生其他作用:每當輸出改變的記錄超過一個元素時,輸入輸出控制器 (IOC)總將重寫整個數(shù)組??梢蕴幚淼?PLC 數(shù)據(jù)類型包括 BOOL、 SINT、 INT、 DINT 和 REAL。 5 EPICS 技術(shù)支持的實施 根據(jù)請求的更新率, vxWorks 驅(qū)動代碼針對各個 PLC 在掃瞄列表中都安排了標簽名。對于 CIP_Read_Data 請求,比起關聯(lián)信息,無關聯(lián)信息有效地壓縮了信息,并且在傳輸中提高了 3%的速率。 這種類型的傳輸稱為明確無關聯(lián)傳輸,因為標簽名被明確地提出,各個協(xié)議包是單獨尋址。 與此同時, AB 公司針對 ControlLogix 推出了新的 CIP 服務編碼,包括使用 CIP 路徑來命名梯形圖邏輯標簽、單獨使用讀寫的服務代碼以及結(jié)合了傳輸二進制數(shù)據(jù)格式而使用的一些傳輸協(xié)議。雖然他們封裝方式不同,但都可以通過默認的 TCP協(xié)議進行連接。 版本引入了數(shù)據(jù)包的 TCP/IP 封裝,而代替了基于以太網(wǎng)( IP/UDP/TCP)的物理層和數(shù)據(jù)鏈路層,最終形成“基于以太網(wǎng)的 ControlNet”,稱為 EtherNet/IP。通過集成這些 EPICS 加速器控制系統(tǒng)和輸入輸出控制器 (IOC),系統(tǒng)可以直接進行讀取和寫入PLC 數(shù)據(jù)。 ControlLogix 以太網(wǎng)連接模塊“ 1756ENET”使用了 EtherNet/IP、 ControlNet 等協(xié)議,并采用了專業(yè)的服務代碼封裝于以太網(wǎng)協(xié)議包中。針對“實驗性物理和工業(yè)控制系統(tǒng)” (EPICS)開發(fā)的驅(qū)動程 序使用了EtherNet/IP 協(xié)議,從而使得控制器可以運行 vxWorks RTOS、 Win32 和 Unix/Linux 的測試程序。有了輸入輸出控制器 (IOC), Unix 或 Win32 系統(tǒng)的計算機和所有裝有以太網(wǎng)連接口的個人計算機都可以對 PLC 進行編程,但它同時要求必須使用 相同的技術(shù)來傳輸 PLC 數(shù)據(jù)。默認地,使用 TCP/IP 的端口 0xAF12 連接到EtherNet/IP 目標之后,遵循封裝協(xié)議建立一個身份 ID,就可以直接進行信息交換了。 3 CONTROLLOGIX 的以太網(wǎng)接口 ControlLogix 系列 PLC 使用 ControlNet 總線來聯(lián)接本地 I/O 板卡作為平臺,1756ENET 以太網(wǎng)模塊支持 EtherNet/IP。 使用 SendRRData 封裝命令來發(fā)送 CIP 數(shù)據(jù)到 PLC,必須通過連接管理器對象1756ENET 模