一、硬件环境
1、海创Box智能网关
2、西门子PLC (ST20 S7-200)
20190319201137.png
二、产品连接方式
20190319201459.png
三、产品配置
奥迈智能网关 请参考《奥迈智能网关设置》
**西门子PLC ** (ST20 S7-200) 配置好设备连接ip
20190319201554.png
20190319202130.png
四、项目部署调试
打开海创-IIoT。本次教程需要用到如下节点,在左侧节点栏中拖拽出使用
定时器周期性触发输入时间戳或者相应的字符
20190319202403.png
S7西门子用于读取S7西门子通信协议的设备数据
20190319202428.png
调试用于调试节点输出
20190319202446.png
配置相应节点后配置界面如下:
20190319202520.png
节点配置:
定时器设置成周期性触发,主要当触发流程使用,具体配置如下图
20190319202810.png
S7西门子设置如下配置,即可取到M区0.1的地址数据
20190319202849.png
20190319202940.png
调试在右侧调试窗口输出调试结果,无需配置
部署调试:
按照以上教程配置好流程后,点击部署,部署成功后程序开始运行,就会在调试窗口输出相应的结果,调试结果如下
20190319203021.png
[
{
"id": "3c9559.b5d63aa8",
"type": "iot-s7",
"z": "41f61d2.fbe09e4",
"name": "",
"server": "f0605fb0.3a733",
"columns": [
{
"Key": "2号跑马灯",
"Label": "2号跑马灯",
"Address": "M0.2",
"Arithmetic": ""
}
],
"x": 340,
"y": 380,
"wires": [
[
"1fa324c1.eb258b"
]
]
},
{
"id": "1421da2b.ec0216",
"type": "inject",
"z": "41f61d2.fbe09e4",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 240,
"y": 380,
"wires": [
[
"3c9559.b5d63aa8"
]
]
},
{
"id": "1fa324c1.eb258b",
"type": "debug",
"z": "41f61d2.fbe09e4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 480,
"y": 380,
"wires": []
},
{
"id": "f0605fb0.3a733",
"type": "iot-s7-client",
"z": "",
"name": "",
"communicate": "TCP",
"host": "192.168.7.163",
"post": "102",
"baudrate": "9600",
"databits": "8",
"stopbits": "1",
"parity": "None",
"expand": {},
"connmode": "tsap",
"rack": "0",
"slot": "2",
"localtsaphi": "10",
"localtsaplo": "00",
"remotetsaphi": "03",
"remotetsaplo": "00",
"verbose": "default"
}
]