Difference between revisions of "MC-Basic:PlcMotionStatusQuery"

From SoftMC-Wiki
Jump to: navigation, search
m (Text replace - "Read-Only" to "Read only")
Line 12: Line 12:
  
 
;<''handle''>
 
;<''handle''>
Motion status handle which was returned by [[Axystems:MC-Basic:PlcMotionStatusCreate|PlcMotionStatusCreate]].
+
Motion status handle which was returned by [[MC-Basic:PlcMotionStatusCreate|PlcMotionStatusCreate]].
  
 
;<''index''>
 
;<''index''>
Line 65: Line 65:
 
|SEE ALSO=
 
|SEE ALSO=
 
* [[Axystems:MC-Basic:element.PlcMotionStatus|element.PlcMotionStatus]]
 
* [[Axystems:MC-Basic:element.PlcMotionStatus|element.PlcMotionStatus]]
* [[Axystems:MC-Basic:PlcMotionStatusCreate|PlcMotionStatusCreate]]
+
* [[MC-Basic:PlcMotionStatusCreate|PlcMotionStatusCreate]]
 
* [[Axystems:MC-Basic:PlcMotionStatusDestroy|PlcMotionStatusDestroy]]
 
* [[Axystems:MC-Basic:PlcMotionStatusDestroy|PlcMotionStatusDestroy]]
  

Revision as of 08:39, 22 May 2014

Queries variables of a PlcMotionStatus object.

<handle>

Motion status handle which was returned by PlcMotionStatusCreate.

<index>
  • 1: Bits 0-3: Motion status
    • 0: not initialized
    • 1: precomputing (move command given)
    • 2: moving - accelerating
    • 3: moving - cruising (jog is in velocity)
    • 4: moving - decelerating
    • 5: done (target position reached)
    • 6: aborted (motion aborted by another move command)
    • 7: error (error during motion)
  • 1: Bits 4-31: Reserved for future
  • 2: Error code in case of the motion package is in state error.

Syntax

Print PlcMotionStatusQuery(<handle>, <index>)

Availability

4.10.x

Type

  • <handle>: Long
  • <index>: Long
  • Return: Long

Range

  • <index>: 1, 2 ..

Scope

Task or Terminal

Limitations

  • Read only

Examples

dim MotStatHanlde as long

MotStatHanlde = PlcMotionStatusCreate

Move A1 100 PlcMotionStatus= MotStatHanlde

while A1.isMoving
  sleep 100
  Print PlcMotionStatusQuery(MotStatHanlde, 1)
end while 

PlcMotionStatusDestroy(MotStatHanlde)

See Also