This function returns the state of a specified procedure command from a specified drive. It is used when executing a procedure command to determine progress of that procedure’s execution. Common procedures are 99 (clear faults) and 148 (drive-controlled homing). The value returned indicates the state of the procedure, as:
0: Finished or Not started
After starting a procedure, wait until the state has changed. This can be checked via drive status bit 5 or <axis>.PROCEDURECHANGEBIT. Check the state of the procedure to know whether it is done or whether an error has occurred. A procedure is interrupted only if it is cancelled during execution.
?IdnState (<drive address>, <IDN>)
<drive address>: 1 to 254
<IDN>: 1 to 65535
Task or Terminal
- Read only.
- May be executed only in SERCOS communication phases 2, 3 and 4.
- The IDN must be defined.
- Not supported in EtherCAT system
WriteIdnValue Drive = A1.Dadd Idn = 99 Value = 3 ‘Start Procedure
While A1.PCB = 0 ‘Wait for procedure to terminate
If IdnState(a1.dadd, 99) <> 3 then ‘Check how procedure terminated
Print “Reset Faults procedure failed
WriteIdnValue Drive = A1.Dadd Idn = 99 Value = 0 ‘Cancel Procedure