<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"></p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
Dear all,</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
I have tried to bring up the Omron ethercat coupler with some digital inputs and outputs modules. With the help of the example code I can read out the value from digital input modules. But with the digital output module, I always get the error msg: "AL status
message 0x001B: "Sync manager watchdog"." </p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
I have read some messages from the other users, it looks like that related to the settings of SM2 sync manager watchdog, and I have tried to do "PDO writting" in each cycle time. But I still get this error. Maybe some one can help me with this. </p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
Thanks in advance.</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
Below is the code which is based on the "user" sample code and some debug Info:</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
(1) PDO structure</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</p>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[developer:~]$ sudo ethercat cstruct 18:17</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[sudo] password for developer: </div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/* Master 0, Slave 0, "NX-ECC201"</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
* Vendor ID: 0x00000083</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
* Product code: 0x00000083</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
* Revision number: 0x00010002</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
*/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ec_pdo_entry_info_t slave_0_pdo_entries[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x01, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x02, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x03, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x04, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x0000, 0x00, 12}, /* Gap */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x3003, 0x04, 128},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x3006, 0x04, 128},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x300a, 0x02, 64},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x2002, 0x01, 8},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x0000, 0x00, 8}, /* Gap */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ec_pdo_info_t slave_0_pdos[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x1600, 4, slave_0_pdo_entries + 0},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x17f6, 1, slave_0_pdo_entries + 4},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x1bf8, 3, slave_0_pdo_entries + 5},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x1bff, 1, slave_0_pdo_entries + 8},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x1bf4, 1, slave_0_pdo_entries + 9},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ec_sync_info_t slave_0_syncs[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{2, EC_DIR_OUTPUT, 2, slave_0_pdos + 0, EC_WD_ENABLE},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{3, EC_DIR_INPUT, 3, slave_0_pdos + 2, EC_WD_DISABLE},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0xff}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
};</div>
<br style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">********************************************************</span><br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><br>
</span></p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"></span></p>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[developer:~]$ sudo ethercat pdos 18:19</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
SM0: PhysAddr 0x2800, DefaultSize 256, ControlRegister 0x26, Enable 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
SM1: PhysAddr 0x2a00, DefaultSize 256, ControlRegister 0x22, Enable 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
SM2: PhysAddr 0x1000, DefaultSize 0, ControlRegister 0x64, Enable 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
RxPDO 0x1600 ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x7000:01, 1 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x7000:02, 1 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x7000:03, 1 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x7000:04, 1 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
RxPDO 0x17f6 ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x0000:00, 12 bit, "Gap"</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
SM3: PhysAddr 0x1c00, DefaultSize 0, ControlRegister 0x20, Enable 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
TxPDO 0x1bf8 ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x3003:04, 128 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x3006:04, 128 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x300a:02, 64 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
TxPDO 0x1bff ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x2002:01, 8 bit, ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
TxPDO 0x1bf4 ""</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
PDO entry 0x0000:00, 8 bit, "Gap"</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">/*****************************************************************************/</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">/*****************************************************************************/<br>
</span></div>
<br style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
(2) The code:</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</p>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <errno.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <signal.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <stdio.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <string.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <sys/resource.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <sys/time.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <sys/types.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <unistd.h></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <time.h> /* clock_gettime() */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <sys/mman.h> /* mlockall() */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include <sched.h> /* sched_setscheduler() */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#include "ecrt.h"</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/** Task period in ns. */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define PERIOD_NS (5000000) // 5ms</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define MAX_SAFE_STACK (8 * 1024) /* The maximum stack size which is</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
guranteed safe to access without</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
faulting */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/* Constants */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define NSEC_PER_SEC (1000000000)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define FREQUENCY (NSEC_PER_SEC / PERIOD_NS)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// EtherCAT</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_master_t *master = NULL;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_master_state_t master_state = {};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_domain_t *domain1 = NULL;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_domain_state_t domain1_state = {};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_slave_config_t *sc_digit_out = NULL;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_slave_config_state_t sc_digit_out_state = {};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// process data</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static uint8_t *domain1_pd = NULL;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define BusCouplerPos 0, 0</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define DigOutSlavePos 0, 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define OMRON_ECC201 0x00000083, 0x00000083 //Omron ethercat coupler</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
#define OMRON_OD3256 0x00000001, 0x00133256 //Omron (4) digital output</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// offsets for PDO entries</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static unsigned int off_dig_out;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static unsigned int off_dig_out_bit0;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static unsigned int off_dig_out_bit1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static unsigned int off_dig_out_bit2;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static unsigned int off_dig_out_bit3;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// ------- output of "ethercat pdos" ------------- </div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
///* Master 0, Slave 0, "NX-ECC201"</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// * Vendor ID: 0x00000083</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// * Product code: 0x00000083</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// * Revision number: 0x00010002</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
//ec_pdo_entry_info_t slave_0_pdo_entries[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
//this is from the digital output</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x7000, 0x01, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x7000, 0x02, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x7000, 0x03, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x7000, 0x04, 1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x0000, 0x00, 12}, /* Gap */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x3003, 0x04, 128},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x3006, 0x04, 128},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x300a, 0x02, 64},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x2002, 0x01, 8},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x0000, 0x00, 8}, /* Gap */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
//};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
//ec_pdo_info_t slave_0_pdos[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x1600, 4, slave_0_pdo_entries + 0},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x17f6, 1, slave_0_pdo_entries + 4},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x1bf8, 3, slave_0_pdo_entries + 5},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x1bff, 1, slave_0_pdo_entries + 8},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0x1bf4, 1, slave_0_pdo_entries + 9},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
//};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
//ec_sync_info_t slave_0_syncs[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {2, EC_DIR_OUTPUT, 2, slave_0_pdos + 0, EC_WD_ENABLE},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {3, EC_DIR_INPUT, 3, slave_0_pdos + 2, EC_WD_DISABLE}, //There are 2 output here, but one looks like the "Gap"</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// {0xff}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
//};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
const static ec_pdo_entry_reg_t domain1_regs[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// 4 ditig output</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0, 1, OMRON_OD3256, 0x7000, 0x01, &off_dig_out, &off_dig_out_bit0},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0, 1, OMRON_OD3256, 0x7000, 0x02, &off_dig_out, &off_dig_out_bit1},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0, 1, OMRON_OD3256, 0x7000, 0x03, &off_dig_out, &off_dig_out_bit2},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0, 1, OMRON_OD3256, 0x7000, 0x04, &off_dig_out, &off_dig_out_bit3},</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static unsigned int counter = 0;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static unsigned int blink = 0;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/*****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// Digital out ------------------------</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_pdo_entry_info_t oc3256_channels[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x01, 1}, // Value 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x02, 1}, // Value 2</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x03, 1}, // Value 3</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x7000, 0x04, 1} // Value 4</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_pdo_info_t oc3256_pdos[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{0x1600, 4, oc3256_channels + 0}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
static ec_sync_info_t oc3256_syncs[] = {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{2, EC_DIR_OUTPUT, 1, oc3256_pdos, EC_WD_ENABLE} // I am using only one output here, as the other one looks like just a (12 bit) "Gap"</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/*****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
void check_domain1_state(void)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ec_domain_state_t ds;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ecrt_domain_state(domain1, &ds);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ds.working_counter != domain1_state.working_counter) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("Domain1: WC %u.\n", ds.working_counter);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ds.wc_state != domain1_state.wc_state) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("Domain1: State %u.\n", ds.wc_state);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
domain1_state = ds;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/*****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
void check_master_state(void)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ec_master_state_t ms;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ecrt_master_state(master, &ms);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ms.slaves_responding != master_state.slaves_responding) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("%u slave(s).\n", ms.slaves_responding);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ms.al_states != master_state.al_states) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("AL states: 0x%02X.\n", ms.al_states);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ms.link_up != master_state.link_up) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("Link is %s.\n", ms.link_up ? "up" : "down");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
master_state = ms;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/*****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
void check_slave_config_states(void)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ec_slave_config_state_t s;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ecrt_slave_config_state(sc_digit_out, &s);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (s.al_state != sc_digit_out_state.al_state) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("DigitalOutput: State 0x%02X.\n", s.al_state);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (s.online != sc_digit_out_state.online) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("DigitalOutput: %s.\n", s.online ? "online" : "offline");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (s.operational != sc_digit_out_state.operational) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("DigitalOutput: %soperational.\n", s.operational ? "" : "Not ");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
sc_digit_out_state = s;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/*****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
void cyclic_task()</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// receive process data</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ecrt_master_receive(master);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ecrt_domain_process(domain1);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// check process data state</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
check_domain1_state();</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (counter) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
counter--;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
} else { // do this at 1 Hz</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
counter = FREQUENCY;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// calculate new process data</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
blink = !blink;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// check for master state (optional)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
check_master_state();</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// check for slave configuration state(s) (optional)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
check_slave_config_states();</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// write process data</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
EC_WRITE_U8(domain1_pd + off_dig_out, 0x06); //write some value to digital output</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// send process data</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ecrt_domain_queue(domain1);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ecrt_master_send(master);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
void stack_prefault(void)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
unsigned char dummy[MAX_SAFE_STACK];</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
memset(dummy, 0, MAX_SAFE_STACK);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/****************************************************************************/</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
int main(int argc, char **argv)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
{</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ec_slave_config_t *sc;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
struct timespec wakeup_time;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
int ret = 0;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
master = ecrt_request_master(0);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (!master) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
domain1 = ecrt_master_create_domain(master);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (!domain1) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (!(sc_digit_out = ecrt_master_slave_config(</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
master, DigOutSlavePos, OMRON_OD3256))) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
fprintf(stderr, "Failed to get slave configuration.\n");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// ----- I am using 1 as the argument, as one entry is in the <span style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">oc3256_syncs, not sure if this is correct -----</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ecrt_slave_config_pdos(sc_digit_out, 1, oc3256_syncs)) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
fprintf(stderr, "Failed to configure PDOs.\n");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
// Create configuration for bus coupler</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
sc = ecrt_master_slave_config(master, BusCouplerPos, OMRON_ECC201);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (!sc) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ecrt_domain_reg_pdo_entry_list(domain1, domain1_regs)) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
fprintf(stderr, "PDO entry registration failed!\n");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("Activating master...\n");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ecrt_master_activate(master)) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (!(domain1_pd = ecrt_domain_data(domain1))) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return -1;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/* Set priority */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
struct sched_param param = {};</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
param.sched_priority = sched_get_priority_max(SCHED_FIFO);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("Using priority %i.", param.sched_priority);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
perror("sched_setscheduler failed");</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
/* Lock memory */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (mlockall(MCL_CURRENT | MCL_FUTURE) == -1) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
fprintf(stderr, "Warning: Failed to lock memory: %s\n",</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
strerror(errno));</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
stack_prefault();</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
printf("Starting RT task with dt=%u ns.\n", PERIOD_NS);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
clock_gettime(CLOCK_MONOTONIC, &wakeup_time);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
wakeup_time.tv_sec += 1; /* start in future */</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
wakeup_time.tv_nsec = 0;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
while (1) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
ret = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME,</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
&wakeup_time, NULL);</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
if (ret) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
fprintf(stderr, "clock_nanosleep(): %s\n", strerror(ret));</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
break;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
cyclic_task();</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
wakeup_time.tv_nsec += PERIOD_NS;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
while (wakeup_time.tv_nsec >= NSEC_PER_SEC) {</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
wakeup_time.tv_nsec -= NSEC_PER_SEC;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
wakeup_time.tv_sec++;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
return ret;</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">/*****************************************************************************/</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">/*****************************************************************************/<br>
</span></div>
<br style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
(3) Output of the debug msg:</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</p>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[Nov 2 17:55] EtherCAT: Requesting master 0...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0: IDLE -> OPERATION.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000001] EtherCAT: Successfully requested master 0.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0: ecrt_master_create_domain(master = 0xffff88043e88e000)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000001] EtherCAT DEBUG 0: Created domain 0.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xffff88043e88e000, alias = 0, position = 1, vendor_id = 0x00000001, product_code = 0x00133256)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT DEBUG 0: Creating slave configuration for 0:1, 0x00000001/0x00133256.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000051] EtherCAT DEBUG 0 0:1: Failed to find slave for configuration.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000006] EtherCAT DEBUG 0 0:1: ecrt_slave_config_sync_manager(sc = 0xffff88043d40e000, sync_index = 3, dir = 1, watchdog_mode = 1)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_assign_clear(sc = 0xffff88043d40e000, sync_index = 3)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_assign_add(sc = 0xffff88043d40e000, sync_index = 3, pdo_index = 0x1600)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000005] EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_clear(sc = 0xffff88043d40e000, pdo_index = 0x1600)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc = 0xffff88043d40e000, pdo_index = 0x1600, entry_index = 0x7000, entry_subindex = 0x01, entry_bit_length = 1)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000005] EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc = 0xffff88043d40e000, pdo_index = 0x1600, entry_index = 0x7000, entry_subindex = 0x02, entry_bit_length = 1)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000012] EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc = 0xffff88043d40e000, pdo_index = 0x1600, entry_index = 0x7000, entry_subindex = 0x03, entry_bit_length = 1)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000007] EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc = 0xffff88043d40e000, pdo_index = 0x1600, entry_index = 0x7000, entry_subindex = 0x04, entry_bit_length = 1)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000005] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xffff88043e88e000, alias = 0, position = 0, vendor_id = 0x00000083, product_code = 0x00000083)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0: Creating slave configuration for 0:0, 0x00000083/0x00000083.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000007] EtherCAT DEBUG 0 0:0: Attached slave 0.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000009] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xffff88043e88e000, alias = 0, position = 1, vendor_id = 0x00000001, product_code = 0x00133256)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000005] EtherCAT DEBUG 0 0:1: ecrt_slave_config_reg_pdo_entry(sc = 0xffff88043d40e000, index = 0x7000, subindex = 0x01, domain = 0xffff8803d0b6e980, bit_position = 0xffff88008a803d6c)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0: Domain 0: Added 1 bytes, total 1.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xffff88043e88e000, alias = 0, position = 1, vendor_id = 0x00000001, product_code = 0x00133256)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0 0:1: ecrt_slave_config_reg_pdo_entry(sc = 0xffff88043d40e000, index = 0x7000, subindex = 0x02, domain = 0xffff8803d0b6e980, bit_position = 0xffff88008a803d6c)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xffff88043e88e000, alias = 0, position = 1, vendor_id = 0x00000001, product_code = 0x00133256)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000005] EtherCAT DEBUG 0 0:1: ecrt_slave_config_reg_pdo_entry(sc = 0xffff88043d40e000, index = 0x7000, subindex = 0x03, domain = 0xffff8803d0b6e980, bit_position = 0xffff88008a803d6c)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xffff88043e88e000, alias = 0, position = 1, vendor_id = 0x00000001, product_code = 0x00133256)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000005] EtherCAT DEBUG 0 0:1: ecrt_slave_config_reg_pdo_entry(sc = 0xffff88043d40e000, index = 0x7000, subindex = 0x04, domain = 0xffff8803d0b6e980, bit_position = 0xffff88008a803d6c)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000034] EtherCAT DEBUG 0: ecrt_domain_external_memory(domain = 0xffff8803d0b6e980, mem = 0xffffc90002da5000)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0: ecrt_master_callbacks(master = 0xffff88043e88e000, send_cb = 0xffffffffc078dbe0, receive_cb = 0xffffffffc078c240, cb_data = 0xffff88043e88e000)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0: ecrt_master_activate(master = 0xffff88043e88e000)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0: Adding datagram pair with expected WC 1.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT 0: Domain0: Logical address 0x00000000, 1 byte, expected working counter 1.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 1 byte, type LWR.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT DEBUG 0: Stopping master thread.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000006] EtherCAT DEBUG 0: Master IDLE thread exiting...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000010] EtherCAT 0: Master thread exited.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT DEBUG 0: FSM datagram is ffff88043e88e678.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT 0: Starting EtherCAT-OP thread.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000442] EtherCAT DEBUG 0: Operation thread running with fsm interval = 4000 us, max data size=45000</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000005] EtherCAT DEBUG 0: mmap()</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0: Vma fault, offset = 0, page = ffffea000f406dc0</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,959383] EtherCAT DEBUG 0: Configuration changed (aborting state check).</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT WARNING 0: No app_time received up to now, but master already active.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000001] EtherCAT DEBUG 0: Requesting OP...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,007980] EtherCAT DEBUG 0-0: Changing state from PREOP to OP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: Configuring...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002970] EtherCAT DEBUG 0-0: Now in INIT.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT DEBUG 0-0: Clearing FMMU configurations...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002008] EtherCAT DEBUG 0-0: Clearing sync manager configurations...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002004] EtherCAT DEBUG 0-0: Clearing DC assignment...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,001076] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000006] EtherCAT DEBUG 0-0: SM0: Addr 0x2800, Size 256, Ctrl 0x26, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: SM1: Addr 0x2A00, Size 256, Ctrl 0x22, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,001910] EtherCAT DEBUG 0-0: Assigning SII access to PDI.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,345003] EtherCAT DEBUG 0-0: Now in PREOP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: Assigning SII access back to EtherCAT.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002005] EtherCAT DEBUG 0-0: SM2: Addr 0x1000, Size 2, Ctrl 0x64, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: SM3: Addr 0x1C00, Size 42, Ctrl 0x20, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,021987] EtherCAT DEBUG 0-0: Now in SAFEOP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,007001] EtherCAT DEBUG 0-0: Now in OP. Finished configuration.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002024] EtherCAT 0: Slave states on main device: OP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,107984] EtherCAT DEBUG 0-0: OP -> SAFEOP + ERROR.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,001971] EtherCAT ERROR 0-0: AL status message 0x001B: "Sync manager watchdog". //error</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,003999] EtherCAT 0-0: Acknowledged state SAFEOP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: Changing state from SAFEOP to OP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT DEBUG 0-0: Configuring...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,246996] EtherCAT DEBUG 0-0: Now in INIT.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: Clearing FMMU configurations...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,001996] EtherCAT DEBUG 0-0: Clearing sync manager configurations...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002001] EtherCAT DEBUG 0-0: Clearing DC assignment...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,001998] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: SM0: Addr 0x2800, Size 256, Ctrl 0x26, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000003] EtherCAT DEBUG 0-0: SM1: Addr 0x2A00, Size 256, Ctrl 0x22, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002000] EtherCAT DEBUG 0-0: Assigning SII access to PDI.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,327996] EtherCAT DEBUG 0-0: Now in PREOP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000004] EtherCAT DEBUG 0-0: Assigning SII access back to EtherCAT.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,002003] EtherCAT DEBUG 0-0: SM2: Addr 0x1000, Size 2, Ctrl 0x64, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,000002] EtherCAT DEBUG 0-0: SM3: Addr 0x1C00, Size 42, Ctrl 0x20, En 1</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,020989] EtherCAT DEBUG 0-0: Now in SAFEOP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,007003] EtherCAT DEBUG 0-0: Now in OP. Finished configuration.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,109038] EtherCAT 0: Slave states on main device: SAFEOP + ERROR.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,004009] EtherCAT DEBUG 0-0: OP -> SAFEOP + ERROR.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,001970] EtherCAT ERROR 0-0: AL status message 0x001B: "Sync manager watchdog". //error</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
[ +0,004001] EtherCAT 0-0: Acknowledged state SAFEOP.</div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</div>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
Best, Kai</p>
<br>
<p></p>
</div>
</body>
</html>