SmcWGetErcAlmClearTime


 

功能

读取偏差计数器清零信号/报警清除信号宽度、以及偏差计数器清零信号的OFF等待时间的设置信息。

 

格式

Ret = SmcWGetErcAlmClearTime( Id , AxisNo , ErcTime , ErcOffTimer , AlmTime )

 

参数

Id  [ C, C++: short ] [ Python: ctypes.c_short ]

指定由函数SmcWInit获取的硬件设备ID。

 

AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]

指定轴号。

 

ErcTime [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]

指定保存偏差计数器清零信号宽度的变量地址。

 

0

12[μsec]

1

102[μsec]

2

408[μsec]

3

1.6[msec]

4

13[msec]

5

52[msec]

6

104[msec]

7

电平输出

 

ErcOffTimer [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]

指定保存偏差计数器清零信号OFF时间的变量地址。

 

0

0[μsec]

1

12[μsec]

2

1.6[msec]

3

104[msec]

 

AlmTime [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]

指定保存报警清除信号宽度的变量地址。

 

0

12[μsec]

1

102[μsec]

2

408[msec]

3

1.6[msec]

4

13[msec]

5

52[msec]

6

104[msec]

 

返回值

Ret [ C, C++: long ] [ Python: ctypes.c_long ]

 

0

正常完成

0以外

异常完成

 

参照:错误代码列表

 

初始值

 

ErcTime

0 : 12[μsec]

ErcOffTimer

0 : 0[μsec]

AlmTime

0 : 12[μsec]

 

说明

本函数可在轴移动期间实行。

 

使用例

读取轴1的偏差计数器清零信号/报警清除信号宽度、以及偏差计数器清零信号OFF定时器的设置信息。

 

C, C++

long Ret;

short ErcTime ;

short ErcOffTimer ;

short AlmTime ;

Ret = SmcWGetErcAlmClearTime( Id , 1, &ErcTime , &ErcOffTimer , &AlmTime );

 

Python

Ret = ctypes.c_long()

ErcTime = ctypes.c_short()

ErcOffTimer = ctypes.c_short()

AlmTime = ctypes.c_short()

Ret.value = csmc.SmcWGetErcAlmClearTime( Id , 1, ctypes.byref(ErcTime) , ctypes.byref(ErcOffTimer) , ctypes.byref(AlmTime) )

 

相关函数

SmcWSetErcAlmClearTime