doc/manual/en/manual.tex
changeset 560 0bb927393dd0
parent 517 003679edc437
child 567 8c71fdc46735
equal deleted inserted replaced
559:8543e7edae4a 560:0bb927393dd0
   850 \section{Example and test program:}
   850 \section{Example and test program:}
   851 
   851 
   852 The {}``examples'' directory contains some test program you can
   852 The {}``examples'' directory contains some test program you can
   853 use as example for your own developments.
   853 use as example for your own developments.
   854 
   854 
       
   855 \subsection{CANOpenShell}
       
   856 
       
   857 This example provides a node that can execute some user commands through stdin. 
       
   858 
       
   859 With this example you can:
       
   860 \begin{enumerate}
       
   861 \item scan network (reset all nodes and display node's bootup message)
       
   862 \item start / stop /reset a remote node
       
   863 \item get informations about a remote node
       
   864 \item read / write a specific entry of a remote node
       
   865 \end{enumerate}
       
   866 
       
   867 The node can be started as a master node or a slave node. The only difference is 
       
   868 that when is started as a master, all nodes on the network are reseted.
       
   869 
       
   870 Be careful, the first command must be the "load" command.
       
   871 
       
   872 \begin{verbatim}
       
   873 	****************************************************************************
       
   874 	*  CANOpenShell                                                            *
       
   875 	*                                                                          *
       
   876   	*   MANDATORY COMMAND (must be the first command)                          *
       
   877 	*     load#CanLibraryPath,channel,baudrate,nodeid,type (0:slave, 1:master) *
       
   878 	*                                                                          *
       
   879 	*   NETWORK: (if nodeid=0x00 : broadcast)                                  *
       
   880 	*     ssta#nodeid : Start a node                                           *
       
   881 	*     ssto#nodeid : Stop a node                                            *
       
   882 	*     srst#nodeid : Reset a node                                           *
       
   883 	*     scan : Reset all nodes and print message when bootup                 *
       
   884 	*     wait#seconds : Sleep for n seconds                                   *
       
   885 	*                                                                          *
       
   886 	*   SDO: (size in bytes)                                                   *
       
   887 	*     info#nodeid                                                          *
       
   888 	*     rsdo#nodeid,index,subindex : read sdo                                *
       
   889 	*        ex : rsdo#42,1018,01                                              *
       
   890 	*     wsdo#nodeid,index,subindex,size,data : write sdo                     *
       
   891 	*        ex : wsdo#42,6200,01,01,FF                                        *
       
   892 	*                                                                          *
       
   893 	*   Note: All numbers are hex                                              *
       
   894 	*                                                                          *
       
   895 	*     help : Display this menu                                             *
       
   896 	*     quit : Quit application                                              *
       
   897 	****************************************************************************
       
   898 \end{verbatim}
       
   899 
       
   900 Minimal launch command :
       
   901 \begin{verbatim}
       
   902 	./CANOpenShell load#libcanfestival_can_peak_linux.so,32,125K,8,0
       
   903 \end{verbatim}
       
   904 This command start the node as a slave with nodeid 8 at 125K on channel 32.
       
   905 
       
   906 Advanced launch command :
       
   907 \begin{verbatim}
       
   908 	./CANOpenShell load#libcanfestival_can_peak_linux.so,32,125K,8,1 \
       
   909 	 help \
       
   910 	 wait#5 \
       
   911 	 wsdo#42,6200,01,01,FF
       
   912 \end{verbatim}
       
   913 This command starts the node as a master with nodeid 8 at 125K on channel 32, 
       
   914 displays help menu, wait 5 seconds for node's NMT bootup, 
       
   915 and write FF value at index 6200, subindex 01 to the remote node with id 42.
   855 
   916 
   856 \subsection{TestMasterSlave}
   917 \subsection{TestMasterSlave}
   857 
   918 
   858 
   919 
   859 \begin{verbatim}
   920 \begin{verbatim}
   882   *                                                            *
   943   *                                                            *
   883   **************************************************************
   944   **************************************************************
   884 \end{verbatim}
   945 \end{verbatim}
   885 
   946 
   886 
   947 
   887 Notes aboute use of voncise DCF :
   948 Notes aboute use of concise DCF :
   888 
   949 
   889 In this example, Master configure heartbeat producer time
   950 In this example, Master configure heartbeat producer time
   890 at 1000 ms for slave node -id 0x02 by concise DCF according DS -302
   951 at 1000 ms for slave node -id 0x02 by concise DCF according DS -302
   891 profile.
   952 profile.
   892 
   953 
  1596 \begin{center}
  1657 \begin{center}
  1597 \includegraphics[width=10cm]{Pictures/100002010000013A0000004A96B0C1FF} 
  1658 \includegraphics[width=10cm]{Pictures/100002010000013A0000004A96B0C1FF} 
  1598 \par\end{center}
  1659 \par\end{center}
  1599 
  1660 
  1600 LOLITECH
  1661 LOLITECH
  1601 
  1662 24, rue Pierre Evrat
  1602 204, rue du Haut du Pin
  1663 204, rue du Haut du Pin
  1603 
  1664 
  1604 88470 Saint -Michel sur Meurthe
  1665 88100 Saint-DiƩ-des-Vosges
  1605 
  1666 
  1606 FRANCE
  1667 FRANCE
  1607 
  1668 
  1608 Tel : +33 3 29 52 95 67
  1669 Tel : +33 3 29 57 60 42
  1609 
  1670 
  1610 \href{http://www.lolitech.fr/}{http://www.lolitech.fr}
  1671 \href{http://www.lolitech.fr/}{http://www.lolitech.fr}
  1611 
  1672 
  1612 \textbf{Contributors :} Edouard TISSERANT (Original author)
  1673 \textbf{Contributors :} Edouard TISSERANT (Original author)
  1613 
  1674