User Tools

Site Tools


getting_started:tutorials:controlsystemcan1

This is an old revision of the document!


Control System Using CAN

CAN Raw

In the EEROS library you will find a directory with examples. For this example see CAN Examples. The first example (CANexample1) uses a simple control system with a block sending raw CAN frames to a MYACTUATOR RMD-X series drive and another one receiving from the drive.
Open a shell in the build directory of your EEROS library and run

$ sudo ./examples/can/canExample1

CANopen

A second example uses CANopen. Open a shell in the build directory of your EEROS library and run

$ sudo ./examples/can/canExample2

The system comprises a control system, a safety system and a sequencer with a few sequences. The example assumes that you have two drives in your CAN network. The node identifiers are '1' and '2'. Read more about the functionality of the canreceivefaulhaber and cansendfaulhaber blocks.

Control System

The control system basically has just a block to send CAN packages to the drives and another block to receive information from them. You have to adjust the scaling for the sending and receiving block according to your gearboxes and encoders.

Safety System

The safety system incorporates a few levels with the necessary events to switch between them. The exit handler serves to shutdown the system in a controlled way.

Sequencer

The most important sequence is the initSequence. It initialyzes the drives (by NMT commands and SDO transfers) and brings them up to operational mode (by PDO transfers). The moveSequence simply turns the motors back and forth while logging the velocity and the position. The stopSequence disables the drives before the program ends.

getting_started/tutorials/controlsystemcan1.1718018707.txt.gz · Last modified: 2024/06/10 13:25 by ursgraf