Difference between revisions of "MC-Basic:element.PROFILERTYPE"
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|MC-Basic:element.PROFILERTYPE}} | ||
{{MC-Basic | {{MC-Basic | ||
|SHORT FORM= | |SHORT FORM= | ||
Line 20: | Line 21: | ||
{{ PrfType_vs_SmoothFactor}} | {{ PrfType_vs_SmoothFactor}} | ||
+ | |||
+ | The following table compare between Trapezoidal Velocity (0), Trapezoidal Acceleration (2) and Sine Acceleration (1) ProfilerTypes: | ||
{{{!}}class="wikitable" | {{{!}}class="wikitable" | ||
{{!}}<big>'''ProfilerType'''</big> | {{!}}<big>'''ProfilerType'''</big> | ||
− | {{!}}Trapezoidal Velocity (prftype = 0) | + | {{!}}<big>'''Trapezoidal Velocity'''</big> (prftype = 0) |
− | {{!}}Trapezoidal Acceleration (prftype = 2) | + | {{!}}<big>'''Trapezoidal Acceleration'''</big> (prftype = 2) |
− | {{!}}Sine Acceleration (prftype = 1) | + | {{!}}<big>'''Sine Acceleration'''</big> (prftype = 1) |
{{!}}- | {{!}}- | ||
{{!}}<big>'''Position'''</big> | {{!}}<big>'''Position'''</big> | ||
Line 40: | Line 43: | ||
{{!}}[[image:acce 0.PNG|300px]] | {{!}}[[image:acce 0.PNG|300px]] | ||
{{!}}[[image:acce 2.PNG|300px]] <br> {{!}}[[image:acce 22.PNG|300px]] | {{!}}[[image:acce 2.PNG|300px]] <br> {{!}}[[image:acce 22.PNG|300px]] | ||
− | {{!}}{{!}}[[image:acce | + | {{!}}{{!}}[[image:acce 01.PNG|300px]] <br> {{!}}[[image:acce 11.PNG|300px]] |
+ | |||
+ | {{!}}} | ||
+ | |||
+ | To make this test by yourself, you can use the following MC-Basic '''PRG''' files with ControlStudio: <br> | ||
+ | |||
+ | '''Config.PRG''': | ||
+ | <syntaxhighlight lang='VB'> | ||
+ | |||
+ | Sys.NumberAxes = 1 | ||
+ | |||
+ | program | ||
+ | |||
+ | Sys.DoubleFormat = 1 | ||
+ | Sys.NoMotion = 1 | ||
+ | a1.Simulated = 1 'optional | ||
+ | |||
+ | Sys.Name = "single_axis" | ||
+ | Print "system is running - " ; Sys.Name | ||
+ | |||
+ | end program | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | '''Prftprec.PRG''': | ||
+ | <syntaxhighlight lang='VB'> | ||
+ | |||
+ | program | ||
+ | with a1 | ||
+ | attach | ||
+ | |||
+ | jerk = 11000 | ||
+ | VCruise = 200 | ||
+ | acc = 10000 | ||
+ | dec = 10000 | ||
+ | abs = 1 | ||
+ | en = 1 | ||
+ | |||
+ | prftype = 1 'sine Acceleration session | ||
+ | record prftp_1.rec 1000000 recdata = a1.AccelCmd, a1.vcmd, a1.PCmd | ||
+ | |||
+ | sleep 100 | ||
+ | move 0 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordon | ||
+ | move 100 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordclose | ||
+ | |||
+ | prftype = 2 'Trapezoidal Acceleration session | ||
+ | record prftp_2.rec 1000000 recdata = a1.AccelCmd, a1.vcmd, a1.PCmd | ||
+ | |||
+ | sleep 100 | ||
+ | move 0 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordon | ||
+ | move 100 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordclose | ||
+ | |||
+ | |||
+ | prftype = 0 'Trapezoidal Velocity session | ||
+ | record prftp_0.rec 1000000 recdata = a1.AccelCmd, a1.vcmd, a1.PCmd | ||
+ | sleep 100 | ||
+ | move 0 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordon | ||
+ | move 100 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordclose | ||
+ | prftype = 1 'Acceleration saturation case - Sine Acceleration ProfilerType | ||
+ | acc = 100 | ||
+ | dec = 100 | ||
+ | sleep 100 | ||
+ | move 0 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | record acceEd_1.rec 1000000 recdata = a1.AccelCmd , a1.vcmd, a1.PCmd | ||
+ | recordon | ||
+ | move 100 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordclose | ||
+ | |||
+ | prftype = 2 'Acceleration saturation case - Trapezoidal Acceleration ProfilerType | ||
+ | acc = 1000 | ||
+ | dec = 1000 | ||
+ | sleep 100 | ||
+ | move 0 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | record acceEd_2.rec 1000000 recdata = a1.AccelCmd , a1.vcmd, a1.PCmd | ||
+ | recordon | ||
+ | move 100 | ||
+ | while ismoving<>0 | ||
+ | sleep 10 | ||
+ | end while | ||
+ | recordclose | ||
+ | |||
+ | detach | ||
+ | end with | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | end program | ||
+ | </syntaxhighlight> | ||
− | |||
|TYPE= | |TYPE= | ||
Long | Long |
Latest revision as of 01:54, 30 October 2017
Language: | English • 中文(简体) |
---|
Defines the profiler-type used in the motion:
- -1 - profile type is defined by the SmoothFactor (from version 4.7.3 only)
- 0 – Velocity based trapezoidal velocity (TV)
- 1 – Velocity based sine acceleration (SA)
- 2 – Time based trapezoidal acceleration (TA) or trapezoidal velocity (TV)
- 3 - Constant velocity profile (one sample acceleration and one sample deceleration)
IMPORTANT | |
Values of the SmoothFactor between [1,100] and the value of -1 define the SINE-ACCELERATION profile and value of zero the VELOCITY-TRAPEZE profile.
|
The following table compare between Trapezoidal Velocity (0), Trapezoidal Acceleration (2) and Sine Acceleration (1) ProfilerTypes:
ProfilerType | Trapezoidal Velocity (prftype = 0) | Trapezoidal Acceleration (prftype = 2) | Sine Acceleration (prftype = 1) |
Position | |||
Velocity | |||
Acceleration | | |
| |
To make this test by yourself, you can use the following MC-Basic PRG files with ControlStudio:
Config.PRG:
Sys.NumberAxes = 1
program
Sys.DoubleFormat = 1
Sys.NoMotion = 1
a1.Simulated = 1 'optional
Sys.Name = "single_axis"
Print "system is running - " ; Sys.Name
end program
Prftprec.PRG:
program
with a1
attach
jerk = 11000
VCruise = 200
acc = 10000
dec = 10000
abs = 1
en = 1
prftype = 1 'sine Acceleration session
record prftp_1.rec 1000000 recdata = a1.AccelCmd, a1.vcmd, a1.PCmd
sleep 100
move 0
while ismoving<>0
sleep 10
end while
recordon
move 100
while ismoving<>0
sleep 10
end while
recordclose
prftype = 2 'Trapezoidal Acceleration session
record prftp_2.rec 1000000 recdata = a1.AccelCmd, a1.vcmd, a1.PCmd
sleep 100
move 0
while ismoving<>0
sleep 10
end while
recordon
move 100
while ismoving<>0
sleep 10
end while
recordclose
prftype = 0 'Trapezoidal Velocity session
record prftp_0.rec 1000000 recdata = a1.AccelCmd, a1.vcmd, a1.PCmd
sleep 100
move 0
while ismoving<>0
sleep 10
end while
recordon
move 100
while ismoving<>0
sleep 10
end while
recordclose
prftype = 1 'Acceleration saturation case - Sine Acceleration ProfilerType
acc = 100
dec = 100
sleep 100
move 0
while ismoving<>0
sleep 10
end while
record acceEd_1.rec 1000000 recdata = a1.AccelCmd , a1.vcmd, a1.PCmd
recordon
move 100
while ismoving<>0
sleep 10
end while
recordclose
prftype = 2 'Acceleration saturation case - Trapezoidal Acceleration ProfilerType
acc = 1000
dec = 1000
sleep 100
move 0
while ismoving<>0
sleep 10
end while
record acceEd_2.rec 1000000 recdata = a1.AccelCmd , a1.vcmd, a1.PCmd
recordon
move 100
while ismoving<>0
sleep 10
end while
recordclose
detach
end with
end program
Short form
<element>.PrfType
Syntax
<element>.profilertype = <numeric expression>
Availability
Since Version 4.5.25
Type
Long
Range
-1 to 3
Default
-1 (from 4.7.3 version only)
Scope
Configuration, Task, Terminal
Limitations
Modal/Nodal