Difference between revisions of "MC-Basic:PlcMotionStatusCreate"

From SoftMC-Wiki
Jump to: navigation, search
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
|SYNTAX=
 
|SYNTAX=
<''handle''> = MotionStatusCreate
+
<''handle''> = PlcMotionStatusCreate
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 9: Line 9:
  
 
|DESCRIPTION=
 
|DESCRIPTION=
Creates a new MotionStatus object and returns a pointer in memory to it.
+
Creates a new PlcMotionStatus object and returns a pointer in memory to it.
  
 
|TYPE=
 
|TYPE=
Line 31: Line 31:
 
|EXAMPLE=
 
|EXAMPLE=
 
<pre>
 
<pre>
dim MOT_READY as const long = 123
 
 
dim MotStatHanlde as long
 
dim MotStatHanlde as long
  
MotStatHanlde = MotionStatusCreate
+
MotStatHanlde = PlcMotionStatusCreate
  
Move A1 MotionStatus= MotStatHanlde
+
Move A1 100 PlcMotionStatus= MotStatHanlde
  
do
+
while A1.isMoving
 
   sleep 100
 
   sleep 100
loop until MotionStatusQuery(MotStatHanlde, MOT_READY)
+
  Print PlcMotionStatusQuery(MotStatHanlde, 1)
 +
end while
  
MotionStatusDestroy(MotStatHanlde)
+
PlcMotionStatusDestroy(MotStatHanlde)
 
</pre>
 
</pre>
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[AXY:MC-Basic:element.PlcMotionStatus|element.MotionStatus]]
+
* [[MC-Basic:element.PlcMotionStatus|element.PlcMotionStatus]]
* [[AXY:MC-Basic:PlcMotionStatusDestroy|MotionStatusDestroy]]
+
* [[MC-Basic:PlcMotionStatusDestroy|PlcMotionStatusDestroy]]
* [[AXY:MC-Basic:PlcMotionStatusQuery|MotionStatusQuery]]
+
* [[MC-Basic:PlcMotionStatusQuery|PlcMotionStatusQuery]]
  
 
}}
 
}}
  
[[Category:Axystems:PLC]]
+
[[Category:PLC]]

Latest revision as of 09:20, 22 May 2014

Creates a new PlcMotionStatus object and returns a pointer in memory to it.

Syntax

<handle> = PlcMotionStatusCreate

Availability

4.10.x

Type

Long

Scope

Task or Terminal

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