Difference between revisions of "EtherCAT:EC SET MOTION OPMODE"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Template:EtherCAT-Function |DESCRIPTION= This subroutine sets the axis and the drive into a desired motion operational opmode.<br/> In EtherCAT it is not enough to set the ...")
 
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Languages|EtherCAT:EC_SET_MOTION_OPMODE}}
 
{{Template:EtherCAT-Function
 
{{Template:EtherCAT-Function
  
 
|DESCRIPTION=
 
|DESCRIPTION=
This subroutine sets the axis and the drive into a desired motion operational opmode.<br/>
+
This subroutine sets the axis and the drive to a motion operational mode.<br/>
In EtherCAT it is not enough to set the axis' opmode property. The drive needs to be dealt as well.<br/>
+
In EtherCAT it is not sufficient to set the axis opmode property. The drive opmode must also be set.<br/>
According to the new opmode value object 0x6060 is written to the drive via PDO or SDO.<br/>
+
The value of object 0x6060 is written to the drive via PDO or SDO according to the new opmode.<br/>
Opmode set success is confirmed via object 0x6061.<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 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=
Generic axis, new opmode.
+
Generic axis<br/>
 +
New opmode - POSITIONMODE, VELOCITYMODE or TORQUEMODE
  
 
|OUTPUT=
 
|OUTPUT=
Line 20: Line 20:
 
|RETURN VALUE=
 
|RETURN VALUE=
 
Void
 
Void
 +
 +
|LIMITATIONS=
 +
In case of switching to TORQUEMODE the axis must be attached to the calling task
 +
 +
|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.
  
 
|DECLARATION=
 
|DECLARATION=
Line 31: Line 38:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[EtherCAT:EC ETHERCAT INIT|EC_ETHERCAT_INIT]]
+
* [[MC-Basic:axis.SUMTORQUE|sumTorque]]
  
 
}}
 
}}

Latest revision as of 18:01, 6 May 2017

Language: English  • 中文(简体)‎

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.svgIMPORTANT
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>)

Limitations

In case of switching to TORQUEMODE the axis must be attached to the calling task

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)

See Also