 |
ApossC SDK
V01.15
|
This file provides all the function used to setup a MiniMACS6 DS402 slave.
More...
Go to the source code of this file.
|
| long | sdkMiniMACS6_SetupCanBusModule (long axis, long busId, long pdoNumber, long operationMode) |
| | Setup the Can bus module for an MiniMACS6 DS402 slave. More...
|
| |
| long | sdkMiniMACS6_SetupCanVirtAmp (long axis, long maxRpm, long operationMode) |
| | Setup the virtual amplifier for an MiniMACS6 DS402 slave with Can bus. More...
|
| |
| long | sdkMiniMACS6_SetupCanVirtCntin (long axis, long operationMode) |
| | Setup the virtual counter input for an MiniMACS6 DS402 slave with Can bus. More...
|
| |
| long | sdkMiniMACS6_SetupCanSdoParam (long busId, long pdonumber, long slaveAxisNo, long operationMode) |
| | Setup the Sdo parameter for an MiniMACS6 DS402 slave. More...
|
| |
| long | sdkMiniMACS6_AxisHomingStart (long axis, long busId, long operationMode, long &homingState) |
| | State machine function for performing a homing on an MiniMACS6 DS402 slave. More...
|
| |
This file provides all the function used to setup a MiniMACS6 DS402 slave.
The MiniMACS DS402 Slave can be operated in the different modes csp, csv and cst The amplifiers can be controlled via CAN bus. The motor, encoder and controller parameters are set directly on the MiniMACS6 DS402 Application.
- Revision
- 225
Definition in file SDK_Amplifier_MiniMACS6_DS402_Slave.mc.
◆ sdkMiniMACS6_AxisHomingStart()
| long sdkMiniMACS6_AxisHomingStart |
( |
long |
axis, |
|
|
long |
busId, |
|
|
long |
operationMode, |
|
|
long & |
homingState |
|
) |
| |
State machine function for performing a homing on an MiniMACS6 DS402 slave.
This function sets the MiniMACS6 DS402 slave in homing mode and starts the homing defined on the MiniMACS6 DS402 slave. Before calling this function, all homing parameters must be configured on the MiniMACS6 DS402 slave. The function is not blocking. The return parameter must be checked.
- Parameters
-
| axis | Axis module number |
| busId | Bus ID of the connected slave |
| operationMode | Operation mod which should be set after homing. |
| homingState | Call-by-reference variable for the iteration of the different homing states. Must be initialized with 0. |
- Returns
- value: Process value
value > 0 Process successful
value = 0 Process is active
value < 0 Error
- Examples
- CAN_4Ax_MiniMACS6_csp.mc, CAN_4Ax_MiniMACS6_cst.mc, and CAN_4Ax_MiniMACS6_csv.mc.
Definition at line 318 of file SDK_Amplifier_MiniMACS6_DS402_Slave.mc.
321 long time, displayMode;
322 long axOffset = 0x800;
325 switch (homingState) {
327 print(
"sdkMiniMACS6_AxisHomingStart: " ,axis);
333 print(
"...: DS402 Homing AxisNo: ",axis,
" - Set mode of OP: 0x06");
336 print(
"...: DS402 Homing AxisNo: ",axis,
" - Enable Drive");
337 AxisControl(axis, ON);
345 print(
"...: DS402 Homing AxisNo: ",axis,
" - Display mode of OP: ",displayMode);
388 print(
"...: DS402 Homing AxisNo: ",axis,
" - Disable Drive");
389 AxisControl(axis, OFF);
413 if(displayMode== operationMode)
415 print(
"...: DS402 Homing AxisNo: ",axis,
" - Display mode of OP: ",displayMode);
425 print(
"...: DS402 Homing AxisNo: ",axis,
" - Finished");
431 print(
"...: DS402 Homing AxisNo: ",axis,
" - Incorrect hominState init value: ", homingState);
◆ sdkMiniMACS6_SetupCanBusModule()
| long sdkMiniMACS6_SetupCanBusModule |
( |
long |
axis, |
|
|
long |
busId, |
|
|
long |
pdoNumber, |
|
|
long |
operationMode |
|
) |
| |
Setup the Can bus module for an MiniMACS6 DS402 slave.
This function sets up the Can bus module for an MiniMACS6 DS402 slave. It can be defined with which operation mode is used. Currently there are no differences in the different operation modes regarding the Bus Module setup.
- Parameters
-
| axis | Axis module number |
| busId | Bus ID of the connected slave |
| pdoNumber | Used PDO number |
| operationMode | Definition of the operation mode
0x08: Cyclic synchronous position (csp) mode
0x09: Cyclic synchronous velocity (csv) mode n 0x0A: Cyclic synchronous torque (cst) mode |
- Note
- The value passed from "BUSMOD_RXMAP_POVALUE3" is the current torque. The value is given in per thousand of “Motor rated torque”.
- Returns
- value: Always 1 in this function
value > 0 Process successful
value = 0 Process is active
value < 0 Error
- Examples
- CAN_4Ax_MiniMACS6_csp.mc, CAN_4Ax_MiniMACS6_cst.mc, and CAN_4Ax_MiniMACS6_csv.mc.
Definition at line 37 of file SDK_Amplifier_MiniMACS6_DS402_Slave.mc.
39 long busmod, signedFlag;
40 signedFlag = 0x10000000;
43 print(
"sdkMiniMACS6_SetupCanBusModule: ", busmod);
60 print(
"...: cycle synchronous position (csp) mode");
65 print(
"...: cycle synchronous velocity (csv) mode");
70 print(
"...: cycle synchronous torque (cst) mode");
74 print(
"...: not supported operation mode");
◆ sdkMiniMACS6_SetupCanSdoParam()
| long sdkMiniMACS6_SetupCanSdoParam |
( |
long |
busId, |
|
|
long |
pdonumber, |
|
|
long |
slaveAxisNo, |
|
|
long |
operationMode |
|
) |
| |
Setup the Sdo parameter for an MiniMACS6 DS402 slave.
This function sets up the Sdo parameter for an MiniMACS6 DS402 slave. It can be defined with which operation mode is used. Each axis is controlled via its own PDO. A maximum of 4 axes can be controlled.
- Parameters
-
| busId | Bus ID of the connected slave |
| pdoNumber | Used PDO number |
| slaveAxisNo | Axis module number of the slave (0-5) |
| operationMode | Definition of the operation mode
0x08: Cyclic synchronous position (csp) mode
0x09: Cyclic synchronous velocity (csv) mode n 0x0A: Cyclic synchronous torque (cst) mode |
- Returns
- value: Process value
value > 0 Process successful
value = 0 Process is active
value < 0 Error
- Examples
- CAN_4Ax_MiniMACS6_csp.mc, CAN_4Ax_MiniMACS6_cst.mc, and CAN_4Ax_MiniMACS6_csv.mc.
Definition at line 230 of file SDK_Amplifier_MiniMACS6_DS402_Slave.mc.
233 long nodeid, last_value;
234 long axOffset = 0x8000000;
235 nodeid = busId % 100000;
237 print(
"sdkMiniMACS6_SetupCanSdoParam: " ,nodeid);
240 SdoWrite(busId, 0x2203, 0x13, 1);
264 print(
"...: cycle synchronous position (csp) mode");
269 print(
"...: cycle synchronous velocity (csv) mode");
274 print(
"...: cycle synchronous torque (cst) mode");
277 print(
"...: not supported operation mode");
◆ sdkMiniMACS6_SetupCanVirtAmp()
| long sdkMiniMACS6_SetupCanVirtAmp |
( |
long |
axis, |
|
|
long |
maxRpm, |
|
|
long |
operationMode |
|
) |
| |
Setup the virtual amplifier for an MiniMACS6 DS402 slave with Can bus.
This function sets up the virtual amplifier with Can bus for an MiniMACS6 DS402 slave. It can be defined with which operation mode is used.
- Parameters
-
| axis | Axis module number |
| maxRpm | Definition of the maximum motor speed [rpm] |
| operationMode | Definition of the operation mode
0x08: Cyclic synchronous position (csp) mode
0x09: Cyclic synchronous velocity (csv) mode n 0x0A: Cyclic synchronous torque (cst) mode |
- Note
- The value passed from "PO_BUSMOD_VALUE3" to "VIRTAMP_PISRC_CURRENT" is the current torque. The value is given in per thousand of “Motor rated torque”.
- Returns
- value: Always 1 in this function
value > 0 Process successful
value = 0 Process is active
value < 0 Error
- Examples
- CAN_4Ax_MiniMACS6_csp.mc, CAN_4Ax_MiniMACS6_cst.mc, and CAN_4Ax_MiniMACS6_csv.mc.
Definition at line 112 of file SDK_Amplifier_MiniMACS6_DS402_Slave.mc.
114 print(
"sdkMiniMACS6_SetupCanVirtAmp: ",axis );
143 print(
"...: cycle synchronous position (csp) mode");
149 print(
"...: cycle synchronous velocity (csv) mode");
155 print(
"...: cycle synchronous torque (cst) mode");
159 print(
"...: not supported operation mode");
◆ sdkMiniMACS6_SetupCanVirtCntin()
| long sdkMiniMACS6_SetupCanVirtCntin |
( |
long |
axis, |
|
|
long |
operationMode |
|
) |
| |
Setup the virtual counter input for an MiniMACS6 DS402 slave with Can bus.
This function sets up the virtual counter input for an MiniMACS6 DS402 slave. It can be defined with which operation mode is used.
- Parameters
-
| axis | Axis module number |
| operationMode | Definition of the operation mode
0x08: Cyclic synchronous position (csp) mode
0x09: Cyclic synchronous velocity (csv) mode n 0x0A: Cyclic synchronous torque (cst) mode |
- Returns
- value: Process value
value > 0 Process successful
value = 0 Process is active
value < 0 Error
- Examples
- CAN_4Ax_MiniMACS6_csp.mc, CAN_4Ax_MiniMACS6_cst.mc, and CAN_4Ax_MiniMACS6_csv.mc.
Definition at line 183 of file SDK_Amplifier_MiniMACS6_DS402_Slave.mc.
185 print(
"sdkMiniMACS6_SetupCanVirtCntin: ",axis);
192 print(
"...: cycle synchronous position (csp) mode");
197 print(
"...: cycle synchronous velocity (csv) mode");
202 print(
"...: cycle synchronous torque (cst) mode");
206 print(
"...: not supported operation mode");
#define VIRTCNTIN_MODE
Counter mode.
#define BUSMOD_MODE_ACTIVATE_NOSTOP
#define VIRTCOUNTIN_PARAM(modno, parno)
Virtual Counter Inputs parameters: Setter.
#define VIRTAMP_PROCESS_SRCINDEX(modno, parno)
Virtual Amplifier Process Data: Source Index.
#define VIRTAMP_CNTRLW_QUICKSTOP
Controlword to stop drive with internal ramps.
#define BUSMOD_ID
Slave node id.
#define MINIMACS6_RECEIVE_PDO_1_PARAMETER
OBJECT DICTIONARY - MiniMACS6 DS402 Slave.
#define VIRTAMP_ERROR_POLARITY
Polarity of Error Bit.
#define VIRTAMP_CNTRLW_RESET
Controlword to reset from error.
#define MINIMACS6_MODES_OF_OPERATION_DISPLAY
#define VIRTAMP_READY_BITMASK
Bitmask to detect drive ready condition.
#define VIRTAMP_PISRC_CMDWORD
Index/subindex of command word.
#define VIRTAMP_REF100PERC
Output reference value to use at 100 percent.
#define VIRTAMP_READY_POLARITY
Polarity of Ready Bit.
#define MINIMACS6_TRANSMIT_PDO_1_MAPPING
#define BUSMOD_RXMAP_POVALUE2
Mapping for RX PDOs (receive from bus)
#define BUSMOD_BUSTYPE
Bus type.
#define BUSMOD_MODE_ACTIVATE
#define PO_VIRTAMP_REFVEL
Output reference velocity.
#define PO_BUSMOD_VALUE1
Output value of the RX PDOs.
#define VIRTAMP_PISRC_STATUS
Index/subindex of status.
#define BUSMOD_BUSTYPE_CAN
#define VIRTCNTIN_MODE_ABSOLUTE
#define REG_REFERENCE
Actual reference value generated by position control loop.
#define BUSMOD_PISRC_INPUT2
Index and subindex of Input value.
#define BUSMOD_TXMAP_INPUT1
Mapping for TX PDOs (send to bus)
#define MINIMACS6_RECEIVE_PDO_1_MAPPING
#define VIRTAMP_PARAM(modno, parno)
Virtual Amplifier Parameters: Setter.
#define BUSMOD_RXMAP_POVALUE1
Mapping for RX PDOs (receive from bus)
#define VIRTAMP_ERROR_BITMASK
Bitmask to detect error condition.
#define REG_USERREFCUR
Motor current reference value in AxisControl(USERREFCUR) mode.
#define BUSMOD_BUSNO
Bus number.
#define VIRTAMP_STOPDELAY
Delay after a STOP command.
#define BUSMOD_PROCESS_SRCINDEX(modno, parno)
Bus Module Process Data: Source Index.
#define VIRTAMP_PROCESS(modno, parno)
Virtual Amplifier Process Data: Setter.
#define VIRTAMP_PISRC_REFACC
Index/subindex of acceleration/current reference.
#define MINIMACS6_MODES_OF_OPERATION
#define PO_BUSMOD_VALUE3
Output value of the RX PDOs.
#define PO_VIRTAMP_CMDWORD
Output command word.
#define VIRTAMP_CNTRLW_PWRONENN
Controlword to use in power on enable negative direction state (could be same as above)
#define VIRTAMP_PISRC_CURRENT
Index/subindex of current.
#define VIRTAMP_CNTRLW_PWRONENP
Controlword to use in power on enable positive direction state.
#define BUSMOD_MODE_DEACTIVATE
#define VIRTAMP_MODE_ENABLE
#define PO_VIRTAMP_REFPOS
Output reference position.
#define REG_COMPOS
Set-point position value.
#define AXE_PROCESS_SRCINDEX(modno, parno)
Axis Process Data: Source Index.
#define BUSMOD_MODE
Activate / Deactivate.
#define VIRTAMP_MODE
Mode of operation.
#define BUSMOD_SYNC
Sync interval (only for CAN)
#define MINIMACS6_TRANSMIT_PDO_1_PARAMETER
#define VIRTAMP_CNTRLW_PWROFF
Controlword to use in power off state.
#define BUSMOD_RXMAP_POVALUE3
Mapping for RX PDOs (receive from bus)
#define VIRTAMP_PISRC_REFPOS
Index/subindex of position reference.
#define BUSMOD_GUARDTIME
Guard interval.
#define BUSMOD_PISRC_INPUT1
Index and subindex of Input value.
#define PO_VIRTAMP_STATUS
Status.
#define VIRTCNTIN_MODE_ABSOLUTE_DIRECT
#define VIRTAMP_PISRC_REFVEL
Index/subindex of velocity reference.
#define VIRTAMP_REFLIMIT
Output reference limit.
#define BUSMOD_PARAM(modno, parno)
Bus Module Parameters: Setter.
#define VIRTAMP_CNTRLW_PWRONDIS
Controlword to use in power on disable state.
#define BUSMOD_TXMAP_INPUT2
Mapping for TX PDOs (send to bus)
#define VIRTCNTIN_PISRC_COUNTER
Index/subindex of counter source.
#define PO_BUSMOD_VALUE2
Output value of the RX PDOs.
Data Sheets |
Released Software |
Software Manuals |
Hardware Manuals |
Maxon Shop
Maxon Support Center