MC-Basic:axis.DRIVEOPMODE

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

This command allows you to change the operation mode of the controller. <axis>.DRIVEOPMODE may be changed from Primary Opmode to the Secondary Opmodes in CP4 when Primary Opmode ( IDN 32 ) and one or more Secondary Opmodes (IDN 33, IDN 34) are defined in CP 2 (Refer to the SERCOS IDN Reference Manual).

For example :

'sercos.phase=2

'primary OpMode definition as position opmode
    wival drive=A1.dadd IDN=32 value=3

'secondary OpMode1 definition as torque opmode
    wival drive=A1.dadd IDN=33 value=1

'secondary OpMode2 definition

wival drive=A1.dadd IDN=34 value=2

Syntax

<axis>.DriveOpMode

? <axis>.DriveOpMode

Type

Long

Range

0 to 2
0 = Opmode ,defined as Primary                              ( IDN 32 )
1 = Opmode ,defined as Secondary Opmode1         ( IDN 33 )
2 = Opmode ,defined as Secondary Opmode2         ( IDN 34 )

Default

0

Scope

Configuration, Task, Terminal

Write Access       Read/Write  : Read/Write in CP4

Limitations

Primary Opmode and  Secondary Opmodes must be defined in CP2. Executed only in SERCOS communication phase 4.

Examples

?Axes1.DriveOpMode
       Axes1.DriveOpMode=2