Ce document n'est actuellement disponible qu'en anglais.
- What operating mode should be chosen by the EPOS4 or IDX?
- What is the difference in between the "Cyclic" and "Profile" operating modes?
- Why is a master controller required and what are its tasks?
- What means "real time"?
Answers & Technical background:
I.) EPOS4 stand-alone -> No!
I.1.) EPOS4 = CiA 402 slave device
The EPOS4 is a so-called CANopen resp. EtherCAT "Motion Control Slave" based on the "CAN in Automation" standard CiA 402 "Device profile for drives and motion control". Such a system design requires a superordinate master controller which commands the motor controller(s) according to the CiA 402 standard.
I.2.) Tasks of the master controller
The master controller (just called Master) processes the superordinate control program which sends motion commands to each motor controller (EPOS4). The transmitted commands might be based on sensor signals, next action steps, or system states processed by the master. The master also receives and checks drive related data (e.g. position, speed, torque) provided by each motor controller.
The master is in charge to provide a machine's or hand tool's required functionality and often acts as an user interface too. A bus interface like RS232, USB, CAN, or EtherCAT is the communication link in between the master controller and all slaves (e.g. motor controllers).
- The selection of the bus interface (USB, RS232, CAN, or EtherCAT) depends on the demands of the application and system too, esp. concerning the required data exchange performance.
- The EPOS4 can exchange data quite fast at a rate down to 1 ms by CAN or EtherCAT.
- In case of a fast cyclic data exchange in the range of 1 ... 10 ms this is typically called a "real-time" requirement.
- In case of a "real-time" requirement there is the need for CAN or EtherCAT as the bus interface but there is the demand to use "real-time" capable master controller (like a PLC or maxon's MasterMACS). A simple master based on a Windows or Linux operating system is not sufficient in this case.
- Real-time master controllers often process so-called trajectory generation (= motion profiling) for multiple axes and command the motor controller(s) by cyclic updated target data. This data is used as the set values by the position, velocity, or current control loop of the motor controllers (EPOS4).
- EPOS4 (like all CiA402 slaves) always demand for a master controller.
- The required performance, functionality, bus interface, and "real-time" feature of a master controller (resp. its selection) always depends on the requirements of the concrete application and system design.
II.) Selection of a master controller and EPOS4's operating mode?
II.1.) EPOS4 operated in a "Profile" operating mode
If there is just a single drive present or the motion profiles of a multiple axes system are almost independent of each other, the EPOS4 is often operated in "PPM - Profile Position Mode" (or "PVM - Profile Velocity Mode").
- In case of a "Profile" operating mode (PPM, PVM, HM) the EPOS4 processes trajectory generation, position resp. velocity control, and current control by its own based on the provided "Profile acceleration", "Profile Deceleration", "Profile Velocity", and "Target position" (resp. "Target Velocity").
- The master controller's application program sets these EPOS4 motion parameters and starts or stops the motion by a command.
- The EPOS4 does the calculation of intermediate position values within the profiled motion based on the configured motion parameters every position control cycle (i.e. every 0.4 ms) by its own.
- A simple master like a PC, Raspberry Pi, or microcontroller (and an application code written in C, C++, C#, or Python) can do such a job as long as there are no additional real-time requirements (e.g. data exchange and number crunching every some ms) present by an application.
If a master controller has to be real-time capable (due a required fast data exchange), there is the need for a CANopen or EtherCAT interface to transmit data by so-called SYNC PDOs. Application code based on maxon's "EPOS Command Library" or maxon LabView VIs do not support any PDO data exchange and cannot(!) fulfill any real-time requirements (independent of the interface in use).
Please find some more information about the data exchange rates of the "EPOS Command Library" by the following linked Support Center document:
-> EPOS Command Library: Data exchange rates?
II.2.) EPOS4 operated in "Cyclic" modes or fast data exchange
In case of multi-axis systems which demand for some kind of coordinated or even synchronized motions (e.g. different robotic joints) there is the need of a so-called "real-time" master commanding the motor controllers (e.g. EPOS4). Such a "real-time" master processes motion path calculation (= "trajectory generation") for all axes to ensure a coordinated motion taking any dependencies in between different drives into account. The master transmits updated target position, velocity, or current set values in a fast, predictable cyclic rate (typ. 1 ms) to the motor controllers (EPOS4). These updated set values go straight into the motor controller's control loops in case of the "Cyclic" operating modes (CSP, CSV, CST) . A precise bus cycle is a precondition for any smooth motor control and motor operation. The EPOS4 can provide lots of different process and drive data (e.g. actual position, velocity, motor current) to the master within each bus cycle too.
- If there is motion profiling by the master required in case of single or multi-axis application, there is the need for a "real-time" master. This typically means using a PLC or maxon's MACS controllers as a superordinate master controller. Motion profiling, multi-axis control or synchronization is processed by the master's application program based on a so-called NC- or Softmotion library.
- The EPOS4 is typically operated in one of the "Cyclic" operating modes then, mainly "CSP - Cyclic Synchronous Position". In case of CSP mode the EPOS4 has to rely on a real-time master which transmits updated "Target Position" data at a precise, cyclic rate (typ. every 1 ms).
II.3.) Tasks of a master depending on the operating mode of the motor controller
Please find some presentation attached (as charts and handouts) explaining the different operating modes of the EPOS4 and the shared tasks in between the master and EPOS4 (resp. any CiA 402 based motor controller).
III.) Bus cycle rates
The EPOS4 offers CAN or EtherCAT bus cycle rates of maximum 1 kHz. Although the resulting shortest bus cycle time of 1 ms is higher than the position control cycle time of 0.4 ms (equal 2.5 kHz), this does not mean any drawback in practice. There is a well-known "rule of thumb" which states that the cycle time of subordinated control loops (= EPOS4) has to be equal or better faster than the control or bus cycle time of its superordinate system (= master). This requirement is fulfilled in case of a bus cycle time of 1 ms and the EPOS4's position control cycle time of 0.4 ms. It is actually industry-proven by thousands of different EPOS4 applications in the meanwhile. EPOS4's internal control structure follows the "rule of thumb" too and is based on a subordinated 25 kHz current control loop rate (= 0.04 ms) which is ten times faster than the position control loop (of 2.5 kHz).
- A bus rate of 1 kHz is more than sufficient for most applications.
- Especially in case of multi-axis system or complex machine controls even a "real-time" master (e.g. PLC) might be limited by its processing power splitting up for different tasks. Finally this can result in the fact that master just transmits updated data at a bus cycle time slower than 1 ms. Quite often there might be a master's bus cycle time of 2 ms, 4 ms, or worst case up to 10 ms in use then.
- The EPOS4 can adapt to slower bus cycle times than 1 ms. In case of CSP or CSV mode there is an interpolation processed by the EPOS4 in between the master's cyclic updated target values to provide perfect intermediate set values to the control loops' shorter cycle times. This interpolation is based on the configured value of the object "Interpolation time period" (0x60C2/01) and relies on a master's precise SYNC timing (= bus cycle time) corresponding to the configured EPOS4's value.
Finally it depends on an application's demands ...
- ... what system design and controller structure is required.
- ... what drive components, controllers and bus interface(s) should be in use for best results.
If the motion profile of a drive unit can be processed by the EPOS4 by its own based on some configured acceleration, target speed, and target position data (without the need for fast periodic interaction or information exchange by a master), ...
- ... a PC, Raspberry Pi, or most microcontrollers can act as a master controller which configures and starts EPOS4's next motion.
- ... there is often USB, RS232, or CAN interface in use.
- ... the application program can be based on maxon's "EPOS command library" (processed by a PC or Raspberry Pi).
The "EPOS Command Library" offers a simple API (= "Application Programming Interface") for most motion control tasks and operating modes. There is almost no knowledge or experience of the CiA 402 standard or bus protocol required.
- ... there will be typically "PPM - Profile Position Mode" and "HM - Homing Mode" in use to command the EPOS4.
If a fast cyclic deterministic data exchange (every 1 ... 10 ms) or some kind of coordinated or synchronized commanding and control of multiple axes (e.g. of a machine or robot) required, ...
- ... the usage of a superordinate "real time" master (e.g. PLC or maxon's MACS controllers) is mandatory.
It is an advantage if the master supplier also provides a so-called NC- or motion control library to command motor controllers based on the CiA 402 standard.
- ... a CAN or EtherCAT interface has to be in use but not(!) USB or RS232.
- ... there will be typically one of the "Cyclic" operating modes (CSP, CSV, CST) in use - mainly "CSP - Cyclic Synchronous Position" mode.
The "real-time" master processes motion path calculation (= "Trajectory Generator") and transmits updated target position data to the EPOS4 based on a cyclic data exchange by CAN or EtherCAT.
- ... some base knowledge about motion control commanding based on CiA 402 standard is required.
It is always a precondition that there is some base programming knowledge and experience present for the chosen master system. maxon cannot provide programming training by the means of support for the wide variety of different possible master systems, microcontrollers, and related specific IDEs (= "Integrated Development Environments").