examples/AppliMaster_Linux/objdict.html
author oremeq
Sat, 20 May 2006 00:16:29 +0200
changeset 21 8737e6224393
parent 0 4472ee7c6c3e
permissions -rw-r--r--
Some documentation correction
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CANOpen object dictionary Configuration</title>
<style type="text/css">
         h1 {
	   background: #FFDD66;
	   border: 3px solid #AA0000;
           margin: 2em;
           padding: 1em;
	 }

         h2, h2.dico, h2.pdo {
	   background: #5577FF;
	   border: 1px solid #AA0000;
           margin: 1em;
	 }
	 
	  h1 em.node-id {
	  color: #0728FF;
	  padding-left: 1em;
	  padding-right: 1em;
	  }

	  h1 em.type-node {
	  color: #26BE08;
	  padding-left: 1em;
	  padding-right: 1em;
	  }

	  em.pdo-mode {
	  color: #26BE08;
	  }

	  .entree {
	  color: #AA0000;
	  }
         
	  .nom-var, .node-nom {
	  color: #660000;
	  }

	</style>
</head>
<body text="#000000" bgcolor="#ffffff">
<h1>Object dictionary for Node : </h1>
<h1>
<em class="node-nom">Master</em><em class="type-node">master</em>
</h1>
<h2>Overview</h2>
<p>
	How to make the object dictionary of the node ?
	First, use Jaxe (command run_objdict) to edit an xml description file
of the dictionary : objdict.xml.
Then, run the php program : makeobjetdict.php. You can launch php through a web browser
if you have installed a server, or, on Linux, you can launch php in command line :
php-cgi makeobjetdict.php. It compute the file objdict.c. Link it to
        your project.
<br>Note : To define the node id, use in your code the function setNodeId(UNS8 nodeId)
	</p>
<p>
	  Then the node can be connected to the network. The master must configure it
	  by sending SDO. It will write values in its index, subindex. What to configure ? 
	  <ul>
<li>Receiving heartbeats from which nodes ? Waiting time ?</li>
<li>Emitting heartbeats or not ? time btw 2 heartbeats ? </li>
<li>Defining a cobId for each PDO receive and transmit</li>
<li>How to transmit a PDO ? on synchro ? request ? event ?</li>
<li>What variables to put in each PDO receive and transmit ? </li>
<li>...</li>
</ul>
</p>
	To avoid configuring the node at the connection, you can put the values directly
in the dictionary objdict.c. But it is boring and unsafe because it is too easy to make
a mistake !

      
	<h2>Number of heartbeat consumers : 
    <em class="entree">1</em>
</h2>
<p>This means that the node can expect heartbeats sent by 1 nodes. </p>
<h2>Number of SDO clients : 
    <em class="entree">10</em>
</h2>
<p>Usualy, a slave node does not have the use of SDO clients, but
    today, for the library, you must define one. The Master, which can
    send SDO to "n" slaves nodes, must define here "n" SDO
    clients. Remember that in most cases, the SDO protocol is used by
    the master to configure a slave dictionary or read a value. In
    this use, the master is the client, and the slave is the server.</p>
<h2>Maximum objects in a PDO (receive or transmit) : 
    <em class="entree">8</em>
</h2>
<p>This is defining how many variables can be transmited in a
    PDO. (maximum is 8).</p>
<p>For each variable, a table is created, so if you have less room
    in memory, put a value under 8.</p>
<h2>Number of PDO receive : 
    <em class="entree">3</em>
</h2>
<p>The node can receive 3 PDO.</p>
<p>The communication parameters are defined at index 0x1400 to 0x1400 + 2</p>
<p>The mapping parameters are defined at index 0x1600 to 0x1600 + 2</p>
<h2>Number of PDO transmit : 
    <em class="entree">3</em>
</h2>
<p>The node can transmit 3 PDO.</p>
<p>The communication parameters are defined at index 0x1800 to 0x1800 + 2</p>
<p>The mapping parameters are defined at index 0x1A00 to 0x1A00 + 2</p>
<h2>Mapped variables and tables</h2>
<p>3 tables are defined for the mapping, starting at index 0x2000, 0x6000 and 0x6200.
	You must start the mapping at the beginning of one of a table, without holes in index
or subindex. For example, variables in 0x2000 and 0x2001 is ok, but variables in 0x2000 and 0x2002 is not allowed, because you are loosing room in memory. It is the same for the subindex.
</p>
<p>Here are some others rules for the mapping : </p>
<ul>
<li>At an Index, you can map a variable at subindex 0x0 or 0x1, as you like.</li>
<li>To map several variables at the same Index, you must start at subindex 0x1,
	  because in this case, the subindex 0x0 contains the number of subindex.</li>
<li>You cannot map variables and tables at the same index.</li>
<li>The mapping of a table is always starting at subindex 0x1.</li>
</ul>
<table class="mapping">
<tr>
<td>Name</td><td>Bits</td><td>Index</td><td>Sub-index</td>
</tr>
<tr>
<td><em>canopenErrNB_node5</em></td><td><em class="entree">32</em></td><td><em class="entree">0x6000</em></td><td><em class="entree">0x0</em></td>
</tr>
<tr>
<td><em>canopenErrVAL_node5</em></td><td><em class="entree">32</em></td><td><em class="entree">0x6001</em></td><td><em class="entree">0x0</em></td>
</tr>
<tr>
<td><em>second</em></td><td><em class="entree">8</em></td><td><em class="entree">0x6002</em></td><td><em class="entree">0x1</em></td>
</tr>
<tr>
<td><em>minutes</em></td><td><em class="entree">8</em></td><td><em class="entree">0x6002</em></td><td><em class="entree">0x02</em></td>
</tr>
<tr>
<td><em>hour</em></td><td><em class="entree">8</em></td><td><em class="entree">0x6002</em></td><td><em class="entree">0x3</em></td>
</tr>
<tr>
<td><em>day</em></td><td><em class="entree">8</em></td><td><em class="entree">0x6002</em></td><td><em class="entree">0x4</em></td>
</tr>
<tr>
<td><em>canopenErrNB</em></td><td><em class="entree">32</em></td><td><em class="entree">0x6003</em></td><td><em class="entree">0x01</em></td>
</tr>
<tr>
<td><em>canopenErrVAL</em></td><td><em class="entree">32</em></td><td><em class="entree">0x6003</em></td><td><em class="entree">0x02</em></td>
</tr>
</table>
</body>
</html>