MC-Basic:element.STOPTYPE

From SoftMC-Wiki
Jump to: navigation, search
Language: English  • 中文(简体)‎

This property defines how the motion is stopped in response to the STOP command. The property is used within a STOP command to override the permanent value for that STOP command.

1 - IMMEDIATE: Immediate stop using maximum deceleration.

2 - ONPATH: Immediate stop on the path of the motion. This is useful for stopping group motion so all axes remain on the original path of travel during the stop. For a single axis, IMMEDIATE and ONPATH are the same.

3 - ENDMOTION: Stop at the end of the current motion command.

4 - ABORT: Stop the current motion immediate but do not wait for proceed to start next motion. Only the accepted motion commands are stopped, the commands coming after this stoptype will be executed regularly

5 - DecStopOnPath: the stopping procedure is started immediately according to DecStop value or DecStopTran and DecStopRot values (for ROBOT ). As those parameters are modal so their values must be updated before executing the motion command.  Contrary to stop immediate in this case the Robot is stopped as a whole group on the movement path.

Syntax

<element>.StopType = <expression>

?<element>.StopType

Availability

All versions

Type

Long

Range

1 to 5

Default

1

Scope

Configuration, Task or Terminal

Examples

Axis
A1.StopType = 2
Stop A1 StopType = 3

Group
G1.StopType = 2
Stop G1 StopType=3


Graph

Those graphs create to demonstrate the differences between the StopType values.
They create by using the following program, that command a XY robot to move in a circle, and stop it at the same point each round:

'------------------------------------------------------------------------------
' File:        circle.prg
' Purpose:     testing StopType
' Version:     1.00
' Author:      Itay Kedem
' Description:
' History:     
'              Created
'------------------------------------------------------------------------------

'----------------------------------Properties-----------------------------------
'A1.AccelerationMax = 1000, A1.DecelerationMax = 1000, A1.DecStop = 1000
'A2.AccelerationMax = 400, A2.DecelerationMax = 400, A2.DecStop = 400
'XY.AccelerationMax = 1000, XY.DecelerationMax = 1000, XY.DecStop = 1000     'Group properties
'-----------------------------------------------------------------------------------

program
	attach XY

		OnEvent EV1 a1.pcmd>130 scantime = 1
			stop XY
			sleep 600
			move XY #{0,0} vcruise = 550       '// second movement
			sleep 300
			recordclose
			print "record ready"
		end OnEvent

		with XY
			attach		
				record type1.rec 10000000 recdata = a1.vcmd, a2.vCmd
				stoptype = 1       '//can be change
				en = 1 
				moves #{0, 0} vcruise = 120
				sleep 500
				recordon
				move #{50, 80}
				sleep 500
				eventon EV1
				circle angle = -360 circlecenter = #{100, 80} circleplane = 0 vcruise = 120
				sleep 900
				move XY #{0,0} vcruise = 120
				sleep 600
			detach
		end with

end program


Axes Position Graph

stoptype44.png


Axes Velocity In Time Graph

StopType 3.png

See Also