Mendix 9.6.1 OPC UA 與S7-1200通訊

一、提前準備

提前下載好相關外掛

OpcUaClientMx9。6。1。v2。0。mpk

Encryption。mpk

二、OPC UA通訊

1、建立專案匯入庫

Mendix 9.6.1 OPC UA 與S7-1200通訊

2、新建module,命名PLC_Module

Mendix 9.6.1 OPC UA 與S7-1200通訊

3、建立PLCput,get資料模型

Mendix 9.6.1 OPC UA 與S7-1200通訊

4、建立URL 常數地址變數Π,命名OPC UA_PLC_URL

Mendix 9.6.1 OPC UA 與S7-1200通訊

5、設定地址變數值:

Mendix 9.6.1 OPC UA 與S7-1200通訊

6、新建page,PLC資料採集頁面選項blank

Mendix 9.6.1 OPC UA 與S7-1200通訊

7、設計頁面選Toolbox,building blocks_Headers background

Mendix 9.6.1 OPC UA 與S7-1200通訊

8、插入資料圖片

Mendix 9.6.1 OPC UA 與S7-1200通訊

9、替換head的頁面

Mendix 9.6.1 OPC UA 與S7-1200通訊

10、建立寫入PLC 資料表片段連線背景實體資料put_PLC、使用資料網格

Mendix 9.6.1 OPC UA 與S7-1200通訊

二、新建微流寫入plc

Mendix 9.6.1 OPC UA 與S7-1200通訊

1、建立專案物件create object

Mendix 9.6.1 OPC UA 與S7-1200通訊

2選擇OpcUAclientMX_OPCuaserverCg

Mendix 9.6.1 OPC UA 與S7-1200通訊

3、新建變數URL:

Mendix 9.6.1 OPC UA 與S7-1200通訊

4、選擇寫入資料write

Mendix 9.6.1 OPC UA 與S7-1200通訊

5、設定write

Mendix 9.6.1 OPC UA 與S7-1200通訊

6、設定Node ID

Mendix 9.6.1 OPC UA 與S7-1200通訊

7、設定變數

Mendix 9.6.1 OPC UA 與S7-1200通訊

8、提交資料

Mendix 9.6.1 OPC UA 與S7-1200通訊

9、關閉頁面

Mendix 9.6.1 OPC UA 與S7-1200通訊

10、APP演示

Mendix 9.6.1 OPC UA 與S7-1200通訊

Mendix 9.6.1 OPC UA 與S7-1200通訊

二、讀取PLC

1、因為本次案例讀取的相同的OPC伺服器對上一個微流區域性進行打包成子微流

Mendix 9.6.1 OPC UA 與S7-1200通訊

1新建微流Read_get_PLC_

Mendix 9.6.1 OPC UA 與S7-1200通訊

2、提交表格連結微流

Mendix 9.6.1 OPC UA 與S7-1200通訊

字串取值

Mendix 9.6.1 OPC UA 與S7-1200通訊

補充;可以去掉搜尋

Mendix 9.6.1 OPC UA 與S7-1200通訊

yu