add_io 添加IO
set_map_joint(entity_id u32,number i64);
输入参数
- entity_id 当前通信的实体索引
- name 需要关联的目标名称
- joint_index 轴索引
- id_index 通信id数据组
- addr 地址
输出参数
- 无
例子
// 如将读取机器人的通信组,映射到名为LBT_11机器人轴位置,
// 添加通信
add_net(entity.index,"192.168.1.13","7000","NRCJSON","Tcp",3000,3,[0,0,0,0,0],[]);
// 读取机器人位置,存到第一组数据
let varstr = #"{"channel":1,"stop":0,"robot":1,"mode":0,"interval":20,"queryType":["realPosACS"],"typeCfg":{}}"#;
net_set_config(entity.index,1,0,"F32",varstr,38162,1200,50,0,10);
// 映射轴1位置
set_map_joint(entity.index,"LBT_11",1,1,0);
set_map_joint(entity.index,"LBT_11",2,1,1);
set_map_joint(entity.index,"LBT_11",3,1,2);
set_map_joint(entity.index,"LBT_11",4,1,3);
set_map_joint(entity.index,"LBT_11",5,1,4);
set_map_joint(entity.index,"LBT_11",6,1,5);作者:力博特 创建时间:2025-11-07 16:51
最后编辑:力博特 更新时间:2025-11-11 18:53
最后编辑:力博特 更新时间:2025-11-11 18:53