Skip to main content

EtherCAT

danger

This node-type is currently under development.

Prerequisites

This node-type requires the IgH EtherCAT Master (>= 1.5.2).

Implementation

The source code of the node-type is available here: https://github.com/VILLASframework/node/blob/master/lib/nodes/ethercat.cpp

Configuration

rate
number
object (Input configuration (received by VILLASnode))
object (Output configuration (sent out by VILLASnode))
vectorize
integer
Default: 1

This setting allows to send multiple samples in a single message to the destination nodes.

The value of this setting determines how many samples will be combined into one packet.

Array of Hook Object (object) or Hook Name (string) (hook_list)
builtin
boolean (Builtin hook functions)
Default: true

By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.

{
  • "rate": 0,
  • "in": {
    },
  • "out": {
    },
  • "vectorize": 1,
  • "hooks": [
    ],
  • "builtin": true
}

Example

node/etc/examples/nodes/ethercat.conf
ethercat = {
coupler = {
position = 0
vendor_id = 0x00000002 # Beckhoff
product_code = 0x044c2c52 # EK1100
}

alias = 0
master = 0
}

nodes = {
ethercat_node = {
type = "ethercat"

rate = 1000.0 # Rate of master cyclic task

# Analog Input Slave
in = {
num_channels = 8
range = 10.0 # -10.0 V to +10.0 V

position = 2
vendor_id = 0x00000002 # Beckhoff
product_code = 0x0bc03052 # EL3008

# PDOs are currently hardcoded!
}

# Analog Output Slave
out = {
num_channels = 8
range = 10.0 # -10.0 V to +10.0 V

position = 1
vendor_id = 0x00000002 # Beckhoff
product_code = 0x0fc63052 # EL4038

# PDOs are currently hardcoded!
}
}
}