Difference between revisions of "MC-Basic:IDNSTATE"

From SoftMC-Wiki
Jump to: navigation, search
m (Text replace - "Read-Only" to "Read only")
m (Text replace - "Axystems:" to "")
 
(7 intermediate revisions by 2 users not shown)
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 COMMAND IS OBSOLETE'''}}
 
  
 
|TYPE=
 
|TYPE=
Line 26: Line 24:
 
|RANGE=
 
|RANGE=
 
<''drive address''>: 1 to 254<br>
 
<''drive address''>: 1 to 254<br>
''<IDN>'': 1 to 65535
+
<''IDN''>: 1 to 65535
  
 
|UNITS=
 
|UNITS=
Line 38: Line 36:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
Read only. May be executed only in SERCOS communication phases 2, 3 and 4.<br>
+
*Read only.  
 
+
*May be executed only in SERCOS communication phases 2, 3 and 4.
The IDN must be defined.
+
*The IDN must be defined.
 +
*Not supported in EtherCAT system
  
 
|EXAMPLE=
 
|EXAMPLE=
Line 57: Line 56:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:MC-Basic:axis.PROCEDURECHANGEBIT|axis.PROCEDURECHANGEBIT]]
+
* [[MC-Basic:axis.PROCEDURECHANGEBIT|axis.PROCEDURECHANGEBIT]]
* [[Axystems:MC-Basic:WRITEIDNSTRING|WRITEIDNSTRING]]
+
* [[MC-Basic:WRITEIDNSTRING|WRITEIDNSTRING]]
* [[Axystems:MC-Basic:WRITEIDNVALUE|WRITEIDNVALUE]]
+
* [[MC-Basic:WRITEIDNVALUE|WRITEIDNVALUE]]
  
  
[[Category:Axystems:Obsolete|IDNSTATE]]
+
[[Category:Obsolete|IDNSTATE]]
  
 
}}
 
}}

Latest revision as of 09:24, 22 May 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.

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.
  • Not supported in EtherCAT system

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