IMDHMIControls LibraryShop main store

Selection guide

Why a CANopen slave gateway cannot run the master

Industrial networks Published 8 min read By IMDHMI controls team

Short answer

Select the RevPi Con CAN module on a RevPi Connect or RevPi Connect+ and run CODESYS Control on it as the CANopen master. The RevPi Gate CANopen Slave module only answers on the bus and cannot take the master role, so it is the wrong part for commanding a CANopen slave encoder.

On this page
  1. Which module connects a CANopen encoder to a RevPi Connect?
  2. Why can the RevPi Gate CANopen Slave not act as the master?
  3. What does the RevPi Con CAN module give CODESYS?
  4. How do you set the CANopen master up in CODESYS?
  5. Which node address and bit rate does the encoder need?
  6. What do you order for a new machine and what for an existing RevPi?
  7. What faults remain after the right module is fitted?
  8. Questions asked

The reason is a role rule: a CANopen slave gateway only accepts what a master sends, and the master role — network management, SDO configuration, cyclic PDO traffic — is something no configuration can move onto a slave's CAN side. So for a RevPi Connect running CODESYS, order the RevPi Con CAN module, fit it to a RevPi Connect or RevPi Connect+, and run CODESYS Control on that RevPi as the CANopen master. The RevPi Gate CANopen Slave module is the wrong part for this job: a slave answers to a master, and it never issues the network management, SDO configuration or cyclic PDO traffic a CANopen master owes the bus, so buying the slave module for this task inverts the roles. Below you get the module decision as a table, the role logic behind it, the CODESYS setup, the node addressing arithmetic, and the faults that remain once the right module is fitted.

Which module connects a CANopen encoder to a RevPi Connect? #

Order the RevPi Con CAN module for the RevPi Connect or RevPi Connect+ and run CODESYS Control on it as the CANopen master; the RevPi Gate CANopen Slave module cannot fill that role and cannot command your encoder.

Module Role on the CANopen network Select it when
RevPi Con CAN CAN interface for the CODESYS master stack CODESYS Control on the RevPi must manage the bus and command slaves such as the encoder
RevPi Gate CANopen Slave CANopen slave gateway Another device is already the master and the RevPi must appear on the bus as one slave device

The parts list for the master arrangement is three items: the RevPi Connect or Connect+ as the controller, the RevPi Con CAN module as the CAN interface, and CODESYS Control running on the RevPi in the CANopen master role. If the RevPi already sits on the machine and only the bus is missing, the Con CAN module alone is the addition. Confirm before ordering that the sensor really is a CANopen slave; the rotary encoder in this kind of project is one, and its datasheet names the device profile it follows.

Why can the RevPi Gate CANopen Slave not act as the master? #

The Gate CANopen Slave module is a gateway whose CAN side is defined as a slave: it waits for configuration and traffic, it never sends the NMT commands, SDO requests and PDO scheduling that the CiA DS 301 master owes the bus, so advice steering you to it inverts the roles.

CiA's CANopen scheme splits the network by role. The master manages it: it drives node states over network management (NMT), reads and writes each slave's object dictionary over service data objects (SDO), and schedules the cyclic process data objects (PDO) that carry live values such as encoder position. A slave accepts all of that and originates none of it. The Gate CANopen Slave module is built for the accepting side; its own name states the role its CAN side takes. Device profiles build on the DS 301 communication profile — CiA requires conformity with DS 301 before a device profile applies — so both roles implement one rulebook from opposite chairs, and no configuration moves the slave chair to the master chair.

A gateway always plays the role its network side assigns it, the same discipline the article Why a RevPi Connect S needs a PROFINET gateway for an S7-1500 applies when the topology follows from network roles. If the plan is for CODESYS on the RevPi to command the encoder, the slave gateway cannot be configured into that job.

What does the RevPi Con CAN module give CODESYS? #

The Con CAN module provides the physical CAN interface that CODESYS Control binds its CANopen manager to, so the manager can run the DS 301 master services — network management, SDO configuration and the PDO schedule — on the RevPi Connect or Connect+.

The manager is software: NMT state control, SDO access to each slave's object dictionary and the cyclic PDO traffic all come from the CODESYS Control stack, with the Con CAN module as its way onto the wire. How many slaves such a master can manage is a published specification of the master product, never a constant of the name CANopen: another vendor's CANopen master interface, the AGP3000-CA1M, documents support for up to 63 CANopen slaves, which is exactly the kind of per-product figure to demand here. For the Con CAN plus CODESYS Control pairing, read the node capacity from the documentation for that CODESYS Control configuration before you size the bus; a count you have not read there is unverified.

How do you set the CANopen master up in CODESYS? #

Fit the Con CAN module, add the CAN interface in the CODESYS project, place the CANopen manager on it, import the encoder's EDS file and add the encoder with its node ID, then map the encoder's PDOs into the manager's I/O image and download the project.

  1. Fit the RevPi Con CAN module to the RevPi Connect or Connect+ and wire the encoder onto the bus: CAN high and CAN low, with termination where the encoder manual calls for it.
  2. In the CODESYS project, add the CAN interface under the RevPi and set the bus bit rate there; one setting fixes the rate for the whole segment.
  3. Add the CANopen manager on that interface; it is the master instance.
  4. Install the encoder's EDS file, add the encoder from the device selection, and enter its node ID.
  5. Map the encoder's transmit PDO into the manager's I/O image so the position value lands in a variable your program reads.
  6. Download the project and set the RevPi to run; the manager starts the nodes and opens the PDO traffic.

One safety note belongs here: when CODESYS stops or faults, the master goes silent, and a slave learns that only through the heartbeat mechanism DS 301 defines plus the consumer timeout configured on it. Anything that moves on encoder feedback needs a defined safe state on loss of that heartbeat, decided by the machine's risk assessment, not improvised in the program.

Which node address and bit rate does the encoder need? #

Give the encoder a node ID in the CANopen range of 1 to 127, keep it unique on the bus, and set the identical bit rate on the CODESYS CAN interface and in the encoder configuration, because every value in the default COB-ID arithmetic hangs off that ID.

Worked example: default COB-IDs for an encoder at node 5 #

DS 301 fixes the default COB-IDs from the node ID, and the arithmetic is worth doing once by hand: TPDO 1 transmits on 0x180 + node ID, RPDO 1 listens on 0x200 + node ID, SDO requests arrive at 0x600 + node ID, and SDO replies come from 0x580 + node ID. Take node 5 as the example value assigned with the encoder's own addressing method:

  • TPDO 1: 0x180 + 5 = 0x185 (384 + 5 = 389)
  • RPDO 1: 0x200 + 5 = 0x205 (512 + 5 = 517)
  • SDO request: 0x600 + 5 = 0x605 (1536 + 5 = 1541)
  • SDO reply: 0x580 + 5 = 0x585 (1408 + 5 = 1413)

Those four identifiers are DS 301 defaults, and node 5 is an illustrative input; the encoder's manual decides which of its PDOs carry position by default. If a second device also took node 5, it would answer on the same 0x585 and transmit on the same 0x185, and the bus would corrupt both transfers — that collision is what the uniqueness rule protects.

The bit rate is one setting for the whole segment: use the rate the encoder's manual documents, set it on the CODESYS CAN interface, and leave every other node matched to it. A mismatch looks configured and communicates nothing, and the failure it produces is the error-state pattern covered in the last section.

What do you order for a new machine and what for an existing RevPi? #

For a new machine, order a RevPi Connect or RevPi Connect+, the RevPi Con CAN module and CODESYS Control for that RevPi; for an existing RevPi Connect or Connect+ that already runs CODESYS Control, the Con CAN module is the only extra part.

  • New machine, no controller yet: RevPi Connect or Connect+ plus RevPi Con CAN plus CODESYS Control, with the encoder's EDS and device profile confirmed against the manufacturer's documentation at the same time.
  • RevPi Connect or Connect+ already installed: the Con CAN module is the only hardware addition; check that CODESYS Control is on the RevPi and add it if it is not.
  • Someone offers the RevPi Gate CANopen Slave for this master job: decline it. It cannot take the role, and no later configuration changes that.
  • The reverse project, where another device owns the CANopen bus and the RevPi must join as one slave device: the Gate CANopen Slave is the module that matches that description.

End every purchase with the role check: name which device issues NMT, SDO and the PDO schedule, then buy the module whose documented side matches the answer.

What faults remain after the right module is fitted? #

A correct module choice still leaves bit rate mismatches, duplicate node IDs, a missing or wrong EDS and unmapped PDOs as the first failures you meet, and a wiring or timing fault shows up as the bus degrading into an error state rather than as a clean module error.

Work them in order. A bus where nothing communicates although everything is configured points at the bit rate. A manager that starts some nodes but not one points at that node's ID or its EDS. A manager whose I/O image stays at zero points at PDO mapping. When the bus talks and then degrades — errors climbing until the stack reports an error state — wiring, termination or timing is the suspect, and the CODESYS-side pattern is worked through in Why CODESYS CANopen goes error-passive on a RevPi CAN bus. The master route with the Con CAN keeps diagnosis inside one CODESYS project; a gateway route would add its own data-exchange traps on top.

The decision, restated: RevPi Connect or Connect+, RevPi Con CAN module, CODESYS Control as the CANopen master — that combination runs the CANopen slave encoder. The RevPi Gate CANopen Slave module stays out of this project and belongs to the projects where the RevPi itself must be the slave.

Questions asked

How many CANopen slaves can the RevPi master manage?

Read the node capacity from the documentation of the CODESYS Control configuration you run, because that limit belongs to the master stack, not to the name CANopen. Master products publish it per product — another vendor's CANopen master interface, the AGP3000-CA1M, documents support for up to 63 CANopen slaves — and a count you have not read for your own stack stays unverified.

Does the encoder need an EDS file in CODESYS?

Yes. The CANopen manager builds its view of the encoder from the EDS, the Electronic Data Sheet that describes the object dictionary and the default PDO assignment. Take the EDS for your exact encoder model from the encoder manufacturer; without one you must enter the objects by hand, which costs commissioning time and invites mapping mistakes.

Which node IDs can I assign on the bus?

CANopen node IDs run from 1 to 127, and 0 is reserved for the network management side. Give every participant a different one: two devices sharing an ID answer on the same COB-IDs and corrupt each other's transfers. Set the ID with the encoder's own addressing method, then enter the same value in the manager's device settings.

What bit rate should the bus run?

The rate the encoder's manual documents, applied identically everywhere. CANopen defines standard bit rates up to 1000 kbit/s, but the deciding value is the one your encoder supports, and a single node set differently can hold the whole segment in error states. Check the rate in the CODESYS CAN interface settings and on every device you add later.

Keep reading

  • Explainer

    Why an S7-200 with EM277 cannot be a PROFIBUS master

    No — an S7-200 with an EM277 cannot take the PROFIBUS DP master role. The EM277 is documented only as a DP slave module and the CPU222 only as an MPI slave, so the network needs a controller with an integrated DP master, such as an S7-300 CPU315-2 PN/DP, with the IO-Link master module added as its DP slave.

    Industrial networks

  • Troubleshooting

    Anybus DeviceNet master gateway setup for two IRC5 robots

    Device not initialized on this gateway is a configuration fault; in the reported setup it cleared in the S7-315's PROFIBUS station configuration, not on the trunk. Three masters share one DeviceNet line legally when each owns different slaves: the gateway scans both IRC5 controllers as internal slaves while each robot stays master of its own I/O node, with unique node addresses and byte counts matched on the robot, the gateway and the PLC.

    Industrial networks

  • Explainer

    When a gateway bridges an EtherCAT master to a PROFINET device

    Yes, a gateway can put a PROFINET device behind a ctrlX CORE EtherCAT master, but only one role pair works: the gateway is an EtherCAT slave on the CORE side and a PROFINET controller on the device side. A gateway whose PROFINET side is a device cannot control the target, and a scan in ctrlX-IO Eng proves identity and link, never the target's module configuration or process data. For deterministic PROFINET I/O, run the CORE's own PROFINET controller beside its EtherCAT master instead.

    Industrial networks