CANopen Manager / Slave Manual - esd electronics, Inc.
CANopen Manager / Slave Manual - esd electronics, Inc.
CANopen Manager / Slave Manual - esd electronics, Inc.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>CANopen</strong>-<strong>Slave</strong><br />
The following example shows some pseudo code how to setup the object dictionary and PDOs using<br />
the definition in the previous example. Please refer to example1.c, which comes with your <strong>CANopen</strong><br />
library distribution, for a fully working example.<br />
HNODE Node; /* Node handle */<br />
/* Create slave node */<br />
canOpenCreateNodeEx(...., &Node);<br />
.<br />
.<br />
.<br />
/* Initialize object default data and create application specific */<br />
udtDefaultData.uint32.defval = 0;<br />
udtDefaultData.uint32.val = 0;<br />
/* Create the dictionary */<br />
DECLARE_DICTIONARY(Node, AsyncIo);<br />
/* Declare PDOs */<br />
DECLARE_PDO(Node, AsyncIo);<br />
.<br />
.<br />
.<br />
/* Activate slave and enter state state Pre-Operational */<br />
Page 56 of 65<br />
Software <strong>Manual</strong> • Doc. No.: C.2002.21 / Rev. 2.2 <strong>CANopen</strong> <strong>Slave</strong>