外部编码器的故障如何应答?

外部编码器的故障如何应答?

最佳答案

使用_resetExternalEncoderError函数,下面是帮助文档截取。
This function resets the external encoder errors.
For errors that cannot be acknowledged at the time, the command is terminated with a negative acknowledgment.

Return value: DINT

Description of the return value:
Corresponds to the list of return values for the function _move.

Parameter: externalEncoderDirection: Input parameter Data type: ExternalEncoderType Parameterindex: 1 


Specifies the technology object of the ”externalEncoder” type or a variable of the ”ExternalEncoderType” on which the command is to be executed.
errorResetMode (optional)Direction: Input parameter Data type: EnumErrorReset Parameterindex: 2 System default: ALL_ERRORS 

EnumErrorResetALL_ERRORS (10) All errors are reset SPECIFIC_ERROR (126) Reset selected errors 

Specifies which errors are reset.
With ALL_ERRORS, all errors are reset.
With SPECIFIC_ERROR, the error specified in ”errorNumber” is reset.

errorNumber (optional)Direction: Input parameter Data type: DINT Parameterindex: 3 System default: 0 


Specifies the number of the error to be reset.
Requires programming with ”errorResetMode:=SPECIFIC_ERROR”.

nextCommand (optional)Direction: Input parameter Data type: EnumNextCommandReset Parameterindex: 4 System default: IMMEDIATELY 

EnumNextCommandResetIMMEDIATELY (60) Immediate command advance WHEN_COMMAND_DONE (160) Advance if command has been completed or aborted 

Specifies condition for transition to next command.
With IMMEDIATELY, the transition takes place immediately.
With WHEN_COMMAND_DONE, the transition takes place when the command is completed or aborted.

commandId (optional)Direction: Input parameter Data type: CommandIdType Parameterindex: 5 System default: SystemId_high := 0 

CommandIdTypeSystem-wide unique IDStructure Name Data type Unit SystemId_high High_part of ID UDINT – SystemId_low Low_part of ID UDINT – 

Unique, system-wide ”commandId” to track command status.
The command status cannot be tracked when ”nextCommand:=IMMEDIATELY” and ”commandId:=(0, 0)”.
参考资料:Simotion Scout帮助 _resetExternalEncoderError

提问者对于答案的评价:
谢谢

专家置评

已阅,最佳答案正确。

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc128130.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2017年5月29日 下午5:51
下一篇 2017年5月29日

相关推荐