This is an example application demonstrating building an EtherCAT system using Esmacat
Dependencies: EsmacatShield X_NUCLEO_IHM01A1
Basic Information of Esmacat
Information about Esmacat and EASE is provided in the link below. https://os.mbed.com/users/esmacat/code/EASE_Example/wiki/Homepage
Information about the hardware needs and setup is provided in the link below. https://os.mbed.com/users/esmacat/code/EASE_Example/wiki/Hardware-Setup
Information about the structure of the system and it's software is provided in the link below. https://os.mbed.com/users/esmacat/code/EASE_Example/wiki/Software
About this example
This is an example application to demonstrate the ease with which a system, which communicates over EtherCAT, can be build. It measures the RPM of a motor using a proximity sensor.
Following lists the hardware required
- 2 x Mbed boards with Arduino UNO form factor (NUCLEO-F103RB)
- 2 x EASE boards
- 1 x proximity sensor shield (X_NUCLEO_6180XA1)
- 1 x Motor shield (X-NUCLEO-IHM01A1)
- 1 x stepper motor
- 1 x Ethernet POE injector with a 24VDC power supply
- 2 x Ethernet cables
- Keyboard, mouse, and monitor
- PC with Linux/Windows OS installed
- DC power supply for motor
Click here to know more about this Example
Diff: main.cpp
- Revision:
- 29:a80a213c3c94
- Parent:
- 27:e09aa231c16d
- Child:
- 34:543d0d1147d9
--- a/main.cpp Wed Aug 03 10:11:21 2016 +0000 +++ b/main.cpp Thu Sep 08 12:39:58 2016 +0000 @@ -60,7 +60,9 @@ #define DELAY_3 6000 #define DELAY_4 8000 -/* Speed in step/s. */ +/* Speed in pps (Pulses Per Second). + In Full Step mode: 1 pps = 1 step/s). + In 1/N Step Mode: N pps = 1 step/s). */ #define SPEED_1 2400 #define SPEED_2 1200 @@ -70,10 +72,10 @@ /* Initialization parameters. */ L6474_Init_t init = { - 160, /* Acceleration rate in step/s2. Range: (0..+inf). */ - 160, /* Deceleration rate in step/s2. Range: (0..+inf). */ - 1600, /* Maximum speed in step/s. Range: (30..10000]. */ - 800, /* Minimum speed in step/s. Range: [30..10000). */ + 160, /* Acceleration rate in pps^2. Range: (0..+inf). */ + 160, /* Deceleration rate in pps^2. Range: (0..+inf). */ + 1600, /* Maximum speed in pps. Range: (30..10000]. */ + 800, /* Minimum speed in pps. Range: [30..10000). */ 250, /* Torque regulation current in mA. Range: 31.25mA to 4000mA. */ L6474_OCD_TH_750mA, /* Overcurrent threshold (OCD_TH register). */ L6474_CONFIG_OC_SD_ENABLE, /* Overcurrent shutwdown (OC_SD field of CONFIG register). */