INIT
This commit is contained in:
parent
17ea63fa90
commit
35884b2247
167
.gitignore
vendored
167
.gitignore
vendored
@ -1,162 +1,7 @@
|
||||
# ---> Python
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
.pdm.toml
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
.idea/
|
||||
__pycache__
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
code/__pycache__
|
||||
code/testbench.py
|
||||
assets/logs/
|
||||
assets/configs/io_device_XBC_*
|
38
README.md
38
README.md
@ -1,3 +1,37 @@
|
||||
# APIs
|
||||
## 一、功能
|
||||
|
||||
## 三、相关文件以及路径
|
||||
|
||||
```
|
||||
========================================================================
|
||||
/home/luoshi/bin/controller/user_settings/
|
||||
/home/luoshi/bin/controller/interactive_data/XMC12-R1300-W7G3B1C/
|
||||
registers.xml
|
||||
registers.json
|
||||
fieldbus_device.json
|
||||
io_device_XBC_XMATE_ROKAE_RSC_1
|
||||
io_device_XBC_XMATE_ROKAE_MINI_1
|
||||
io_device_XBC_5_ROKAE_RSC_1
|
||||
io_device_XBC_5_ROKAE_MINI_1
|
||||
========================================================================
|
||||
/home/luoshi/bin/controller/interactive_data/XMC12-R1300-W7G3B1C/
|
||||
sys_io_1.cfg
|
||||
========================================================================
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 四、寄存器功能码规划
|
||||
|
||||
- 40000~40499:只读寄存器
|
||||
- 40500~40999:只写寄存器
|
||||
- 41000~41100:自定义只读寄存器
|
||||
|
||||
|
||||
## 五、待办
|
||||
|
||||
- [ ] socket 断开后触发软急停,并恢复,目的是让所有运动的指令,停止运行防止意外发生
|
||||
- [ ] 外部通信实现
|
||||
|
||||
## 九、目前存在问题
|
||||
|
||||
根据rokae confluence上的接口规范,实现的自用API接口工具
|
75
assets/configs/fieldbus_device.json
Normal file
75
assets/configs/fieldbus_device.json
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"device_list": [
|
||||
{
|
||||
"enable": true,
|
||||
"endian": 1,
|
||||
"extend_attr": {
|
||||
"RTU": {
|
||||
"serial_name": ""
|
||||
},
|
||||
"TCP": {
|
||||
"ip": "0.0.0.0",
|
||||
"port": 502
|
||||
},
|
||||
"coils": {
|
||||
"max_num": 16,
|
||||
"start_addr": 0
|
||||
},
|
||||
"discrete_input": {
|
||||
"max_num": 16,
|
||||
"start_addr": 0
|
||||
},
|
||||
"hold_register": {
|
||||
"max_num": 2000,
|
||||
"start_addr": 40000
|
||||
},
|
||||
"input_register": {
|
||||
"max_num": 2000,
|
||||
"start_addr": 4000
|
||||
},
|
||||
"protol_type": "TCP",
|
||||
"slaver_id": 1
|
||||
},
|
||||
"mode": "slaver",
|
||||
"name": "autotest",
|
||||
"type": "MODBUS"
|
||||
}
|
||||
],
|
||||
"support_types": [
|
||||
{
|
||||
"device_type": "MODBUS",
|
||||
"support_mode": {
|
||||
"master": 10,
|
||||
"slaver": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"device_type": "CCLINK",
|
||||
"support_mode": {
|
||||
"master": 0,
|
||||
"slaver": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"device_type": "ETHERCAT",
|
||||
"support_mode": {
|
||||
"master": 0,
|
||||
"slaver": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"device_type": "PROFINET",
|
||||
"support_mode": {
|
||||
"master": 0,
|
||||
"slaver": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"device_type": "EtherNetIP",
|
||||
"support_mode": {
|
||||
"master": 0,
|
||||
"slaver": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
472
assets/configs/registers.json
Normal file
472
assets/configs/registers.json
Normal file
@ -0,0 +1,472 @@
|
||||
{
|
||||
"MODBUS": [
|
||||
{
|
||||
"property": {
|
||||
"device_name": "autotest",
|
||||
"endian": 1
|
||||
},
|
||||
"regs": {
|
||||
"rd": [
|
||||
{
|
||||
"addr": 40000,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_clear_alarm",
|
||||
"len": 1,
|
||||
"name": "r_clear_alarm",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40001,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_estop_reset",
|
||||
"len": 1,
|
||||
"name": "r_estop_reset",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40002,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_estop_reset_clear_alarm",
|
||||
"len": 1,
|
||||
"name": "r_onekey_reset",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40003,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_motor_off",
|
||||
"len": 1,
|
||||
"name": "r_motor_off",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40004,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_motor_on",
|
||||
"len": 1,
|
||||
"name": "r_motor_on",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40005,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_motoron_pptomain_start",
|
||||
"len": 1,
|
||||
"name": "r_onekey_start",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40006,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_motoron_start",
|
||||
"len": 1,
|
||||
"name": "r_motoron_start",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40007,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_pause_motoroff",
|
||||
"len": 1,
|
||||
"name": "r_pause_motoroff",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40008,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_pptomain",
|
||||
"len": 1,
|
||||
"name": "r_pp2main",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40009,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_program_start",
|
||||
"len": 1,
|
||||
"name": "r_prog_start",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40010,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_program_stop",
|
||||
"len": 1,
|
||||
"name": "r_prog_stop",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40011,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_reduced_mode",
|
||||
"len": 1,
|
||||
"name": "r_reduced_mode",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40012,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_soft_estop",
|
||||
"len": 1,
|
||||
"name": "r_soft_estop",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40013,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_switch_auto_motoron",
|
||||
"len": 1,
|
||||
"name": "r_auto_motoron",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40014,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_switch_operation_auto",
|
||||
"len": 1,
|
||||
"name": "r_switch_auto",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40015,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "ctrl_switch_operation_manu",
|
||||
"len": 1,
|
||||
"name": "r_switch_manual",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40016,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "enable_safe_region01",
|
||||
"len": 1,
|
||||
"name": "r_safe_region01",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40017,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "enable_safe_region02",
|
||||
"len": 1,
|
||||
"name": "r_safe_region02",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40018,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "enable_safe_region03",
|
||||
"len": 1,
|
||||
"name": "r_safe_region03",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"rdwr": [
|
||||
{
|
||||
"addr": 40500,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_alarm",
|
||||
"len": 1,
|
||||
"name": "w_alarm_state",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40501,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_collision",
|
||||
"len": 1,
|
||||
"name": "w_clsn_alarm_stat",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40502,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_collision_open",
|
||||
"len": 1,
|
||||
"name": "w_clsn_open_stat",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40503,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_controller_is_running",
|
||||
"len": 1,
|
||||
"name": "w_controller_running",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40504,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_encoder_low_battery",
|
||||
"len": 1,
|
||||
"name": "w_encoder_low",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40505,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_estop",
|
||||
"len": 1,
|
||||
"name": "w_estop_stat",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40506,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_motor",
|
||||
"len": 1,
|
||||
"name": "w_motor_stat",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40507,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_operation_mode",
|
||||
"len": 1,
|
||||
"name": "w_operation_mode",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40508,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_program",
|
||||
"len": 1,
|
||||
"name": "w_prog_stat",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40509,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_program_not_run",
|
||||
"len": 1,
|
||||
"name": "w_prog_not_run",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40510,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_program_reset",
|
||||
"len": 1,
|
||||
"name": "w_prog_reset",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40511,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_reduced_mode",
|
||||
"len": 1,
|
||||
"name": "w_reduced_mode_stat",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40512,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_robot_is_busy",
|
||||
"len": 1,
|
||||
"name": "w_robot_is_busy",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40513,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_robot_moving",
|
||||
"len": 1,
|
||||
"name": "w_robot_moving",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40514,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_safe_door",
|
||||
"len": 1,
|
||||
"name": "w_safe_door",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40515,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_safe_region01",
|
||||
"len": 1,
|
||||
"name": "w_safe_region01",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40516,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_safe_region02",
|
||||
"len": 1,
|
||||
"name": "w_safe_region02",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40517,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_safe_region03",
|
||||
"len": 1,
|
||||
"name": "w_safe_region03",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"addr": 40518,
|
||||
"addr_1st": 0,
|
||||
"addr_2nd": 0,
|
||||
"bit_bias": 0,
|
||||
"byte_bias": 0,
|
||||
"function": "sta_soft_estop",
|
||||
"len": 1,
|
||||
"name": "w_soft_estop_stat",
|
||||
"retain": false,
|
||||
"type": "bool"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
725
assets/configs/registers.xml
Normal file
725
assets/configs/registers.xml
Normal file
@ -0,0 +1,725 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<m>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40000"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40000"/>
|
||||
<c name="function" type="10" value="ctrl_clear_alarm"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_clear_alarm"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40001"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40001"/>
|
||||
<c name="function" type="10" value="ctrl_estop_reset"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_estop_reset"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40002"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40002"/>
|
||||
<c name="function" type="10" value="ctrl_estop_reset_clear_alarm"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_onekey_reset"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40003"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40003"/>
|
||||
<c name="function" type="10" value="ctrl_motor_off"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_motor_off"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40004"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40004"/>
|
||||
<c name="function" type="10" value="ctrl_motor_on"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_motor_on"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40005"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40005"/>
|
||||
<c name="function" type="10" value="ctrl_motoron_pptomain_start"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_onekey_start"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40006"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40006"/>
|
||||
<c name="function" type="10" value="ctrl_motoron_start"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_motoron_start"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40007"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40007"/>
|
||||
<c name="function" type="10" value="ctrl_pause_motoroff"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_pause_motoroff"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40008"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40008"/>
|
||||
<c name="function" type="10" value="ctrl_pptomain"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_pp2main"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40009"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40009"/>
|
||||
<c name="function" type="10" value="ctrl_program_start"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_prog_start"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40010"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40010"/>
|
||||
<c name="function" type="10" value="ctrl_program_stop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_prog_stop"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40011"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40011"/>
|
||||
<c name="function" type="10" value="ctrl_reduced_mode"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_reduced_mode"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40012"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40012"/>
|
||||
<c name="function" type="10" value="ctrl_soft_estop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_soft_estop"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40013"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40013"/>
|
||||
<c name="function" type="10" value="ctrl_switch_auto_motoron"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_auto_motoron"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40014"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40014"/>
|
||||
<c name="function" type="10" value="ctrl_switch_operation_auto"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_switch_auto"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40015"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40015"/>
|
||||
<c name="function" type="10" value="ctrl_switch_operation_manu"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_switch_manual"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40016"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40016"/>
|
||||
<c name="function" type="10" value="enable_safe_region01"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_safe_region01"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40017"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40017"/>
|
||||
<c name="function" type="10" value="enable_safe_region02"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_safe_region02"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40018"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40018"/>
|
||||
<c name="function" type="10" value="enable_safe_region03"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_safe_region03"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40500"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40500"/>
|
||||
<c name="function" type="10" value="sta_alarm"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_alarm_state"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40501"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40501"/>
|
||||
<c name="function" type="10" value="sta_collision"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_clsn_alarm_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40502"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40502"/>
|
||||
<c name="function" type="10" value="sta_collision_open"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_clsn_open_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40503"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40503"/>
|
||||
<c name="function" type="10" value="sta_controller_is_running"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_controller_running"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40504"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40504"/>
|
||||
<c name="function" type="10" value="sta_encoder_low_battery"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_encoder_low"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40505"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40505"/>
|
||||
<c name="function" type="10" value="sta_estop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_estop_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40506"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40506"/>
|
||||
<c name="function" type="10" value="sta_motor"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_motor_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40507"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40507"/>
|
||||
<c name="function" type="10" value="sta_operation_mode"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_operation_mode"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40508"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40508"/>
|
||||
<c name="function" type="10" value="sta_program"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_prog_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40509"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40509"/>
|
||||
<c name="function" type="10" value="sta_program_not_run"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_prog_not_run"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40510"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40510"/>
|
||||
<c name="function" type="10" value="sta_program_reset"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_prog_reset"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40511"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40511"/>
|
||||
<c name="function" type="10" value="sta_reduced_mode"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_reduced_mode_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40512"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40512"/>
|
||||
<c name="function" type="10" value="sta_robot_is_busy"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_robot_is_busy"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40513"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40513"/>
|
||||
<c name="function" type="10" value="sta_robot_moving"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_robot_moving"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40514"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40514"/>
|
||||
<c name="function" type="10" value="sta_safe_door"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_door"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40515"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40515"/>
|
||||
<c name="function" type="10" value="sta_safe_region01"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_region01"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40516"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40516"/>
|
||||
<c name="function" type="10" value="sta_safe_region02"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_region02"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40517"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40517"/>
|
||||
<c name="function" type="10" value="sta_safe_region03"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_region03"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40518"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40518"/>
|
||||
<c name="function" type="10" value="sta_soft_estop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_soft_estop_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value=""/>
|
||||
</l>
|
||||
</m>
|
BIN
assets/configs/系统IO功能对照表.xlsx
Normal file
BIN
assets/configs/系统IO功能对照表.xlsx
Normal file
Binary file not shown.
5
assets/json/collision.get_params.json
Normal file
5
assets/json/collision.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "safety",
|
||||
"command": "collision.get_params"
|
||||
}
|
13
assets/json/collision.set_params.json
Normal file
13
assets/json/collision.set_params.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "safety",
|
||||
"command": "collision.set_params",
|
||||
"data": {
|
||||
"enable": false,
|
||||
"mode": 0,
|
||||
"coeff": [0,0,0,0,0,0,0],
|
||||
"coeff_level": 0,
|
||||
"action": 1,
|
||||
"percent": 1
|
||||
}
|
||||
}
|
7
assets/json/collision.set_state.json
Normal file
7
assets/json/collision.set_state.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"module": "safety",
|
||||
"command": "collision.set_state",
|
||||
"data": {
|
||||
"collision_state": false
|
||||
}
|
||||
}
|
5
assets/json/controller.get_params.json
Normal file
5
assets/json/controller.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id":"xxxxxxxxxxx",
|
||||
"module":"system",
|
||||
"command":"controller.get_params"
|
||||
}
|
5
assets/json/controller.heart.json
Normal file
5
assets/json/controller.heart.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "controller.heart"
|
||||
}
|
8
assets/json/controller.reboot.json
Normal file
8
assets/json/controller.reboot.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "controller.reboot",
|
||||
"data": {
|
||||
"arg": 6
|
||||
}
|
||||
}
|
8
assets/json/controller.set_params.json
Normal file
8
assets/json/controller.set_params.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "controller.set_params",
|
||||
"data": {
|
||||
"time": "2020-02-28 15:28:30"
|
||||
}
|
||||
}
|
5
assets/json/device.get_params.json
Normal file
5
assets/json/device.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "device.get_params"
|
||||
}
|
8
assets/json/diagnosis.get_params.json
Normal file
8
assets/json/diagnosis.get_params.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "robot",
|
||||
"command": "diagnosis.get_params",
|
||||
"data": {
|
||||
"version": "1.4.1"
|
||||
}
|
||||
}
|
12
assets/json/diagnosis.open.json
Normal file
12
assets/json/diagnosis.open.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "robot",
|
||||
"command": "diagnosis.open",
|
||||
"data": {
|
||||
"open": false,
|
||||
"display_open": false,
|
||||
"overrun": false,
|
||||
"turn_area": false,
|
||||
"delay_motion": false
|
||||
}
|
||||
}
|
8
assets/json/diagnosis.save.json
Normal file
8
assets/json/diagnosis.save.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "robot",
|
||||
"command": "diagnosis.save",
|
||||
"data": {
|
||||
"save": true
|
||||
}
|
||||
}
|
10
assets/json/diagnosis.set_params.json
Normal file
10
assets/json/diagnosis.set_params.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "robot",
|
||||
"command": "diagnosis.set_params",
|
||||
"data": {
|
||||
"display_pdo_params": [],
|
||||
"frequency": 50,
|
||||
"version": "1.4.1"
|
||||
}
|
||||
}
|
5
assets/json/drag.get_params.json
Normal file
5
assets/json/drag.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "dynamic",
|
||||
"command": "drag.get_params"
|
||||
}
|
10
assets/json/drag.set_params.json
Normal file
10
assets/json/drag.set_params.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "dynamic",
|
||||
"command": "drag.set_params",
|
||||
"data": {
|
||||
"enable": true,
|
||||
"space": 0,
|
||||
"type": 0
|
||||
}
|
||||
}
|
5
assets/json/fieldbus_device.get_params.json
Normal file
5
assets/json/fieldbus_device.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "fieldbus_device.get_params"
|
||||
}
|
8
assets/json/fieldbus_device.load_cfg.json
Normal file
8
assets/json/fieldbus_device.load_cfg.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "fieldbus_device.load_cfg",
|
||||
"data": {
|
||||
"file_name": "fieldbus_device.json"
|
||||
}
|
||||
}
|
9
assets/json/fieldbus_device.set_params.json
Normal file
9
assets/json/fieldbus_device.set_params.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "fieldbus_device.set_params",
|
||||
"data": {
|
||||
"device_name": "modbus_1",
|
||||
"enable": true
|
||||
}
|
||||
}
|
5
assets/json/io_device.load_cfg.json
Normal file
5
assets/json/io_device.load_cfg.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "io",
|
||||
"command": "io_device.load_cfg"
|
||||
}
|
5
assets/json/jog.get_params.json
Normal file
5
assets/json/jog.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "jog.get_params"
|
||||
}
|
10
assets/json/jog.set_params.json
Normal file
10
assets/json/jog.set_params.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "jog.set_params",
|
||||
"data": {
|
||||
"step": 1000,
|
||||
"override": 0.2,
|
||||
"space": 5
|
||||
}
|
||||
}
|
10
assets/json/jog.start.json
Normal file
10
assets/json/jog.start.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "jog.start",
|
||||
"data": {
|
||||
"index": 0,
|
||||
"direction": true,
|
||||
"is_ext": false
|
||||
}
|
||||
}
|
8
assets/json/log_code.data.code_list.json
Normal file
8
assets/json/log_code.data.code_list.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "log_code.data.code_list",
|
||||
"s": {
|
||||
"log_code.data": {
|
||||
"code_list": []
|
||||
}
|
||||
}
|
||||
}
|
5
assets/json/log_code.data.json
Normal file
5
assets/json/log_code.data.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"g": {
|
||||
"log_code.data": "null"
|
||||
}
|
||||
}
|
5
assets/json/modbus.get_params.json
Normal file
5
assets/json/modbus.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "modbus.get_params"
|
||||
}
|
8
assets/json/modbus.load_cfg.json
Normal file
8
assets/json/modbus.load_cfg.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "modbus.load_cfg",
|
||||
"data": {
|
||||
"file" : "registers.json"
|
||||
}
|
||||
}
|
5
assets/json/move.get_joint_pos.json
Normal file
5
assets/json/move.get_joint_pos.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.get_joint_pos"
|
||||
}
|
5
assets/json/move.get_monitor_cfg.json
Normal file
5
assets/json/move.get_monitor_cfg.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.get_monitor_cfg"
|
||||
}
|
5
assets/json/move.get_params.json
Normal file
5
assets/json/move.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.get_params"
|
||||
}
|
5
assets/json/move.get_pos.json
Normal file
5
assets/json/move.get_pos.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.get_pos"
|
||||
}
|
5
assets/json/move.get_quickstop_distance.json
Normal file
5
assets/json/move.get_quickstop_distance.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.get_quickstop_distance"
|
||||
}
|
5
assets/json/move.get_quickturn_pos.json
Normal file
5
assets/json/move.get_quickturn_pos.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id" : "xxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.get_quickturn_pos"
|
||||
}
|
8
assets/json/move.quick_turn.json
Normal file
8
assets/json/move.quick_turn.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.quick_turn",
|
||||
"data": {
|
||||
"name":"home"
|
||||
}
|
||||
}
|
8
assets/json/move.set_monitor_cfg.json
Normal file
8
assets/json/move.set_monitor_cfg.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.set_monitor_cfg",
|
||||
"data": {
|
||||
"ref_coordinate": 1
|
||||
}
|
||||
}
|
17
assets/json/move.set_params.json
Normal file
17
assets/json/move.set_params.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.set_params",
|
||||
"data": {
|
||||
"MOTION": {
|
||||
"JOINT_MAX_SPEED": [1.0,0.0,0.0,0.0,0.0,0.0],
|
||||
"JOINT_MAX_ACC": [1.0,0.0,0.0,0.0,0.0,0.0],
|
||||
"JOINT_MAX_JERK": [1.0,0.0,0.0],
|
||||
"TCP_MAX_SPEED": 500,
|
||||
"DEFAULT_ACC_PARAMS": [0.3,1.0],
|
||||
"VEL_SMOOTH_FACTOR": 3.33,
|
||||
"ACC_RAMPTIME_JOG": 0.01
|
||||
}
|
||||
}
|
||||
|
||||
}
|
8
assets/json/move.set_quickstop_distance.json
Normal file
8
assets/json/move.set_quickstop_distance.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.set_quickstop_distance",
|
||||
"data":{
|
||||
"distance": 2
|
||||
}
|
||||
}
|
15
assets/json/move.set_quickturn_pos.json
Normal file
15
assets/json/move.set_quickturn_pos.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"id" : "xxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.set_quickturn_pos",
|
||||
"data": {
|
||||
"enable_home": false,
|
||||
"enable_drag": false,
|
||||
"enable_transport": false,
|
||||
"joint_home": [0.0,0.0,0.0,0.0,0.0,0.0,0.0],
|
||||
"joint_drag": [0.0,0.0,0.0,0.0,0.0,0.0,0.0],
|
||||
"joint_transport": [0.0,0.0,0.0,0.0,0.0,0.0,0.0],
|
||||
"end_posture": 0,
|
||||
"home_error_range":[0.0,0.0,0.0,0.0,0.0,0.0,0.0]
|
||||
}
|
||||
}
|
8
assets/json/move.stop.json
Normal file
8
assets/json/move.stop.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "motion",
|
||||
"command": "move.stop",
|
||||
"data":{
|
||||
"stoptype": 0
|
||||
}
|
||||
}
|
5
assets/json/overview.get_autoload.json
Normal file
5
assets/json/overview.get_autoload.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "overview.get_autoload"
|
||||
}
|
5
assets/json/overview.get_cur_prj.json
Normal file
5
assets/json/overview.get_cur_prj.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "overview.get_cur_prj"
|
||||
}
|
9
assets/json/overview.reload.json
Normal file
9
assets/json/overview.reload.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "overview.reload",
|
||||
"data": {
|
||||
"prj_path": "",
|
||||
"tasks": []
|
||||
}
|
||||
}
|
8
assets/json/overview.set_autoload.json
Normal file
8
assets/json/overview.set_autoload.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "overview.set_autoload",
|
||||
"data": {
|
||||
"autoload_prj_path": ""
|
||||
}
|
||||
}
|
11
assets/json/register.set_value.json
Normal file
11
assets/json/register.set_value.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "fieldbus",
|
||||
"command": "register.set_value",
|
||||
"data": {
|
||||
"name": "",
|
||||
"type": "bool",
|
||||
"bias": 0,
|
||||
"value": 0
|
||||
}
|
||||
}
|
8
assets/json/rl_task.pp_to_main.json
Normal file
8
assets/json/rl_task.pp_to_main.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "rl_task.pp_to_main",
|
||||
"data": {
|
||||
"tasks": []
|
||||
}
|
||||
}
|
8
assets/json/rl_task.run.json
Normal file
8
assets/json/rl_task.run.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "rl_task.run",
|
||||
"data": {
|
||||
"tasks": []
|
||||
}
|
||||
}
|
9
assets/json/rl_task.set_run_params.json
Normal file
9
assets/json/rl_task.set_run_params.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "rl_task.set_run_params",
|
||||
"data": {
|
||||
"loop_mode": true,
|
||||
"override": 1.0
|
||||
}
|
||||
}
|
8
assets/json/rl_task.stop.json
Normal file
8
assets/json/rl_task.stop.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "project",
|
||||
"command": "rl_task.stop",
|
||||
"data": {
|
||||
"tasks": []
|
||||
}
|
||||
}
|
7
assets/json/safety.safety_area.overall_enable.json
Normal file
7
assets/json/safety.safety_area.overall_enable.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"c": {
|
||||
"safety.safety_area.overall_enable": {
|
||||
"enable": true
|
||||
}
|
||||
}
|
||||
}
|
8
assets/json/safety.safety_area.safety_area_enable.json
Normal file
8
assets/json/safety.safety_area.safety_area_enable.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"c": {
|
||||
"safety.safety_area.safety_area_enable": {
|
||||
"id": 0,
|
||||
"enable": true
|
||||
}
|
||||
}
|
||||
}
|
7
assets/json/safety.safety_area.signal_enable.json
Normal file
7
assets/json/safety.safety_area.signal_enable.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"c": {
|
||||
"safety.safety_area.signal_enable": {
|
||||
"signal": true
|
||||
}
|
||||
}
|
||||
}
|
5
assets/json/safety_area_data.json
Normal file
5
assets/json/safety_area_data.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"g": {
|
||||
"safety_area_data": null
|
||||
}
|
||||
}
|
5
assets/json/servo.clear_alarm.json
Normal file
5
assets/json/servo.clear_alarm.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "robot",
|
||||
"command": "servo.clear_alarm"
|
||||
}
|
5
assets/json/socket.get_params.json
Normal file
5
assets/json/socket.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "network",
|
||||
"command": "socket.get_params"
|
||||
}
|
17
assets/json/socket.set_params.json
Normal file
17
assets/json/socket.set_params.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "network",
|
||||
"command": "socket.set_params",
|
||||
"data": {
|
||||
"enable": true,
|
||||
"ip": "",
|
||||
"name": "c1",
|
||||
"port": "8080",
|
||||
"suffix": "\r",
|
||||
"type": 1,
|
||||
"reconnect_flag": false,
|
||||
"auto_connect": true,
|
||||
"disconnection_triggering_behavior": 0,
|
||||
"disconnection_detection_time": 10
|
||||
}
|
||||
}
|
5
assets/json/soft_limit.get_params.json
Normal file
5
assets/json/soft_limit.get_params.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "safety",
|
||||
"command": "soft_limit.get_params"
|
||||
}
|
13
assets/json/soft_limit.set_params.json
Normal file
13
assets/json/soft_limit.set_params.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "safety",
|
||||
"command": "soft_limit.set_params",
|
||||
"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],
|
||||
"reduced_lower": [0,0,0,0,0,0,0]
|
||||
}
|
||||
}
|
5
assets/json/state.get_state.json
Normal file
5
assets/json/state.get_state.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "state.get_state"
|
||||
}
|
5
assets/json/state.get_tp_mode.json
Normal file
5
assets/json/state.get_tp_mode.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "state.get_tp_mode"
|
||||
}
|
8
assets/json/state.set_tp_mode.json
Normal file
8
assets/json/state.set_tp_mode.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "state.set_tp_mode",
|
||||
"data": {
|
||||
"tp_mode": "with"
|
||||
}
|
||||
}
|
5
assets/json/state.switch_auto.json
Normal file
5
assets/json/state.switch_auto.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "state.switch_auto"
|
||||
}
|
5
assets/json/state.switch_manual.json
Normal file
5
assets/json/state.switch_manual.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "state.switch_manual"
|
||||
}
|
5
assets/json/state.switch_motor_off.json
Normal file
5
assets/json/state.switch_motor_off.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "state.switch_motor_off"
|
||||
}
|
5
assets/json/state.switch_motor_on.json
Normal file
5
assets/json/state.switch_motor_on.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "system",
|
||||
"command": "state.switch_motor_on"
|
||||
}
|
5
assets/json/system_io.query_configuration.json
Normal file
5
assets/json/system_io.query_configuration.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "io",
|
||||
"command": "system_io.query_configuration"
|
||||
}
|
5
assets/json/system_io.query_event_cfg.json
Normal file
5
assets/json/system_io.query_event_cfg.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "io",
|
||||
"command": "system_io.query_event_cfg"
|
||||
}
|
9
assets/json/system_io.update_configuration.json
Normal file
9
assets/json/system_io.update_configuration.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "xxxxxxxxxxx",
|
||||
"module": "io",
|
||||
"command": "system_io.update_configuration",
|
||||
"data": {
|
||||
"input_system_io": {},
|
||||
"output_system_io": {}
|
||||
}
|
||||
}
|
46
code/clibs.py
Normal file
46
code/clibs.py
Normal file
@ -0,0 +1,46 @@
|
||||
from sys import stdout
|
||||
from os import mkdir, remove, listdir
|
||||
from os.path import exists
|
||||
from socket import setdefaulttimeout
|
||||
from loguru import logger
|
||||
|
||||
|
||||
ip_addr = "192.168.2.160"
|
||||
# ip_addr = "192.168.168.128"
|
||||
# ip_addr = "192.168.40.130"
|
||||
ssh_port = 22
|
||||
socket_port = 5050
|
||||
username = "luoshi"
|
||||
password = "luoshi2019" # for real robot
|
||||
# password = "forpqart" # for robot vm
|
||||
xService_port = 6666
|
||||
external_port = 8080
|
||||
modbus_port = 502
|
||||
interval = 0.5 # interval after actions being triggered, such as modbus/socket/external communication operations
|
||||
heartbeat_interval = 2
|
||||
RADIAN = 57.3 # 180 / 3.1415926
|
||||
MAX_FRAME_SIZE = 1024
|
||||
TIMEOUT = 3
|
||||
setdefaulttimeout(TIMEOUT)
|
||||
PREFIX = "../assets"
|
||||
log_path = f"{PREFIX}/logs/"
|
||||
log_data_debug = f"{PREFIX}/logs/debug.log"
|
||||
|
||||
if not exists(log_path):
|
||||
mkdir(log_path)
|
||||
else:
|
||||
for _ in listdir(log_path):
|
||||
remove("".join([log_path, _]))
|
||||
logger.remove()
|
||||
logger.add(stdout, level="INFO")
|
||||
logger.add(
|
||||
sink=log_data_debug,
|
||||
level="DEBUG",
|
||||
format="{time: YYYY-MM-DD HH:mm:ss} | {level} | {message}",
|
||||
rotation="10 KB",
|
||||
encoding="utf-8",
|
||||
enqueue=True,
|
||||
diagnose=True,
|
||||
colorize=True,
|
||||
# filter=lambda x: "DEBUG" in str(x["level"]).upper()
|
||||
)
|
100
code/common.py
Normal file
100
code/common.py
Normal file
@ -0,0 +1,100 @@
|
||||
import time
|
||||
import openapi
|
||||
import json
|
||||
|
||||
|
||||
def initialization():
|
||||
hr = openapi.HmiRequest()
|
||||
pd = openapi.PreDos()
|
||||
# 推送配置文件
|
||||
robot_params = hr.get_robot_params()
|
||||
robot_type = robot_params["robot_type"]
|
||||
security_type = robot_params["security_type"]
|
||||
controller_type = robot_params["controller_type"]
|
||||
io_device_file = "_".join(["io_device", controller_type, security_type, "1"])
|
||||
|
||||
user_settings = "/home/luoshi/bin/controller/user_settings"
|
||||
interactive_data = f"/home/luoshi/bin/controller/interactive_data/{robot_type}"
|
||||
|
||||
config_files = [
|
||||
"..\\assets\\configs\\fieldbus_device.json",
|
||||
"..\\assets\\configs\\registers.json",
|
||||
"..\\assets\\configs\\registers.xml"
|
||||
]
|
||||
for config_file in config_files:
|
||||
filename = config_file.split("\\")[-1]
|
||||
pd.push_file_to_server(config_file, f"{user_settings}/{filename}")
|
||||
pd.push_file_to_server(config_file, f"{interactive_data}/{filename}")
|
||||
|
||||
io_device_autotest = {'ai_num': 0, 'ao_num': 0, 'di_num': 16, 'do_num': 16, 'extend_attr': {'mode': 'slaver', 'name': 'autotest', 'type': 'MODBUS'}, 'id': 5, 'name': 'autotest', 'type': 6}
|
||||
io_device_file_local = f"..\\assets\\configs\\{io_device_file}"
|
||||
io_device_file_local_tmp = f"..\\assets\\configs\\{io_device_file}_tmp"
|
||||
io_device_file_remote = f"{user_settings}/{io_device_file}"
|
||||
pd.pull_file_from_server(io_device_file_remote, io_device_file_local)
|
||||
with open(io_device_file_local, mode="r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
for _ in data["device_list"]:
|
||||
if _["extend_attr"].get("name", None) == "autotest":
|
||||
break
|
||||
else:
|
||||
data["device_list"].append(io_device_autotest)
|
||||
with open(io_device_file_local_tmp, mode="w", encoding="utf-8") as f_tmp:
|
||||
json.dump(data, f_tmp, indent=4)
|
||||
pd.push_file_to_server(io_device_file_local_tmp, f"{user_settings}/{io_device_file}")
|
||||
pd.push_file_to_server(io_device_file_local_tmp, f"{interactive_data}/{io_device_file}")
|
||||
|
||||
hr.reload_io()
|
||||
hr.reload_registers()
|
||||
hr.reload_fieldbus()
|
||||
hr.set_fieldbus_device_params("autotest", True)
|
||||
|
||||
md = openapi.ModbusRequest()
|
||||
# 触发急停并恢复
|
||||
md.r_soft_estop(0)
|
||||
md.r_soft_estop(1)
|
||||
|
||||
# 断开示教器连接
|
||||
hr.switch_tp_mode("without")
|
||||
|
||||
# 清空 system IO 配置
|
||||
hr.update_system_io_configuration([], [], [], [], [])
|
||||
|
||||
# 关闭缩减模式
|
||||
md.r_reduced_mode(0)
|
||||
|
||||
# 关闭安全区域
|
||||
hr.set_safety_area_overall(False)
|
||||
hr.set_safety_area_signal(False)
|
||||
for i in range(10):
|
||||
hr.set_safety_area_enable(i, False)
|
||||
|
||||
# 打开外部通信
|
||||
hr.set_socket_params(True, "", "name", "8080", "\r", 1, True, True, 0, 10)
|
||||
|
||||
# 关闭拖动
|
||||
hr.set_drag_params(False, 1, 2)
|
||||
|
||||
# 关闭碰撞检测
|
||||
hr.set_collision_params(False, 0, 1, 100)
|
||||
|
||||
# 清除所有错误码
|
||||
hr.set_filtered_error_code("clear", [])
|
||||
|
||||
# 回拖动位姿
|
||||
hr.switch_operation_mode("manual")
|
||||
hr.switch_motor_state("on")
|
||||
hr.set_quickturn_pos(enable_drag=True)
|
||||
hr.move2quickturn("drag")
|
||||
while True:
|
||||
if md.w_robot_moving():
|
||||
time.sleep(1)
|
||||
else:
|
||||
break
|
||||
hr.stop_move(1)
|
||||
hr.switch_motor_state("off")
|
||||
|
||||
# 清除所有告警
|
||||
md.r_clear_alarm()
|
||||
|
||||
|
||||
initialization()
|
2015
code/openapi.py
Normal file
2015
code/openapi.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user