controller
device_interface.h 文件参考

设备通信接口 更多...

浏览源代码.

函数

const char * get_deviceName (int index, char *name)
 获取驱动设备名(创建时指定的名称) 更多...
 
int device_describe_printf (const char *device_name)
 打印设备描绘信息 更多...
 
double get_control_cycle (const char *device_name)
 获取设备控制周期 更多...
 
int hasNumber_dio_device (const char *device_name)
 设备中数字IO子设备数量 更多...
 
int hasNumber_aio_device (const char *device_name)
 设备中模拟IO子设备数量 更多...
 
int hasNumber_additionaxis_device (const char *device_name)
 设备中附加轴组子设备数量 更多...
 
int hasNumber_robot_device (const char *device_name)
 设备中附加轴组子设备数量 更多...
 
const char * get_name_dio_device (const char *device_name)
 获取数字IO子设备名称 更多...
 
const char * get_name_aio_device (const char *device_name)
 获取模拟IO子设备名称 更多...
 
const char * get_name_lio_device (const char *device_name)
 获取逻辑数字IO子设备名称 更多...
 
const char * get_name_additionaxis_device (const char *device_name, int index)
 获取附加轴子设备名称 更多...
 
int get_index_additionaxis_device (const char *subdevice_name)
 获取附加轴子设备索引 更多...
 
const char * get_name_robot_device (const char *device_name, int index)
 获取机器人子设备名称 更多...
 
int get_index_robot_device (const char *subdevice_name)
 获取机器人子设备索引 更多...
 
int is_dio_device (const char *subdevice_name)
 判断是否为数字IO设备 更多...
 
int is_aio_device (const char *subdevice_name)
 判断是否为模拟IO设备 更多...
 
int is_lio_device (const char *subdevice_name)
 判断是否为逻辑IO设备 更多...
 
int is_additionaxis_device (const char *subdevice_name)
 判断是否为附加轴 更多...
 
int is_robot_device (const char *subdevice_name)
 判断是否为机器人 更多...
 
int axis_power_on (const char *subdevice_name, int axis_ID)
 轴使能 更多...
 
int axis_power_off (const char *subdevice_name, int axis_ID)
 轴去使能 更多...
 
int set_axis_mode (const char *subdevice_name, signed char mode, int axis_ID)
 设置轴模式 更多...
 
int set_axis_control (const char *subdevice_name, unsigned short control, int axis_ID)
 设置轴控制命令 更多...
 
unsigned short get_axis_status (const char *subdevice_name, int axis_ID)
 获取轴状态 更多...
 
int get_axis_position (const char *subdevice_name, int axis_ID)
 获取轴编码器位置 更多...
 
int get_axis_target_position (const char *subdevice_name, int axis_ID)
 获取轴目标编码器位置 更多...
 
int get_axis_velocity (const char *subdevice_name, int axis_ID)
 获取轴编码器速度 更多...
 
int get_axis_target_velocity (const char *subdevice_name, int axis_ID)
 获取轴目标编码器速度 更多...
 
short get_axis_torque (const char *subdevice_name, int axis_ID)
 获取轴力矩 更多...
 
int get_axis_position2 (const char *subdevice_name, int axis_ID)
 获取轴第二路编码器位置 更多...
 
int get_axis_velocity2 (const char *subdevice_name, int axis_ID)
 获取轴第二路编码器速度 更多...
 
short get_axis_sensor_torque (const char *subdevice_name, int axis_ID)
 获取轴关节力矩传感器数据 更多...
 
signed char get_axis_mode (const char *subdevice_name, int axis_ID)
 获取轴模式 更多...
 
short get_axis_ErrorCode (const char *subdevice_name, int axis_ID)
 获取轴错误代码 更多...
 
int get_axis_FollowingErrorActualValue (const char *subdevice_name, int axis_ID)
 获取轴跟踪误差 更多...
 
int set_axis_position (const char *subdevice_name, int pos, int axis_ID)
 设置轴位置 更多...
 
int set_axis_velocity (const char *subdevice_name, int vel, int axis_ID)
 设置轴速度 更多...
 
int set_axis_torque (const char *subdevice_name, short tor, int axis_ID)
 设置轴力矩 更多...
 
int set_axis_velocityOffset (const char *subdevice_name, int veloffset, int axis_ID)
 设置轴速度补偿 更多...
 
int set_axis_torqueOffset (const char *subdevice_name, short toroffset, int axis_ID)
 设置轴力矩补偿 更多...
 
int set_axis_torqueMaxLimit (const char *subdevice_name, short torlimit, int axis_ID)
 设置轴最大力矩限制 更多...
 
int set_axis_torqueMinLimit (const char *subdevice_name, short torlimit, int axis_ID)
 设置轴最小力矩限制 更多...
 
int set_do (const char *subdevice_name, int id_index, int flag)
 设置数字输出 更多...
 
int set_lo (const char *subdevice_name, int id_index, int flag)
 设置逻辑数字输出 更多...
 
int get_di (const char *subdevice_name, int id_index)
 获取数字输入 更多...
 
int get_li (const char *subdevice_name, int id_index)
 获取逻辑数字输入 更多...
 
int set_ao (const char *subdevice_name, int id_index, short ao)
 设置模拟输出 更多...
 
short get_ai (const char *subdevice_name, int id_index)
 获取模拟输入 更多...
 
int get_ao_num (const char *subdevice_name)
 获取模拟输出数量 更多...
 
int get_ai_num (const char *subdevice_name)
 获取模拟输入数量 更多...
 
int get_group_dof (const char *subdevice_name)
 获取轴组中轴的数量 更多...
 
int group_power_on (const char *subdevice_name)
 轴组使能 更多...
 
int group_power_off (const char *subdevice_name)
 轴组去使能 更多...
 
int set_group_mode (const char *subdevice_name, signed char *mode)
 设置轴组模式 更多...
 
int get_group_mode (const char *subdevice_name, signed char *mode)
 获取轴组模式 更多...
 
int get_group_position (const char *subdevice_name, int *pos)
 获取轴组编码器位置 更多...
 
int get_group_target_position (const char *subdevice_name, int *pos)
 获取轴组目标编码器位置 更多...
 
int get_group_velocity (const char *subdevice_name, int *vel)
 获取轴组编码器速度 更多...
 
int get_group_target_velocity (const char *subdevice_name, int *vel)
 获取轴组目标编码器速度 更多...
 
int get_group_torque (const char *subdevice_name, short *tor)
 获取轴组力矩 更多...
 
int get_group_position2 (const char *subdevice_name, int *pos)
 获取轴组第二路编码器位置 更多...
 
int get_group_velocity2 (const char *subdevice_name, int *vel)
 获取轴组第二路编码器速度 更多...
 
int get_group_sensor_torque (const char *subdevice_name, short *tor)
 获取轴组关节力矩传感器数据 更多...
 
int get_group_ErrorCode (const char *subdevice_name, short *err)
 获取轴组错误代码 更多...
 
int get_group_FollowingErrorActualValue (const char *subdevice_name, int *err)
 获取轴组跟踪误差 更多...
 
int set_group_position (const char *subdevice_name, int *pos)
 设置轴组编码器位置 更多...
 
int set_group_velocity (const char *subdevice_name, int *vel)
 设置轴组编码器速度 更多...
 
int set_group_torque (const char *subdevice_name, short *tor)
 设置轴组力矩 更多...
 
int set_group_velocityOffset (const char *subdevice_name, int *veloffset)
 设置轴组速度补偿 更多...
 
int set_group_torqueOffset (const char *subdevice_name, short *toroffset)
 设置轴组力矩补偿 更多...
 
int set_group_torqueMaxLimit (const char *subdevice_name, short *torlimit)
 设置轴组最大力矩限制 更多...
 
int set_group_torqueMinLimit (const char *subdevice_name, short *torlimit)
 设置轴组最小力矩限制 更多...
 
double GetAxisPosition (const char *subdevice_name, int axis_ID)
 获取轴关节位置 更多...
 
double GetAxisTargetPosition (const char *subdevice_name, int axis_ID)
 获取轴关节目标位置 更多...
 
double GetAxisVelocity (const char *subdevice_name, int axis_ID)
 获取轴关节速度 更多...
 
double GetAxisTargetVelocity (const char *subdevice_name, int axis_ID)
 获取轴关节目标速度 更多...
 
double GetAxisTorque (const char *subdevice_name, int axis_ID)
 获取轴关节力矩 更多...
 
double GetAxisPosition2 (const char *subdevice_name, int axis_ID)
 获取轴第二路编码器获取的关节位置 更多...
 
int SetAxisPosition (const char *subdevice_name, double position, int axis_ID)
 设置轴关节位置 更多...
 
int SetAxisVelocity (const char *subdevice_name, double velocity, int axis_ID)
 设置轴关节速度 更多...
 
int SetAxisTorque (const char *subdevice_name, double torque, int axis_ID)
 设置轴关节力矩 更多...
 
double GetAI (const char *subdevice_name, int id_index)
 获取模拟输入 更多...
 
int SetAO (const char *subdevice_name, double ao, int id_index)
 设置模拟输出 更多...
 
int GetGroupPosition (const char *subdevice_name, double *position)
 获取轴组关节位置 更多...
 
int GetGroupTargetPosition (const char *subdevice_name, double *position)
 获取轴组目标关节位置 更多...
 
int GetGroupVelocity (const char *subdevice_name, double *velocity)
 获取轴组关节速度 更多...
 
int GetGroupTargetVelocity (const char *subdevice_name, double *velocity)
 获取轴组目标关节速度 更多...
 
int GetGroupTorque (const char *subdevice_name, double *torque)
 获取轴组关节力矩 更多...
 
int GetGroupPosition2 (const char *subdevice_name, double *position)
 获取轴组第二路采集关节位置 更多...
 
int SetGroupPosition (const char *subdevice_name, double *position)
 设置轴组关节位置 更多...
 
int SetGroupVelocity (const char *subdevice_name, double *velocity)
 设置轴组关节速度 更多...
 
int SetGroupTorque (const char *subdevice_name, double *torque)
 设置轴组关节力矩 更多...
 
int SetGroupCtrlTarget (const char *subdevice_name, double *position, double *velocity, double *acceleration)
 设置轴组控制目标 更多...
 
int GetGroupCtrlTarget (const char *subdevice_name, double *position, double *velocity, double *acceleration)
 获取轴组控制目标 更多...
 
int SetGroupCtrlTargetPosition (const char *subdevice_name, double *position)
 设置轴组位置控制目标 更多...
 
int GetGroupCtrlTargetPosition (const char *subdevice_name, double *position)
 获取轴组位置控制目标 更多...
 

详细描述

设备通信接口

作者
hanbing
版本
1.0
日期
2020-04-08

函数说明

◆ axis_power_off()

int axis_power_off ( const char *  subdevice_name,
int  axis_ID 
)

轴去使能

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ axis_power_on()

int axis_power_on ( const char *  subdevice_name,
int  axis_ID 
)

轴使能

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ device_describe_printf()

int device_describe_printf ( const char *  device_name)

打印设备描绘信息

参数
device_name设备名称
返回
int 0:成功; <0:错误

◆ get_ai()

short get_ai ( const char *  subdevice_name,
int  id_index 
)

获取模拟输入

参数
subdevice_name子设备名称
id_index模拟输入索引(0,1,2,3,...)
返回
int 模拟输入值

◆ get_ai_num()

int get_ai_num ( const char *  subdevice_name)

获取模拟输入数量

参数
subdevice_name子设备名称
返回
int 模拟输入数量

◆ get_ao_num()

int get_ao_num ( const char *  subdevice_name)

获取模拟输出数量

参数
subdevice_name子设备名称
返回
int 模拟输出数量

◆ get_axis_ErrorCode()

short get_axis_ErrorCode ( const char *  subdevice_name,
int  axis_ID 
)

获取轴错误代码

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
short 设备状态错误代码

◆ get_axis_FollowingErrorActualValue()

int get_axis_FollowingErrorActualValue ( const char *  subdevice_name,
int  axis_ID 
)

获取轴跟踪误差

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 跟踪误差

◆ get_axis_mode()

signed char get_axis_mode ( const char *  subdevice_name,
int  axis_ID 
)

获取轴模式

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
signed char 模式(8:同步位置模式;9:同步速度模式;10:同步力矩模式)

◆ get_axis_position()

int get_axis_position ( const char *  subdevice_name,
int  axis_ID 
)

获取轴编码器位置

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 编码器位置

◆ get_axis_position2()

int get_axis_position2 ( const char *  subdevice_name,
int  axis_ID 
)

获取轴第二路编码器位置

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 编码器位置

◆ get_axis_sensor_torque()

short get_axis_sensor_torque ( const char *  subdevice_name,
int  axis_ID 
)

获取轴关节力矩传感器数据

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
short 力矩

◆ get_axis_status()

unsigned short get_axis_status ( const char *  subdevice_name,
int  axis_ID 
)

获取轴状态

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
short >=0:状态; <0:错误

◆ get_axis_target_position()

int get_axis_target_position ( const char *  subdevice_name,
int  axis_ID 
)

获取轴目标编码器位置

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 编码器位置

◆ get_axis_target_velocity()

int get_axis_target_velocity ( const char *  subdevice_name,
int  axis_ID 
)

获取轴目标编码器速度

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 编码器速度(count/s)

◆ get_axis_torque()

short get_axis_torque ( const char *  subdevice_name,
int  axis_ID 
)

获取轴力矩

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
short 力矩(一般为额定电流千分比)

◆ get_axis_velocity()

int get_axis_velocity ( const char *  subdevice_name,
int  axis_ID 
)

获取轴编码器速度

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 编码器速度(count)

◆ get_axis_velocity2()

int get_axis_velocity2 ( const char *  subdevice_name,
int  axis_ID 
)

获取轴第二路编码器速度

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
int 编码器速度(count)

◆ get_control_cycle()

double get_control_cycle ( const char *  device_name)

获取设备控制周期

参数
device_name设备名称
返回
double 设备控制周期(s)

◆ get_deviceName()

const char* get_deviceName ( int  index,
char *  name 
)

获取驱动设备名(创建时指定的名称)

参数
index设备索引(0,1,2,...)
name返回设备名,非NULL时,为提供的存储空间;可以为NULL,名称数据空间由内部提供
返回
char* 创建时指定的设备名称地址

◆ get_di()

int get_di ( const char *  subdevice_name,
int  id_index 
)

获取数字输入

参数
subdevice_name子设备名称
id_index数字输入索引(0,1,2,3,...)
返回
int 数字输入值,0,1

◆ get_group_dof()

int get_group_dof ( const char *  subdevice_name)

获取轴组中轴的数量

参数
subdevice_name子设备名称
返回
int 轴的数量

◆ get_group_ErrorCode()

int get_group_ErrorCode ( const char *  subdevice_name,
short *  err 
)

获取轴组错误代码

参数
subdevice_name子设备名称
err返回错误代码
返回
0:成功; <0:错误

◆ get_group_FollowingErrorActualValue()

int get_group_FollowingErrorActualValue ( const char *  subdevice_name,
int *  err 
)

获取轴组跟踪误差

参数
subdevice_name子设备名称
err返回跟踪误差
返回
0:成功; <0:错误

◆ get_group_mode()

int get_group_mode ( const char *  subdevice_name,
signed char *  mode 
)

获取轴组模式

参数
subdevice_name子设备名称
mode返回轴组模式(8:同步位置模式;9:同步速度模式;10:同步力矩模式)
返回
0:成功; <0:错误

◆ get_group_position()

int get_group_position ( const char *  subdevice_name,
int *  pos 
)

获取轴组编码器位置

参数
subdevice_name子设备名称
pos返回编码器位置(count)
返回
0:成功; <0:错误

◆ get_group_position2()

int get_group_position2 ( const char *  subdevice_name,
int *  pos 
)

获取轴组第二路编码器位置

参数
subdevice_name子设备名称
pos返回编码器位置(count)
返回
0:成功; <0:错误

◆ get_group_sensor_torque()

int get_group_sensor_torque ( const char *  subdevice_name,
short *  tor 
)

获取轴组关节力矩传感器数据

参数
subdevice_name子设备名称
tor返回传感器力矩
返回
0:成功; <0:错误

◆ get_group_target_position()

int get_group_target_position ( const char *  subdevice_name,
int *  pos 
)

获取轴组目标编码器位置

参数
subdevice_name子设备名称
pos返回编码器位置(count)
返回
0:成功; <0:错误

◆ get_group_target_velocity()

int get_group_target_velocity ( const char *  subdevice_name,
int *  vel 
)

获取轴组目标编码器速度

参数
subdevice_name子设备名称
vel返回编码器速度(count/s)
返回
0:成功; <0:错误

◆ get_group_torque()

int get_group_torque ( const char *  subdevice_name,
short *  tor 
)

获取轴组力矩

参数
subdevice_name子设备名称
tor返回轴组力矩(一般为额定电流千分比)
返回
0:成功; <0:错误

◆ get_group_velocity()

int get_group_velocity ( const char *  subdevice_name,
int *  vel 
)

获取轴组编码器速度

参数
subdevice_name子设备名称
vel返回编码器速度(count/s)
返回
0:成功; <0:错误

◆ get_group_velocity2()

int get_group_velocity2 ( const char *  subdevice_name,
int *  vel 
)

获取轴组第二路编码器速度

参数
subdevice_name子设备名称
vel返回编码器速度(count/s)
返回
0:成功; <0:错误

◆ get_index_additionaxis_device()

int get_index_additionaxis_device ( const char *  subdevice_name)

获取附加轴子设备索引

参数
subdevice_name子设备名称
返回
int 子设备索引(0,1,2,...)

◆ get_index_robot_device()

int get_index_robot_device ( const char *  subdevice_name)

获取机器人子设备索引

参数
subdevice_name子设备名称
返回
int 子设备索引(0,1,2,...)

◆ get_li()

int get_li ( const char *  subdevice_name,
int  id_index 
)

获取逻辑数字输入

参数
subdevice_name子设备名称
id_index数字输入索引(0,1,2,3,...)
返回
int 数字输入值,0,1

◆ get_name_additionaxis_device()

const char* get_name_additionaxis_device ( const char *  device_name,
int  index 
)

获取附加轴子设备名称

参数
device_name设备名称
index子设备索引(0,1,2,...)
返回
char* 子设备名称地址

◆ get_name_aio_device()

const char* get_name_aio_device ( const char *  device_name)

获取模拟IO子设备名称

参数
device_name设备名称
返回
char* 子设备名称地址

◆ get_name_dio_device()

const char* get_name_dio_device ( const char *  device_name)

获取数字IO子设备名称

参数
device_name设备名称
返回
char* 子设备名称地址

◆ get_name_lio_device()

const char* get_name_lio_device ( const char *  device_name)

获取逻辑数字IO子设备名称

参数
device_name设备名称
返回
char* 子设备名称地址

◆ get_name_robot_device()

const char* get_name_robot_device ( const char *  device_name,
int  index 
)

获取机器人子设备名称

参数
device_name设备名称
index子设备索引(0,1,2,...)
返回
char* 子设备名称地址

◆ GetAI()

double GetAI ( const char *  subdevice_name,
int  id_index 
)

获取模拟输入

参数
subdevice_name子设备名称
id_index索引(0,1,2,...)
返回
double 模拟输入(物理量纲)

◆ GetAxisPosition()

double GetAxisPosition ( const char *  subdevice_name,
int  axis_ID 
)

获取轴关节位置

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
double 关节位置(rad 或 mm)

◆ GetAxisPosition2()

double GetAxisPosition2 ( const char *  subdevice_name,
int  axis_ID 
)

获取轴第二路编码器获取的关节位置

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
double 关节位置(rad 或 mm)

◆ GetAxisTargetPosition()

double GetAxisTargetPosition ( const char *  subdevice_name,
int  axis_ID 
)

获取轴关节目标位置

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
double 关节目标位置(rad 或 mm)

◆ GetAxisTargetVelocity()

double GetAxisTargetVelocity ( const char *  subdevice_name,
int  axis_ID 
)

获取轴关节目标速度

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
double 关节目标速度(rad/s 或 mm/s)

◆ GetAxisTorque()

double GetAxisTorque ( const char *  subdevice_name,
int  axis_ID 
)

获取轴关节力矩

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
double 关节关节力矩(Nmm 或mN)

◆ GetAxisVelocity()

double GetAxisVelocity ( const char *  subdevice_name,
int  axis_ID 
)

获取轴关节速度

参数
subdevice_name子设备名称
axis_ID轴地址(1,2,3,...)
返回
double 关节速度(rad/s 或 mm/s)

◆ GetGroupCtrlTarget()

int GetGroupCtrlTarget ( const char *  subdevice_name,
double *  position,
double *  velocity,
double *  acceleration 
)

获取轴组控制目标

参数
position期望关节位置(rad 或 mm)
velocity期望关节速度(rad/s 或 mm/s)
acceleration期望关节加速度(rad/s^2 或 mm/s^2)
返回
int 0:成功; <0:错误

◆ GetGroupCtrlTargetPosition()

int GetGroupCtrlTargetPosition ( const char *  subdevice_name,
double *  position 
)

获取轴组位置控制目标

参数
position期望关节位置(rad 或 mm)
返回
int 0:成功; <0:错误

◆ GetGroupPosition()

int GetGroupPosition ( const char *  subdevice_name,
double *  position 
)

获取轴组关节位置

参数
subdevice_name子设备名称
position关节位置(rad 或 mm)
返回
int 0:成功; <0:错误

◆ GetGroupPosition2()

int GetGroupPosition2 ( const char *  subdevice_name,
double *  position 
)

获取轴组第二路采集关节位置

参数
subdevice_name子设备名称
position关节位置(rad 或 mm)
返回
int 0:成功; <0:错误

◆ GetGroupTargetPosition()

int GetGroupTargetPosition ( const char *  subdevice_name,
double *  position 
)

获取轴组目标关节位置

参数
subdevice_name子设备名称
position目标关节位置(rad 或 mm)
返回
int 0:成功; <0:错误

◆ GetGroupTargetVelocity()

int GetGroupTargetVelocity ( const char *  subdevice_name,
double *  velocity 
)

获取轴组目标关节速度

参数
subdevice_name子设备名称
velocity目标关节速度(rad /s或 mm/s)
返回
int 0:成功; <0:错误

◆ GetGroupTorque()

int GetGroupTorque ( const char *  subdevice_name,
double *  torque 
)

获取轴组关节力矩

参数
subdevice_name子设备名称
torque关节力矩(Nmm或 mN)
返回
int 0:成功; <0:错误

◆ GetGroupVelocity()

int GetGroupVelocity ( const char *  subdevice_name,
double *  velocity 
)

获取轴组关节速度

参数
subdevice_name子设备名称
velocity关节速度(rad /s或 mm/s)
返回
int 0:成功; <0:错误

◆ group_power_off()

int group_power_off ( const char *  subdevice_name)

轴组去使能

参数
subdevice_name子设备名称
返回
0:成功; <0:错误

◆ group_power_on()

int group_power_on ( const char *  subdevice_name)

轴组使能

参数
subdevice_name子设备名称
返回
0:成功; <0:错误

◆ hasNumber_additionaxis_device()

int hasNumber_additionaxis_device ( const char *  device_name)

设备中附加轴组子设备数量

参数
device_name设备名称
返回
int >=0: 附加轴组子设备数量; <0:错误

◆ hasNumber_aio_device()

int hasNumber_aio_device ( const char *  device_name)

设备中模拟IO子设备数量

参数
device_name设备名称
返回
int >=0: 模拟IO子设备数量; <0:错误

◆ hasNumber_dio_device()

int hasNumber_dio_device ( const char *  device_name)

设备中数字IO子设备数量

参数
device_name设备名称
返回
int >=0: 数字IO子设备数量; <0:错误

◆ hasNumber_robot_device()

int hasNumber_robot_device ( const char *  device_name)

设备中附加轴组子设备数量

参数
device_name设备名称
返回
int >=0: 附加轴组子设备数量; <0:错误

◆ is_additionaxis_device()

int is_additionaxis_device ( const char *  subdevice_name)

判断是否为附加轴

参数
subdevice_name子设备名称
返回
int 1:是;0:否

◆ is_aio_device()

int is_aio_device ( const char *  subdevice_name)

判断是否为模拟IO设备

参数
subdevice_name子设备名称
返回
int 1:是;0:否

◆ is_dio_device()

int is_dio_device ( const char *  subdevice_name)

判断是否为数字IO设备

参数
subdevice_name子设备名称
返回
int 1:是;0:否

◆ is_lio_device()

int is_lio_device ( const char *  subdevice_name)

判断是否为逻辑IO设备

参数
subdevice_name子设备名称
返回
int 1:是;0:否

◆ is_robot_device()

int is_robot_device ( const char *  subdevice_name)

判断是否为机器人

参数
subdevice_name子设备名称
返回
int 1:是;0:否

◆ set_ao()

int set_ao ( const char *  subdevice_name,
int  id_index,
short  ao 
)

设置模拟输出

参数
subdevice_name子设备名称
id_index模拟输出索引(0,1,2,3,...)
ao输出值
返回
int 0:成功; <0:错误

◆ set_axis_control()

int set_axis_control ( const char *  subdevice_name,
unsigned short  control,
int  axis_ID 
)

设置轴控制命令

参数
subdevice_name子设备名称
control控制命令
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_mode()

int set_axis_mode ( const char *  subdevice_name,
signed char  mode,
int  axis_ID 
)

设置轴模式

参数
subdevice_name子设备名称
mode模式(8:同步位置模式;9:同步速度模式;10:同步力矩模式)
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_position()

int set_axis_position ( const char *  subdevice_name,
int  pos,
int  axis_ID 
)

设置轴位置

参数
subdevice_name子设备名称
pos位置(count)
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_torque()

int set_axis_torque ( const char *  subdevice_name,
short  tor,
int  axis_ID 
)

设置轴力矩

参数
subdevice_name子设备名称
tor力矩(一般为额定电流千分比)
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_torqueMaxLimit()

int set_axis_torqueMaxLimit ( const char *  subdevice_name,
short  torlimit,
int  axis_ID 
)

设置轴最大力矩限制

参数
subdevice_name子设备名称
torlimit力矩限制
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_torqueMinLimit()

int set_axis_torqueMinLimit ( const char *  subdevice_name,
short  torlimit,
int  axis_ID 
)

设置轴最小力矩限制

参数
subdevice_name子设备名称
torlimit力矩限制
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_torqueOffset()

int set_axis_torqueOffset ( const char *  subdevice_name,
short  toroffset,
int  axis_ID 
)

设置轴力矩补偿

参数
subdevice_name子设备名称
toroffset补偿力矩
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_velocity()

int set_axis_velocity ( const char *  subdevice_name,
int  vel,
int  axis_ID 
)

设置轴速度

参数
subdevice_name子设备名称
vel速度(count/s)
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_axis_velocityOffset()

int set_axis_velocityOffset ( const char *  subdevice_name,
int  veloffset,
int  axis_ID 
)

设置轴速度补偿

参数
subdevice_name子设备名称
veloffset补偿速度
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ set_do()

int set_do ( const char *  subdevice_name,
int  id_index,
int  flag 
)

设置数字输出

参数
subdevice_name子设备名称
id_index数字输出索引(0,1,2,3,...)
flag输出值: 0,1
返回
int 0:成功; <0:错误

◆ set_group_mode()

int set_group_mode ( const char *  subdevice_name,
signed char *  mode 
)

设置轴组模式

参数
subdevice_name子设备名称
mode模式(8:同步位置模式;9:同步速度模式;10:同步力矩模式)
返回
0:成功; <0:错误

◆ set_group_position()

int set_group_position ( const char *  subdevice_name,
int *  pos 
)

设置轴组编码器位置

参数
subdevice_name子设备名称
pos编码器位置(count)
返回
0:成功; <0:错误

◆ set_group_torque()

int set_group_torque ( const char *  subdevice_name,
short *  tor 
)

设置轴组力矩

参数
subdevice_name子设备名称
tor力矩
返回
0:成功; <0:错误

◆ set_group_torqueMaxLimit()

int set_group_torqueMaxLimit ( const char *  subdevice_name,
short *  torlimit 
)

设置轴组最大力矩限制

参数
subdevice_name子设备名称
torlimit力矩限制
返回
int 0:成功; <0:错误

◆ set_group_torqueMinLimit()

int set_group_torqueMinLimit ( const char *  subdevice_name,
short *  torlimit 
)

设置轴组最小力矩限制

参数
subdevice_name子设备名称
torlimit力矩限制
返回
int 0:成功; <0:错误

◆ set_group_torqueOffset()

int set_group_torqueOffset ( const char *  subdevice_name,
short *  toroffset 
)

设置轴组力矩补偿

参数
subdevice_name子设备名称
toroffset补偿力矩
返回
int 0:成功; <0:错误

◆ set_group_velocity()

int set_group_velocity ( const char *  subdevice_name,
int *  vel 
)

设置轴组编码器速度

参数
subdevice_name子设备名称
vel编码器速度(count)
返回
0:成功; <0:错误

◆ set_group_velocityOffset()

int set_group_velocityOffset ( const char *  subdevice_name,
int *  veloffset 
)

设置轴组速度补偿

参数
subdevice_name子设备名称
veloffset补偿速度
返回
int 0:成功; <0:错误

◆ set_lo()

int set_lo ( const char *  subdevice_name,
int  id_index,
int  flag 
)

设置逻辑数字输出

参数
subdevice_name子设备名称
id_index数字输出索引(0,1,2,3,...)
flag输出值: 0,1
返回
int 0:成功; <0:错误

◆ SetAO()

int SetAO ( const char *  subdevice_name,
double  ao,
int  id_index 
)

设置模拟输出

参数
subdevice_name子设备名称
ao模拟输出(物理量纲)
id_index索引(0,1,2,...)
返回
int 0:成功; <0:错误

◆ SetAxisPosition()

int SetAxisPosition ( const char *  subdevice_name,
double  position,
int  axis_ID 
)

设置轴关节位置

参数
subdevice_name子设备名称
position目标关节位置(rad 或 mm)
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ SetAxisTorque()

int SetAxisTorque ( const char *  subdevice_name,
double  torque,
int  axis_ID 
)

设置轴关节力矩

参数
subdevice_name子设备名称
torque目标关节力(Nmm 或 mN)
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ SetAxisVelocity()

int SetAxisVelocity ( const char *  subdevice_name,
double  velocity,
int  axis_ID 
)

设置轴关节速度

参数
subdevice_name子设备名称
velocity目标关节速度(rad/s 或 mm/s)
axis_ID轴地址(1,2,3,...)
返回
int 0:成功; <0:错误

◆ SetGroupCtrlTarget()

int SetGroupCtrlTarget ( const char *  subdevice_name,
double *  position,
double *  velocity,
double *  acceleration 
)

设置轴组控制目标

参数
subdevice_name子设备名称
position期望关节位置(rad 或 mm)
velocity期望关节速度(rad/s 或 mm/s)
acceleration期望关节加速度(rad/s^2 或 mm/s^2)
返回
int 0:成功; <0:错误

◆ SetGroupCtrlTargetPosition()

int SetGroupCtrlTargetPosition ( const char *  subdevice_name,
double *  position 
)

设置轴组位置控制目标

参数
subdevice_name子设备名称
position期望关节位置(rad 或 mm)
返回
int 0:成功; <0:错误

◆ SetGroupPosition()

int SetGroupPosition ( const char *  subdevice_name,
double *  position 
)

设置轴组关节位置

参数
subdevice_name子设备名称
position关节位置(rad 或 mm)
返回
int 0:成功; <0:错误

◆ SetGroupTorque()

int SetGroupTorque ( const char *  subdevice_name,
double *  torque 
)

设置轴组关节力矩

参数
subdevice_name子设备名称
torque关节力矩(Nmm 或 mN)
返回
int 0:成功; <0:错误

◆ SetGroupVelocity()

int SetGroupVelocity ( const char *  subdevice_name,
double *  velocity 
)

设置轴组关节速度

参数
subdevice_name子设备名称
velocity关节速度(rad/s 或 mm/s)
返回
int 0:成功; <0:错误