Master
A type “IoDrvEtherCAT” instance is generated for each EtherCAT Master added to the device tree.
Name | Data Type | Description |
---|---|---|
xRestart | BOOL | Rising edge: The master is restarted and all configuration parameters are reloaded. |
xStopBus | BOOL | TRUE: Communication is stopped. No further EtherCAT telegrams are sent. Then, because they were switched to error status, most devices must be restarted. |
Name | Data Type | Description |
---|---|---|
xConfigFinished | BOOL | TRUE: All configuration parameters were successfully transmitted. Communication is running on the bus. |
xDistributedClockInSync | BOOL | When distributed clocks are used, the PLC is synchronized with the first EtherCAT slave for which the distributed clock option is enabled. |
xError | BOOL | The output becomes TRUE if |
xSyncInWindow | BOOL | Output is TRUE when the option “Sync Window Monitoring” is activated and the synchronization of all slaves is within the synch window. |
Examples
- Initiate a master restart via the “xRestart” variable:
EtherCAT_Master.xRestart := xRestart;
- Stop communication to the bus via the “xStop” variable:
EtherCAT_Master.xStopBus := xStop;
- Call the master to retrieve information regarding the success of the configuration parameter download:
EtherCAT_Master(); xFinish := EtherCAT_Master.xConfigFinished;
Parameter | Description |
---|---|
AutoSetOperational | TRUE: Master attempts to restart the slaves immediately after a communication interruption. |
ConfigRead | TRUE: Reading the configuration has ended and the user can edit the settings, e.g., to add self-defined SDOs. |
DCInSyncWindow | Timeframe for XDistributedClockInSync. Jitter must remain within this timeframe so the output signal “XDistributedClockInSync” always stays at TRUE. |
DCClockReferenceTime | Returns the current time of the first slave with activated distributed clock. This time serves as reference time for all other slaves and the PLC itself. |
DCIntegralDivider | Integral factor for the distributed clock control loop; |
DCPropFactor | Proportional factor for the distributed clock control loop; |
DCSyncToMaster | Distributed-clock synchronization on the master when set to TRUE; then all slaves are synchronized to the master instead of synchronization of the first slave with the PLC. |
DCSyncToMasterWithSysTime | Distributed-clock synchronization on the master |
EnableTaskOutputMessage | Normally, EtherCAT messages are sent from the bus task and from each task that uses slave outputs. In the bus task, all outputs are written and all inputs read. In other tasks, the outputs are transmitted once more, so they immediately arrive to be written in the corresponding slaves. This is an attempt to keep dead time until writing as short as possible. In conjunction with distributed clocks, this may cause problems in some devices; for instance, servo controllers are not synchronized with “synch interrupt”; instead, they use the time of the writing for internal synchronization. In this case, multiple writing accesses may occur during a cycle. When “EnableTaskOutputMessage” is set to FALSE, only the bus cycle task is used. No other tasks will cause additional messages. |
FirstSlave | Pointer to the first slave below the master |
FrameAtTaskStart | TRUE: To minimize jitter, the frame for the slaves is transmitted to start the task (before the IEC task). This command is used to ensure servo drive movements are smooth and not jerky. When this flag is set to TRUE, the frame of the output buffer is written in the next cycle (see diagram below). |
LastInstance | Pointer to linked master list -> preceding master |
LastMessage | This property returns a string with the last message from the EtherCAT stack. “All slaves done” is returned if the start is successful. The string used is the same as the one for the diagnostics message displayed in the EtherCAT Master Device Editor window during online mode. |
NextInstance | Pointer to linked master list -> next master |
NumberActiveSlaves | This property returns the number of slaves that are actually connected. StartConfigWithLessDevice := TRUE: The number of real devices can be returned. |
OpenTimeout | Timeout for opening the network adapter. |
StartConfigWithLessDevice | Used to affect the starting behavior of the stack. Normally, EtherCAT stack stops when, for example, five servo controllers are configured in a project but only three are connected. However, if StartConfigWithLessDevice := TRUE in the first cycle, the stack will try to start anyhow. This makes it possible to, for instance, arrange a universal configuration of 10 servo controllers but still be able to vary the number that are actually connected. Note that in any case, the manufacturer and product IDs of each slave are checked. If any discrepancies are determined, the stack is stopped. |