improvment
This commit is contained in:
parent
1f4656f0b9
commit
c88015ff78
16
README.md
16
README.md
@ -1,5 +1,17 @@
|
||||
## 一、功能
|
||||
|
||||
### 1. Modbus 通信
|
||||
|
||||
|
||||
### 2. 外部通信
|
||||
|
||||
|
||||
### 3. HMI socket 通信
|
||||
|
||||
|
||||
### 4. HMI xService 通信
|
||||
|
||||
|
||||
## 三、相关文件以及路径
|
||||
|
||||
```
|
||||
@ -30,8 +42,8 @@ sys_io_1.cfg
|
||||
|
||||
## 五、待办
|
||||
|
||||
- [ ] socket 断开后触发软急停,并恢复,目的是让所有运动的指令,停止运行防止意外发生
|
||||
- [ ] 外部通信实现
|
||||
-
|
||||
|
||||
## 九、目前存在问题
|
||||
|
||||
-
|
||||
|
8
assets/json/modbus.get_values.json
Normal file
8
assets/json/modbus.get_values.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "modbus.get_values",
|
||||
"data": {
|
||||
"mode": "all"
|
||||
}
|
||||
}
|
12
assets/json/modbus.set_params.json
Normal file
12
assets/json/modbus.set_params.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "modbus.set_params",
|
||||
"data": {
|
||||
"enable_slave": true,
|
||||
"ip": "192.168.0.160",
|
||||
"port": 502,
|
||||
"slave_id": 0,
|
||||
"enable_master": false
|
||||
}
|
||||
}
|
@ -2,9 +2,8 @@
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "safety",
|
||||
"command": "soft_limit.set_params",
|
||||
"data":
|
||||
{
|
||||
"enable": true
|
||||
"data": {
|
||||
"enable": true,
|
||||
"upper": [0,0,0,0,0,0,0],
|
||||
"lower": [0,0,0,0,0,0,0],
|
||||
"reduced_upper": [0,0,0,0,0,0,0],
|
||||
|
@ -75,7 +75,7 @@ def initialization():
|
||||
|
||||
# 打开外部通信
|
||||
clibs.logger.info("配置并打开外部通信,默认服务器,8080端口,后缀为 \"\\r\"...")
|
||||
hr.set_socket_params(True, "", "name", "8080", "\r", 1, True, True, 0, 10)
|
||||
hr.set_socket_params(True, "8080", "\r", 1)
|
||||
|
||||
# 关闭拖动
|
||||
clibs.logger.info("关闭拖动模式...")
|
||||
|
496
code/openapi.py
496
code/openapi.py
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user