Difference between revisions of "MC-Basic:IDNSTATE"

From SoftMC-Wiki
Jump to: navigation, search
m (1 revision)
Line 18: Line 18:
  
 
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.
 
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.
 +
 +
{{Note/Important| '''THIS PROPERTY IS OBSOLETE'''}}
  
 
|TYPE=
 
|TYPE=
Line 59: Line 61:
 
* [[Axystems:MC-Basic:WRITEIDNVALUE|WRITEIDNVALUE]]
 
* [[Axystems:MC-Basic:WRITEIDNVALUE|WRITEIDNVALUE]]
  
 +
 +
[[Category:Axystems:Obsolete|axis.IDNSTATE]]
  
 
}}
 
}}

Revision as of 11:04, 11 March 2014

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
       3: Done
       5: Interrupted
       7: Running
       15: Error

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.

IMPORTANT.svgIMPORTANT
THIS PROPERTY IS OBSOLETE

Short form

Istat

Syntax

?IdnState (<drive address>, <IDN>)

Availability

All versions

Range

<drive address>: 1 to 254
<IDN>: 1 to 65535

Scope

Task or Terminal

Limitations

Read-Only. May be executed only in SERCOS communication phases 2, 3 and 4.

The IDN must be defined.

Examples

WriteIdnValue Drive = A1.Dadd Idn = 99 Value = 3           ‘Start Procedure

While A1.PCB = 0                                      ‘Wait for procedure to terminate

End While

If IdnState(a1.dadd, 99) <> 3 then               ‘Check how procedure terminated
       Print “Reset Faults procedure failed

End If

WriteIdnValue Drive = A1.Dadd Idn = 99 Value = 0           ‘Cancel Procedure

See Also