Difference between revisions of "EtherCAT:EC SET MOTION OPMODE"
m |
|||
Line 2: | Line 2: | ||
|DESCRIPTION= | |DESCRIPTION= | ||
− | This subroutine sets the axis and the drive | + | This subroutine sets the axis and the drive to a motion operational mode.<br/> |
− | In EtherCAT it is not | + | In EtherCAT it is not sufficient to set the axis opmode property. The drive opmode must also be set.<br/> |
− | + | The value of object 0x6060 is written to the drive via PDO or SDO according to the new opmode.<br/> | |
− | + | Object 0x6061 confirms whether the opmode is correctly set.<br/> | |
{{Note/Important| | {{Note/Important| | ||
− | If the axis is set to Torque Mode, the property [[MC-Basic:axis.SUMTORQUE|sumTorque]] is set to ON by default !}} | + | If the axis is set to Torque Mode, the property [[MC-Basic:axis.SUMTORQUE|sumTorque]] is set to ON by default!}} |
− | |||
− | |||
|INPUT= | |INPUT= | ||
Line 23: | Line 21: | ||
|EXCEPTIONS= | |EXCEPTIONS= | ||
− | This subroutine throws the exception EC_OPMODE_CHANGE_FAILED if the drive | + | This subroutine throws the exception EC_OPMODE_CHANGE_FAILED if the drive was not successfully set to the desired opmode, |
− | or if the argument <new opmode> is not valid | + | or if the argument <new opmode> is not valid. |
|DECLARATION= | |DECLARATION= |
Revision as of 13:37, 13 January 2015
This subroutine sets the axis and the drive to a motion operational mode.
In EtherCAT it is not sufficient to set the axis opmode property. The drive opmode must also be set.
The value of object 0x6060 is written to the drive via PDO or SDO according to the new opmode.
Object 0x6061 confirms whether the opmode is correctly set.
IMPORTANT | |
If the axis is set to Torque Mode, the property sumTorque is set to ON by default! |
Input
Generic axis
New opmode - POSITIONMODE, VELOCITYMODE or TORQUEMODE
Output
None
Return Value
Void
Declaration
Public Sub EC_SET_MOTION_OPMODE(Ax as generic axis, byval new_opmode as long)
Syntax
call EC_SET_MOTION_OPMODE(<Axis>, <new opmode>)
Exceptions
This subroutine throws the exception EC_OPMODE_CHANGE_FAILED if the drive was not successfully set to the desired opmode, or if the argument <new opmode> is not valid.
Examples
call EC_SET_MOTION_OPMODE(MLeader, VelocityMode)