Difference between revisions of "Program Examples:Single Axis Blending"
(added) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{Languages|Program_Examples: | + | {{Languages|Program_Examples:Single_Axis_Blending}} |
here is an example of using blended motion for a single axis. the motion is done with different blendingFactor: 0 / 1 / 2 | here is an example of using blended motion for a single axis. the motion is done with different blendingFactor: 0 / 1 / 2 | ||
Line 10: | Line 10: | ||
' Version: 1.00 | ' Version: 1.00 | ||
' Author: Eran Korkidi | ' Author: Eran Korkidi | ||
− | ' History: 2021-08-04 | + | ' History: 2021-08-04 Created |
'------------------------------------------------------------------------------ | '------------------------------------------------------------------------------ | ||
Line 52: | Line 52: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | result: | ||
+ | |||
+ | [[File:singleAxisBlend.JPG|RTENOTITLE]] |
Latest revision as of 10:30, 4 August 2021
Language: | English |
---|
here is an example of using blended motion for a single axis. the motion is done with different blendingFactor: 0 / 1 / 2
'------------------------------------------------------------------------------
' File: BLEND.prg
' Purpose: MC training for blending motion of a single axis
' Version: 1.00
' Author: Eran Korkidi
' History: 2021-08-04 Created
'------------------------------------------------------------------------------
program
Attach X
X.En = 1
Sleep 100
X.Abs = 1
X.CP = 20
X.BlendingFactor = 80
Record X_MOT2.rec 10000 Gap=1 RecData = X.pcmd, X.VCMD, X.ismoving
X.BlendingMethod = 0
call executeMot
X.BlendingMethod = 1
call executeMot
X.BlendingMethod = 2
call executeMot
RecordClose
Detach X
end program ' <MyTask>.prg
sub executeMot
Move X 0 Vcruise=100
waitForMotion X
RecordOn
Sleep 100
Move X 50 Vcruise=20
Sleep 500
Move X 100 Vcruise=20
waitForMotion X
Sleep 100
RecordOff
end sub
result: