 |
ApossC SDK
V01.15
|
Go to the documentation of this file.
42 slaveNo = (busId-1000000);
44 print(
"sdkEpos4_SetupECatBusModule: ",busmod );
55 print(
"...: cycle synchronous position (csp) mode");
60 print(
"...: cycle synchronous velocity (csv) mode");
65 print(
"...: cycle synchronous torque (cst) mode");
69 print(
"...: not supported operation mode");
103 print(
"sdkEpos4_SetupECatVirtAmp: ",axis );
128 print(
"...: cycle synchronous position (csp) mode");
134 print(
"...: cycle synchronous velocity (csv) mode");
140 print(
"...: cycle synchronous torque (cst) mode");
144 print(
"...: not supported operation mode");
170 print(
"sdkEpos4_SetupECatVirtCntin: ",axis);
177 print(
"...: cycle synchronous position (csp) mode");
182 print(
"...: cycle synchronous velocity (csv) mode");
186 print(
"...: not supported operation mode");
214 print(
"sdkEpos4_SetupECatSdoParam Ax: ",busId,
" pdoNumber ",pdoNumber);
216 SdoWriten( busId, sm_TX, 0x00, 1, 0x00);
217 SdoWriten( busId, sm_RX, 0x00, 1, 0x00);
251 SdoWriten( busId, sm_TX, 1, 2, 0x1600);
252 SdoWriten( busId, sm_TX, 0, 1, 1);
254 SdoWriten( busId, sm_RX, 1, 2, 0x1A00 );
255 SdoWriten( busId, sm_RX, 0, 1, 1);
263 print(
"...: change axis direction");
273 print(
"...: cycle synchronous position (csp) mode");
278 print(
"...: cycle synchronous velocity (csv) mode");
282 print(
"...: cycle synchronous torque (cst) mode");
286 print(
"...: not supported operation mode");
315 long busmod, signedFlag;
317 signedFlag = 0x10000000;
319 print(
"sdkEpos4_SetupCanBusModule: ", busmod);
335 print(
"...: cycle synchronous position (csp) mode");
340 print(
"...: cycle synchronous velocity (csv) mode");
345 print(
"...: cycle synchronous torque (cst) mode");
349 print(
"...: not supported operation mode");
385 print(
"sdkEpos4_SetupCanVirtAmp: ",axis );
410 print(
"...: cycle synchronous position (csp) mode");
416 print(
"...: cycle synchronous velocity (csv) mode");
422 print(
"...: cycle synchronous torque (cst) mode");
426 print(
"...: not supported operation mode");
452 print(
"sdkEpos4_SetupCanVirtCntin: ",axis);
459 print(
"...: cycle synchronous position (csp) mode");
464 print(
"...: cycle synchronous velocity (csv) mode");
469 print(
"...: cycle synchronous torque (cst) mode");
473 print(
"...: not supported operation mode");
500 long nodeid, last_value;
501 nodeid = busId % 100000;
503 print(
"sdkEpos4_SetupCanSdoParam: " ,nodeid);
505 if (axisPolarity==1){
507 print(
"...: change axis direction");
554 print(
"...: cycle synchronous position (csp) mode");
559 print(
"...: cycle synchronous velocity (csv) mode");
564 print(
"...: cycle synchronous torque (cst) mode");
567 print(
"...: not supported operation mode");
610 long time, displayMode;
611 long homingMethode = 0;
615 switch (homingState) {
617 print(
"sdkEpos4_AxisHomingStart: " ,axis);
619 print(
"...: EPOS4 Homing AxisNo: ",axis,
" - Homing methode: ",homingMethode);
623 print(
"...: EPOS4 Homing AxisNo: ",axis,
" - Enable drive");
626 AxisControl(axis, USERREFVEL);
630 print(
"...: EPOS4 Homing AxisNo: ",axis,
" - Set mode of OP: 0x06");
638 print(
"...: EPOS4 Homing AxisNo: ",axis,
" - Display mode of OP: ",displayMode);
682 SdoWriten(busId, 0x6060, 0, 1, operationMode );
704 if(displayMode== operationMode)
706 print(
"...: EPOS4 Homing AxisNo: ",axis,
" - Display mode of OP: ",displayMode);
716 print(
"...: EPOS4 Homing AxisNo: ",axis,
" - Disable Drive");
717 AxisControl(axis, OFF);
722 print(
"...: EPOS4 Homing AxisNo: ",axis,
" - Incorrect hominState value: ", homingState);
738 case EPOS4_F_NO_ERROR:
741 case EPOS4_F_GENERIC:
742 printf(
"Generic error.");
744 case EPOS4_F_GENERIC_INIT1:
745 case EPOS4_F_GENERIC_INIT2:
746 case EPOS4_F_GENERIC_INIT3:
747 case EPOS4_F_GENERIC_INIT4:
748 case EPOS4_F_GENERIC_INIT5:
749 case EPOS4_F_GENERIC_INIT6:
750 case EPOS4_F_GENERIC_INIT7:
751 case EPOS4_F_GENERIC_INIT8:
752 case EPOS4_F_GENERIC_INIT9:
753 printf(
"Generic initialization error.");
755 case EPOS4_F_FIRMWARE_INCOMPATIBILITY:
756 printf(
"Firmware incompatibility.");
758 case EPOS4_F_OVERCURRENT:
759 printf(
"Overcurrent.");
761 case EPOS4_F_POWER_STAGE_PROTECTION:
762 printf(
"Power stage protection.");
764 case EPOS4_F_OVERVOLTAGE:
765 printf(
"Overvoltage.");
767 case EPOS4_F_UNDERVOLTAGE:
768 printf(
"Undervoltage.");
770 case EPOS4_F_THERMAL_OVERLOAD:
771 printf(
"Thermal overload.");
773 case EPOS4_F_THERMAL_MOTOR_OVERLOAD:
774 printf(
"Thermal motor overload.");
776 case EPOS4_F_LOGIC_VOLTAGE_LOW:
777 printf(
"Logic supply voltage too low.");
779 case EPOS4_F_HARDWARE_DEFECT:
780 printf(
"Hardware defect.");
782 case EPOS4_F_HARDWARE_INCOMPATIBILITY:
783 printf(
"Hardware incompatibility.");
785 case EPOS4_F_HARDWARE1:
786 case EPOS4_F_HARDWARE2:
787 case EPOS4_F_HARDWARE3:
788 case EPOS4_F_HARDWARE4:
789 printf(
"Hardware error.");
791 case EPOS4_F_SIGN_OF_LIFE:
792 printf(
"Sign of life.");
794 case EPOS4_F_EXT_1_WATCHDOG:
795 printf(
"Extension 1 watchdog.");
797 case EPOS4_F_INTERNAL_SOFTWARE:
798 printf(
"Internal software.");
800 case EPOS4_F_SOFTWARE_PARAM:
801 printf(
"Software parameter error.");
803 case EPOS4_F_PERSISTENT_PARAM_CORRUPT:
804 printf(
"Persistent param corrupt.");
806 case EPOS4_F_POSITION_SENSOR:
807 printf(
"Position sensor error.");
809 case EPOS4_F_POSITION_BREACH:
810 printf(
"Position breach.");
812 case EPOS4_F_POSITION_RESOLUTION:
813 printf(
"Position resolution error.");
815 case EPOS4_F_POSITION_INDEX:
816 printf(
"Position index.");
818 case EPOS4_F_HALL_SENSOR:
819 printf(
"Hall sensor error.");
821 case EPOS4_F_HALL_NOT_FOUND:
822 printf(
"Hall not found.");
824 case EPOS4_F_HALL_ANGLE:
825 printf(
"Hall angle detection error.");
827 case EPOS4_F_SSI_SENSOR:
828 printf(
"SSI sensor.");
830 case EPOS4_F_SSI_FRAME:
831 printf(
"SSI frame.");
833 case EPOS4_F_MISSING_MAIN_SENSOR:
834 printf(
"Missing main sensor.");
836 case EPOS4_F_MISSING_COMM_SENSOR:
837 printf(
"Missing comm sensor.");
839 case EPOS4_F_MAIN_SENSOR_DIR:
840 printf(
"Main sensor direction.");
842 case EPOS4_F_CAN_OVERRUN_OBJ_LOST:
843 printf(
"CAN overrun (object lost).");
845 case EPOS4_F_CAN_OVERRUN:
846 printf(
"CAN overrun.");
848 case EPOS4_F_CAN_PASSIVE_MODE:
849 printf(
"CAN passive mode.");
851 case EPOS4_F_CAN_HEARTBEAT:
852 printf(
"CAN heartbeat error.");
854 case EPOS4_F_CAN_PDO_COB_ID_COLLISION:
855 printf(
"CAN PDO COB-ID collision.");
857 case EPOS4_F_ETHERCAT_COMM:
858 printf(
"EtherCAT communication error.");
860 case EPOS4_F_ETHERCAT_INIT:
861 printf(
"EtherCAT initialization error.");
863 case EPOS4_F_ETHERCAT_RX_QUEUE:
864 printf(
"EtherCAT Rx queue overflow error.");
866 case EPOS4_F_ETHERCAT_COMM_INTERNAL:
867 printf(
"EtherCAT communication (internal) error.");
869 case EPOS4_F_ETHERCAT_CYCLE_TIME:
870 printf(
"EtherCAT communication cycle time error.");
872 case EPOS4_F_CAN_BUS_OFF:
873 printf(
"CAN bus turned off.");
875 case EPOS4_F_CAN_RX_QUEUE:
876 printf(
"CAN Rx queue overflow.");
878 case EPOS4_F_CAN_TX_QUEUE:
879 printf(
"CAN Tx queue overflow.");
881 case EPOS4_F_CAN_PDO_LENGTH:
882 printf(
"CAN PDO length error.");
884 case EPOS4_F_RPDO_TIMEOUT:
885 printf(
"RPDO timeout.");
887 case EPOS4_F_ETHERCAT_PDO_COMM:
888 printf(
"EtherCAT PDO communication error.");
890 case EPOS4_F_ETHERCAT_SDO_COMM:
891 printf(
"EtherCAT SDO communication error.");
893 case EPOS4_F_FOLLOWING:
894 printf(
"Following error.");
896 case EPOS4_F_NEG_LIMIT_SWITCH:
897 printf(
"Negative limit switch error.");
899 case EPOS4_F_POS_LIMIT_SWITCH:
900 printf(
"Positive limit switch error.");
902 case EPOS4_F_SOFTWARE_POSITION_LIMIT:
903 printf(
"Software position limit error.");
906 printf(
"STO error.");
908 case EPOS4_F_SYSTEM_OVERLOADED:
909 printf(
"System overloaded.");
911 case EPOS4_F_WATCHDOG:
912 printf(
"Watchdog error.");
914 case EPOS4_F_SYSTEM_PEAK_OVERLOADED:
915 printf(
"System peak overloaded.");
917 case EPOS4_F_CONTROLLER_GAIN:
918 printf(
"Controller gain error.");
920 case EPOS4_F_AUTO_TUNING_ID:
921 printf(
"Auto tuning identification error.");
923 case EPOS4_F_AUTO_TUNING_CURRENT_LIMIT:
924 printf(
"Auto tuning current limit error.");
926 case EPOS4_F_AUTO_TUNING_ID_CURRENT:
927 printf(
"Auto tuning identification current error.");
929 case EPOS4_F_AUTO_TUNING_DATA_SAMPLING:
930 printf(
"Auto tuning data sampling error.");
932 case EPOS4_F_AUTO_TUNING_SAMPLE_MISMATCH:
933 printf(
"Auto tuning sample mismatch error.");
935 case EPOS4_F_AUTO_TUNING_PARAM:
936 printf(
"Auto tuning parameter error.");
938 case EPOS4_F_AUTO_TUNING_AMPLITUDE_MISMATCH:
939 printf(
"Auto tuning amplitude mismatch error.");
941 case EPOS4_F_AUTO_TUNING_TIMEOUT:
942 printf(
"Auto tuning timeout error.");
944 case EPOS4_F_AUTO_TUNING_STANDSTILL:
945 printf(
"Auto tuning standstill error.");
947 case EPOS4_F_AUTO_TUNING_TORQUE_INVALID:
948 printf(
"Auto tuning torque invalid error.");
950 case EPOS4_F_AUTO_TUNING_MAX_SPEED:
951 printf(
"Auto tuning max system speed error.");
953 case EPOS4_F_AUTO_TUNING_MOTOR_CONNECTION:
954 printf(
"Auto tuning motor connection error.");
956 case EPOS4_F_AUTO_TUNING_SENSOR_SIGNAL:
957 printf(
"Auto tuning sensor signal error.");
960 if(errorCode >= 0x6180 && errorCode <= 0x61F0)
962 printf(
"Internal software error.");
966 printf(
"Unknown error code: 0x%04X\n", errorCode);
#define VIRTCNTIN_MODE
Counter mode.
long sdkEpos4_SetupECatVirtCntin(long axis, long operationMode)
Setup the virtual counter input for an Epos4 with EtherCat.
long sdkEpos4_SetupCanVirtAmp(long axis, long maxRpm, long operationMode)
Setup the virtual amplifier for an Epos4 with Can bus.
#define BUSMOD_MODE_ACTIVATE_NOSTOP
#define EPOS4_MODES_OF_OPERATION_DISPLAY
#define EPOS4_RECEIVE_PDO_3_PARAMETER
#define VIRTCOUNTIN_PARAM(modno, parno)
Virtual Counter Inputs parameters: Setter.
#define VIRTAMP_PROCESS_SRCINDEX(modno, parno)
Virtual Amplifier Process Data: Source Index.
#define EPOS4_INTERPOLATION_TIME_PERIOD
#define VIRTAMP_CNTRLW_QUICKSTOP
Controlword to stop drive with internal ramps.
#define BUSMOD_ID
Slave node id.
#define BUSMOD_BUSTYPE_ECAT_M
#define VIRTAMP_ERROR_POLARITY
Polarity of Error Bit.
#define VIRTAMP_CNTRLW_RESET
Controlword to reset from error.
Declaration of the Epos4 function.
#define EPOS4_TRANSMIT_PDO_4_MAPPING
long sdkEpos4_AxisHomingStart(long axis, long busId, long operationMode, long &homingState)
State machine function for performing a homing on an EPOS4.
#define EPOS4_SYNC_MANAGER_2_PDO_ASSIGNMENT
#define EPOS4_RECEIVE_PDO_1_PARAMETER
#define VIRTAMP_PISRC_CMDWORD
Index/subindex of command word.
long sdkEpos4_SetupCanBusModule(long axis, long busId, long pdoNumber, long operationMode)
Setup the Can bus module for an Epos4.
#define EPOS4_TRANSMIT_PDO_1_PARAMETER
#define VIRTAMP_REF100PERC
Output reference value to use at 100 percent.
#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 EPOS4_MODES_OF_OPERATION
#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 CANSYNCTIMER
Cycle time for sending SYNC telegrams on the CAN bus.
#define BUSMOD_TXMAP_INPUT1
Mapping for TX PDOs (send to bus)
long sdkEpos4_SetupECatBusModule(long axis, long busId, long pdoNumber, long operationMode)
Setup the ECAT bus module for an Epos4.
#define EPOS4_TRANSMIT_PDO_3_PARAMETER
#define VIRTAMP_PARAM(modno, parno)
Virtual Amplifier Parameters: Setter.
#define EPOS4_TRANSMIT_PDO_4_PARAMETER
#define BUSMOD_RXMAP_POVALUE1
Mapping for RX PDOs (receive from bus)
#define VIRTAMP_ERROR_BITMASK
Bitmask to detect error condition.
#define EPOS4_RECEIVE_PDO_3_MAPPING
#define EPOS4_TRANSMIT_PDO_1_MAPPING
#define EPOS4_TRANSMIT_PDO_2_MAPPING
#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.
long sdkEpos4_SetupECatVirtAmp(long axis, long maxRpm, long operationMode)
Setup the virtual amplifier for an Epos4 with EtherCat.
#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 EPOS4_RECEIVE_PDO_2_MAPPING
#define VIRTAMP_CNTRLW_PWRONENP
Controlword to use in power on enable positive direction state.
#define BUSMOD_MODE_DEACTIVATE
#define EPOS4_RECEIVE_PDO_2_PARAMETER
#define EPOS4_TRANSMIT_PDO_2_PARAMETER
#define VIRTAMP_MODE_ENABLE
void sdkEpos4_PrintErrorDescription(long errorCode)
Prints a error description for Epos4 errors.
#define PO_VIRTAMP_REFPOS
Output reference position.
#define EPOS4_SYNC_MANAGER_3_PDO_ASSIGNMENT
#define REG_COMPOS
Set-point position value.
#define AXE_PROCESS_SRCINDEX(modno, parno)
Axis Process Data: Source Index.
long sdkEpos4_SetupECatSdoParam(long busId, long pdoNumber, long axisPolarity, long operationMode)
Setup the Sdo parameter for an Epos4 with EtherCat.
#define EPOS4_RECEIVE_PDO_4_MAPPING
#define BUSMOD_MODE
Activate / Deactivate.
#define EPOS4_TRANSMIT_PDO_3_MAPPING
#define EPOS4_HOMING_METHOD
#define VIRTAMP_MODE
Mode of operation.
#define EPOS4_AXIS_CONFIGURATION
#define BUSMOD_SYNC
Sync interval (only for CAN)
#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 GLB_PARAM(parno)
Global Parameters: Setter.
#define BUSMOD_GUARDTIME
Guard interval.
#define BUSMOD_PISRC_INPUT1
Index and subindex of Input value.
long sdkEpos4_SetupCanVirtCntin(long axis, long operationMode)
Setup the virtual counter input for an Epos4 with Can bus.
#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 EPOS4_RECEIVE_PDO_4_PARAMETER
#define BUSMOD_TXMAP_INPUT2
Mapping for TX PDOs (send to bus)
#define VIRTCNTIN_PISRC_COUNTER
Index/subindex of counter source.
long sdkEpos4_SetupCanSdoParam(long busId, long pdonumber, long axisPolarity, long operationMode)
Setup the Sdo parameter for an Epos4.
#define PO_BUSMOD_VALUE2
Output value of the RX PDOs.
#define EPOS4_RECEIVE_PDO_1_MAPPING
Data Sheets |
Released Software |
Software Manuals |
Hardware Manuals |
Maxon Shop
Maxon Support Center