SmcWSetErcAlmClearTime


 

功能

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

 

格式

Ret = SmcWSetErcAlmClearTime( 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.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.c_short ]

设置偏差计数器清零信号的OFF时间。

指偏差计数器清零信号输出之后,信号变为OFF后的等待时间。

若在该指定时间内实行开始轴移动的操作,实际的脉冲输出是在偏差计数器信号变为OFF后再经过这段等待时间后。

 

0

0[μsec]

1

12[μsec]

2

1.6[msec]

3

104[msec]

 

AlmTime [ C, C++: short ] [ Python: 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]

 

返回值

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

 

0

正常完成

0以外

异常完成

 

参照:错误代码列表

 

初始值

 

ErcTime

0 : 12[μsec]

ErcOffTimer

0 : 0[μsec]

AlmTime

0 : 12[μsec]

 

说明

关于函数SmcWSetCtrlTypeOut中的CtrlTypeOut1~3的设置为

 [1 : 报警清除信号] 时,AlarmTime的设置有效。

 [2 : 偏差计数器清零信号(ERC)] 时,ErcTime、ErcOffTimer的设置有效。

 

报警清除信号是单脉冲信号。该信号不仅作可以报警清除信号使用时,也可以使用普通的单脉冲信号使用。

 

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

 

初始设置函数实行后,需要实行函数SmcWSetInitParam。

请参考【关于初始设置函数】。

 

使用例

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

设置偏差计数器清零信号宽度为102[μsec]。

设置偏差计数器清零信号OFF定时器时间为12[μsec]。

设置报警清除信号宽度为102[μsec]。

 

C, C++

long Ret;

short ErcTime ;

short ErcOffTimer ;

short AlmTime ;

ErcTime = 1;

ErcOffTimer = 1;

AlmTime = 1;

Ret = SmcWSetErcAlmClearTime( Id , 1, ErcTime , ErcOffTimer , AlmTime );

 

Python

Ret = ctypes.c_long()

ErcTime = ctypes.c_short()

ErcOffTimer = ctypes.c_short()

AlmTime = ctypes.c_short()

ErcTime.value = 1

ErcOffTimer.value = 1

AlmTime.value = 1

Ret.value = csmc.SmcWSetErcAlmClearTime( Id , 1, ErcTime , ErcOffTimer , AlmTime )

 

相关函数

SmcWGetErcAlmClearTime