Difference between revisions of "MC-Basic:PlcMotionStatusDestroy"

From SoftMC-Wiki
Jump to: navigation, search
Line 31: Line 31:
 
|EXAMPLE=
 
|EXAMPLE=
 
<pre>
 
<pre>
dim MOT_READY as const long = 123
 
 
dim MotStatHanlde as long
 
dim MotStatHanlde as long
  
Line 38: Line 37:
 
Move A1 PlcMotionStatus= MotStatHanlde
 
Move A1 PlcMotionStatus= MotStatHanlde
  
do
+
while A1.isMoving
 
   sleep 100
 
   sleep 100
loop until PlcMotionStatusQuery(MotStatHanlde, MOT_READY)
+
  Print PlcMotionStatusQuery(MotStatHanlde, 1)
 +
end while
  
 
PlcMotionStatusDestroy(MotStatHanlde)
 
PlcMotionStatusDestroy(MotStatHanlde)

Revision as of 09:03, 15 November 2012

Destroys a PlcMotionStatus object and frees its memory.

Syntax

PlcMotionStatusDestroy(<handle>)

Availability

4.10.x

Type

<handle>: Long

Scope

Task or Terminal

Examples

dim MotStatHanlde as long

MotStatHanlde = PlcMotionStatusCreate

Move A1 PlcMotionStatus= MotStatHanlde

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

PlcMotionStatusDestroy(MotStatHanlde)

See Also