diff --git a/testtools/motortesttools/config.js b/testtools/motortesttools/config.js new file mode 100644 index 0000000..9ab690f --- /dev/null +++ b/testtools/motortesttools/config.js @@ -0,0 +1,28 @@ +const websocketAddress = "ws://192.168.1.138:19001"; +const config = { + 打开工程师模式: `{"message":{"type":"write","targetId":200,"sourceId":1,"ctrlPointAddr":2,"ctrlPointVal":1,"seq":0},"protocol":"icpsv1"}`, + 关闭工程师模式: `{"message":{"type":"write","targetId":200,"sourceId":1,"ctrlPointAddr":2,"ctrlPointVal":0,"seq":0},"protocol":"icpsv1"}`, + 读取所有光电输入: `{"message":{"type":"read","targetId":200,"sourceId":1,"ctrlPointAddr":1000,"ctrlPointVal":0,"seq":0},"protocol":"icpsv1"}`, + 电机_正转一圈: `{"message":{"type":"write","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10002,"ctrlPointVal":51200},"protocol":"icpsv1"}`, + 电机_反转一圈: `{"message":{"type":"write","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10002,"ctrlPointVal":-51200},"protocol":"icpsv1"}`, + 电机_归零: `{"message":{"type":"write","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10003,"ctrlPointVal":0},"protocol":"icpsv1"}`, + 电机_位置0: `{"message":{"type":"write","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10001,"ctrlPointVal":0},"protocol":"icpsv1"}`, + 电机_位置51200: `{"message":{"type":"write","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10001,"ctrlPointVal":51200},"protocol":"icpsv1"}`, + 电机_读取当前位置: `{"message":{"type":"read","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10013,"ctrlPointVal":0},"protocol":"icpsv1"}`, + 电机_清空异常: `{"message":{"type":"write","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10009,"ctrlPointVal":0},"protocol":"icpsv1"}`, + 电机_停止: `{"message":{"type":"write","targetId":200,"sourceId":1,"seq":0,"ctrlPointAddr":10008,"ctrlPointVal":0},"protocol":"icpsv1"}`, +}; + +const commonMessage = { + protocol: "icpsv1", + message: { + attribute: "normal", + priority: 4, + type: "write", + targetId: 130, + sourceId: 1, + seq: 0, + ctrlPointAddr: 10500, + ctrlPointVal: 1, + }, +}; diff --git a/testtools/motortesttools/index.html b/testtools/motortesttools/index.html new file mode 100644 index 0000000..d000ee4 --- /dev/null +++ b/testtools/motortesttools/index.html @@ -0,0 +1,1153 @@ + + + + + + + + Document + + + +
+
+
+ + +
+

当前状态: 未连接

+
+
+ + + +
+
+
+
+

上报解析

+
+

ADDRESS:

+ +
+
+

VALUE:

+ +
+
+
+

回执解析

+
+

ADDRESS:

+ +
+
+

VALUE:

+ +
+
+

结果:

+ +
+
+
+
    +
  • 通用指令
  • +
  • 指令列表
  • +
+
+
+
+
+

ID

+ +
+
+

BASE

+ +
+
+

OFFSET

+ +
+
+

VALUE

+ +
+
+
+ + + + +
+
+
+
+
+
+
+
+
+
+
+

ID

+ +
+
+

BASE

+ +
+
+

OFFSET

+ +
+
+
+

状态

+
+

异常

+ + +
+
+

状态

+ + +
+
+

位置

+ + +
+
+
+

配置

+
+

反复运动启始位置

+ + + +
+
+

反复运动终止位置

+ + + +
+
+

运行时速度配置

+ + + +
+
+
+

动作

+
+

舵机移动到角度

+ + +
+
+

舵机停止

+ + +
+
+

清除异常

+ + +
+
+

反复运动

+ + +
+
+
+
+
+
+

ID

+ +
+
+

BASE

+ +
+
+

OFFSET

+ +
+
+
+

状态

+
+

设备状态

+ + +
+
+

异常状态

+ + +
+
+

当前转速

+ + +
+
+

当前位置

+ + +
+
+
+

配置

+
+

加速度

+ + + +
+
+

减速度

+ + + +
+
+

速度

+ + + +
+
+

零点偏移

+ + + +
+
+

归零速度

+ + + +
+
+

归零减速度

+ + + +
+
+

归零最大位移

+ + + +
+
+

归零第一阶段移动距离

+ + + +
+
+
+

动作

+
+

速度模式控制

+ + +
+
+

位置模式控制

+ + +
+
+

位置模式相对位置

+ + +
+
+

归零

+ + +
+
+

零位校准

+ + +
+
+

停止

+ + +
+
+

清空异常

+ + +
+
+
+
+
+
+
+
+
+ +
+ + +
+
+
+
+ + + + + +