Home

CANopen Gateway Server DS309-3 User Manual TCP

image

Contents

1. Index hex Object Name Type Access 1201 ARRAY Server SDO Parame UNSIGNED32 rw ter 1280 12FF ARRAY Client SDO Parame SDO_PARAMETER rw ter 1400 143F ARRAY Receive PDO Com PDO COMM_PARA rw munication Parame ter 1 1600 163F ARRAY Receive PDO Map PDO_MAPPING rw ping Parameter 1 1800 183F ARRAY Transmit PDO Com PDO COMM_PARA rw munication Parame ter 1 1A00 1A3F ARRAY Transmit PDO Map PDO_MAPPING rw ping Parameter 1 1F50 ARRAY Download Program DOMAIN rw Data 1F51 ARRAY Program Control UNSIGNED8 rw 1F80 VAR NMT Startup UNSIGNED32 rw 1F81 ARRAY Slave Assignment UNSIGNED32 rw 1F82 ARRAY Request NMT UNSIGNED8 rw 1F83 ARRAY Request Guarding UNSIGNED8 rw 1F84 ARRAY Device Type Identifi UNSIGNED32 rw cation 1F85 ARRAY Vendor Identification UNSIGNED32 rw 1F86 ARRAY Product Code UNSIGNED32 rw 1F87 ARRAY Revision Number UNSIGNED32 rw 1F88 ARRAY Serial Number UNSIGNED32 rw 1F89 VAR Boot Time UNSIGNED32 rw 2000 ARRAY UNSIGNED8 PDOs UNSIGNED8 rw 2001 ARRAY UNSIGNED16 UNSIGNED 16 rw PDOs 2002 ARRAY UNSIGNED32 UNSIGNED32 rw PDOs 2003 ARRAY INTEGER8 PDOs INTEGER8 rw 2004 ARRAY INTEGERI6 PDOs INTEGER16 rw 2005 ARRAY INTEGER32 PDOs INTEGER32 rw 2006 ARRAY REAL32 PDOs REAL32 rw 2007 ARRAY UNSIGNED24 UNSIGNED24 rw PDOs Version 5 4 2 CANopen Gateway Server Page 31 of 42 port
2. Index hex Object Name Type Access 2008 ARRAY UNSIGNED40 UNSIGNED40 rw PDOs 2009 ARRAY UNSIGNED48 UNSIGNED48 rw PDOs 200A ARRAY UNSIGNED56 UNSIGNED56 rw PDOs 200B ARRAY UNSIGNED64 UNSIGNED64 rw PDOs 2100 ARRAY Short Message Ser VISIBLE_STRING rw vice Object 2200 VAR ostring OCTET_STRING wo Page 32 of 42 CANopen Gateway Server Version 5 4 2 port 5 2 Examples All examples have been carried out in commandline mode SDO Access Access several indices of a CANopen node COM Shell gt 32 r 0x1018 0 u32 COM Shell gt 0 0x4 COM Shell gt 32 r 0x3000 0 u8 COM Shell 0 0x0 COM Shell gt 32 w 0x3000 0 u8 12 COM Shell 0 OK COM Shell gt 32 r 0x3000 O u8 COM Shell gt 0 Oxc Set default COM Shell node id Access numerical values and string values gt set node 32 0 OK COM Shell V r 0x3000 0 u8 COM Shell V 0 Oxc COM Shell gt w 0x3010 0 18 Oxff COM Shell gt 0 OK COM Shell V r 0x3010 0 18 COM Shell V 0 1 COM Shell V w 0x3010 0 18 Oxf9 COM Shell 0 OK COM Shell gt r 0x3010 0 18 COM Shell LO 7 COM Shell gt r 0x1008 0 vs COM Shell gt 0 S16 LINUX COM Shell r 0x1008 0 os COM Shell 0 UZE2LUXJT1VYAAAAAAAAAAAAAAA Read a dom
3. COM Shell gt 0 OK COM Shell COM Shell COM Shell COM Shell COM Shell COM Shell COM Shell gt COM Shell COM Shell COM Shell COM Shell COM Shell port 1ss get_node port 1ss set node 32 port 1ss get node port 1ss switch glob 0 0 preop gt 32 r 0x1018 0 0x34 gt 32 r 0x1018 0 0x3039 gt 32 r 0x1018 0 0x1 32 r 0x1018 0 0x1 0 0x20 Gateway management u32 u32 u32 132 gt 32 w 0x2000 0 u8 1 0 ERROR 0x06010002 gt 32 r 0x2000 0 u8 Access Error writ a read only object Setup PDO and request configuration Request version information Request default node Request SDO timeout from default node Request SDO timeout from node 32 COM Shell gt set rpdo 2 0x181 event 1 u8 0 OK COM Shell gt info rpdo Page 36 of 42 CANopen Gateway Server Version 5 4 2 port 0 2 0x181 Shell gt OK Shell gt OK Shell gt 1 0x200 Shell gt event 1 u8 set tpdo 1 0x200 event 1 u8 set tpdo 2 0x300 event 2 u32 u32 info tpdo event 1 u8 2 0x300 event 2 u32 u32 info version 52 410640 4 2 0 3 1 00 0 0 Shell gt 127 Shell gt 1000 Shell gt OK Shell gt 1500 info node info sdo_timeout 32 set sdo_timeout 1500 32 info sdo_timeout Transmission of layer 2 CAN frames The example shows how the command _port_wr can be u
4. port has the right to modify the products described or their documentation at any time without prior warning as long as these changes are made for reasons of reliability or technical improvement All rights of this documentation lie with port The transfer of rights to third parties or duplication of this document in any form whole or in part is subject to written approval by port Copies of this document may however be made exclusively for the use of the user and his engineers The user is thereby responsible that third parties do not obtain access to these copies The soft and hardware designations used are mostly registered and are subject to copy right CANopen is registered trademark licensed by CiA CAN in Automation e V Germany EtherCAT is registered trademark and patented technology licensed by Beckhoff Automation GmbH Germany We are thankful for hints of possible errors and may ask around for an information We will go all the way to verify such hints fastest Copyright 2014 port GmbH Regensburger Stra e 7 D 06132 Halle Tel 49 345 777 55 0 Fax 49 345 777 55 20 E Mail service O port de Internet http www port de Page 2 of 42 CANopen Gateway Server Version 5 4 2 port Table of Contents 1 Overview 7 1 1 Features gt 8 1 2 Installation and Start 8 1 2 1 CAN driver 8 1 2 2 Command line options 9 1 2 2 1 Common options TIE 9 1 2 2 2 Options for Linux EtherCAN
5. 0 OK NMT Error control Error control with Heartbeat Node is switched off and started again Boot up Node has change NMT state COM Shell gt 32 enabl heartbeat 1200 0 OK COM Shell gt 32 ERROR 203 Heartbeat lost 32 ERROR 205 Boot up 32 ERROR 202 Heartbeat started COM Shell gt 32 ERROR 204 new NMT state 127 Emergency Switch on reception of emergency messages COM Shell gt 32 _port_reg emcy 0 OK 32 EMCY Oxff00 0x81 Oxaa 0x0 0x12 Oxaf 0x0 LSS node configuration Switch on verbose error messages Set master flag LSS Event received Change to NMT state STOPPED recommended Start identifying LSS slave Switch LSS slave into configuration mode COM Shell gt _port_set verbose Oxff 0 OK COM Shell gt _port_set master 1 0 OK COM Shell gt USER LSS 1 unconfigured device s detected COM Shell gt 0 stop 0 OK COM Shell gt _port_lss identity 0x34 12345 0 2 0 2 0 OK COM Shell gt _port_lss identity 0x34 12345 0 1 0 1 0 OK COM Shell gt _port_lss identity 0x34 12345 1 1 1 1 Version 5 4 2 CANopen Gateway Server Page 35 of 42 port 0 OK COM Shell gt _port_lss switch_sel 0x34 12345 1 1 0 OK Request node id Set node id and check it Switch to operation mode Change to NMT state peroperational Access node with SDO commands COM Shell gt 0 255 COM Shell gt 0 OK COM Shell gt 0 32 COM Shell gt 0 OK
6. 500 2 250 3 125 4 reserved 5 50 6 20 7 10 8 Autobaud 9 Autobaud is not supported 3 5 2 Store configuration Command syntax net store lt specifier gt NOT implemented Version 5 4 2 CANopen Gateway Server Page 19 of 42 port 3 5 3 Restore configuration Command syntax net restore lt specifier gt NOT implemented 3 5 4 Set heartbeat producer Command syntax net set heartbeat lt ms gt Start sending hearbeat messages of the CANopen Gateway Server The time is given in milliseconds 3 5 5 Set node id Command syntax net set id lt value gt NOT supported Can only be set at start See commandline options 3 5 6 Start emergency consumer See port extension 3 5 7 Stop emergency consumer See command extension 3 6 Gateway management commands 3 6 1 Set default newtork Command syntax net set network lt value gt Set default network When set the network parameter can be omitted at following com mands 3 6 2 Set default node id Page 20 of 42 CANopen Gateway Server Version 5 4 2 port Command syntax net set node lt value gt Set default remote node id When set the node parameter can be omitted at following commands 3 6 3 Get version Command syntax info version Request version of the CANopen Gateway Server The version is given in the format lt version string gt lt vendor id gt lt product code gt lt v
7. dix Examples 3 1 2 Download SDO Command syntax net node w rite lt index gt lt subindex gt lt datatype gt lt value gt Accesses the remote device via SDO write messages 3 1 3 Configure SDO timeout Command syntax net node set sdo_timeout lt ms gt The SDO timeout time is used to abort a SDO transfer when there is no device with the given node id SDO timeout times are node specific In order to set one SDO timeout for all nodes node id O can be used A timeout is measured between each SDO request and confirmation 3 1 4 SDO Block Event Command syntax net node USER BLOCK lt current gt lt maximum gt With SDO domain down upload the server indicates progress of the current transmission with the SDO Block Event On an SDO Upload it is required that the SDO server pro vides correct size information The current argument is the number of blocks that have been transmitted received The maximum argument is the number of total blocks that have to be transmitted or received Page 14 of 42 CANopen Gateway Server Version 5 4 2 port 3 2 PDO access commands 3 2 1 Configure RPDO command Command syntax net set RPDO lt nr gt lt COB ID gt lt tx type gt lt nr of data gt lt datatypel gt lt datatype643 lt tx type gt rtr event sync lt 0 240 gt Setup a PDO for receiving data The datatype maps to an object in the object directory On reception of an RPDO t
8. network Command syntax info net work Shows default network used for commands 4 1 4 Get default node Page 22 of 42 CANopen Gateway Server Version 5 4 2 port info node S S 3 a E 3 Q Shows default node used for commands 4 1 5 Get Build information imio Bwile S 3 a 2 S Returns a string that contains the build date version and additional information Example 5 3 10 Nov 13 2012 CPC PCI can4linux 4 1 6 Get CANopen node Id of server info id S 3 S 3 a E Sa gt Returns CANopen node Id of the server See also command line parameters 4 1 7 Get CAN bitrate info bitrate S 3 a 2 S Returns CAN bitrate of the server 4 1 8 Get SDO timeout S S 3 a E S Q node info sdo_timeout Shows the node specific SDO timeout A value of 0 for node is not allowed L m Q a a 5 e u 2 ke info tpdo S E a L lt S S pS Shows the TPDO configuration in form of a comma separated list lt pdoNr gt lt cobId gt lt nrOfElements gt lt datatypel gt s lt datatypeN gt lt pdoNr gt lt cobId gt lt nrOfElements gt lt datatypel gt lt datatypN gt Version 5 4 2 CANopen Gateway Server Page 23 of 42 port 4 1 10 Get RPDO setup Command syntax info rpdo Shows the RPDO configuration in form of a comma separated list lt pdoNr gt lt cobId g
9. 12 NMT Master 14 node configuration Examples LSS 18 default 14 Gateway management Default 13 Node Id get CANopen 14 node NMT reset 12 Nodeguarding register 14 unregister 14 number sequence 9 O Object directory CANopen 16 octet string Datatypes 9 of day Datatypes Time 9 options Command line 8 os Datatypes 9 P PDO 11 commands 11 configuration Examples 17 Event 11 read 11 register 14 RPDO 11 TPDO 11 unregister 14 write 11 preoperational NMT 12 producer Configuration Heatbeat 13 R read PDO 11 register Emergency 14 Heartbeat 14 Nodeguarding 14 PDO 14 SDO 14 request command 9 reset communication NMT 12 node NMT 12 Restore Configuration 13 RPDO PDO 11 setup 14 we SDO 11 access Examples 17 Block 11 download 11 register 14 timeout 11 Timeout get 14 unregister 14 upload 11 sequence number 9 Services Layer Setting 14 Set id Configuration 13 set_bitrate LSS 15 set_node LSS 15 Setting Services Layer 14 setup RPDO 14 TPDO 14 Start emergency consumer Configuration 13 start NMT 12 Status 14 Stop emergency consumer Configuration 13 stop NMT 12 Store Configuration 13 store LSS 15 string Datatypes Datatypes octet 9 Datatypes unicode 9 Datatypes visible 9 switch glob LSS 15 Version 5 4 2 CANopen Gateway Server Page 41 of 42 port switch_sel LSS 15 UNSIGNED56 Datatypes 9 SYNC UNSIGNED64 Datatypes 9 disable 14 UNSIGNED8 Datatypes 9 enab
10. 6 4 5 3 Configuration of node id 27 4 5 4 Request node 27 4 5 5 Identify LSS slaves 27 4 5 6 Bitrate Configuration 27 4 5 7 Bitrate activation 28 4 5 8 Store Configuration 28 4 5 9 Identify unconfigured LSS slaves 28 4 5 10 LSS Event 28 4 6 Miscellaneous 28 Version 5 4 2 CANopen Gateway Server Page 5 of 42 port de Appendix e s e e s go al woe ess Es os BO 5 1 Object Directory Overview 30 5 2 Examples 4 4 a era asas a SB ODE sox 4 p 40 ERS es ew ee Bw Ee e e 38 Page 6 of 42 CANopen Gateway Server Version 5 4 2 port 1 Overview The CANopen Gateway Server implements the protocol DS309 3 It can be accessed from a remote workstation or locally Remote workstation Remote workstation Local workstation TCP IP TCP IP TCP IP Local workstation Serial RS232 RS485 CANopen Network Version 5 4 2 CANopen Gateway Server Page 7 of 42 port 1 1 Features Service Instances Full version Starterkit SDO Client 127 2 SDO Server 1 1 PDO Producer 512 1 2 PDO Consumer 512 1 2 EMCY Consumer 127 127 Heartbeat Consumer 127 2 Time Producer X E Time Consumer X NMT Master x x LSS Master x Domain Size 15 MByte 1 MByte TCP Clients 10 2 Other automatic exit after 1 hour Node id 32 or 64 can be accessed EtherCAN 128 kByte one domain transfer at a time See appendi
11. D56 9 UNSIGNED64 9 UNSIGNED8 9 us 9 visible string 9 vs 9 day Datatypes Time of 9 default network 14 Default network Gateway management 13 default node 14 Default node Gateway management 13 device error Device failure 12 Device failure 12 failure device error 12 Failure EMCY Event 12 Failure Emergency Event 12 difference Datatypes Time 9 directory CANopen Object 16 disable guarding NMT 12 heartbeat NMT 12 SYNC 14 domain Datatypes 9 download SDO 11 driver CAN 8 Ha EMCY Event Device Failure 12 emergency consumer Configuration Start 13 Configuration Stop 13 Emergency Event Device Failure 12 Examples 18 register 14 unregister 14 enable guarding NMT 12 heartbeat NMT 12 SYNC 14 Error control Examples NMT 18 error Device failure device 12 Error Event NMT 12 Event Device Failure EMCY 12 Device Failure Emergency 12 LSS 15 NMT Error 12 PDO 11 triggerd messages 9 Examples 17 19 CAN frame transmission 15 19 Emergency 18 Gateway management 19 LSS node configuration 18 NMT Error control 18 PDO configuration 17 SDO access 17 extension commands 14 Es failure Device 12 device error Device 12 Failure EMCY Event Device 12 Emergency Event Device 12 file initialization 8 frame transmission Examples CAN 15 19 Gs Gateway management 13 Default network 13 Default node 13 Examples 19 Version 13 get Bitrate 14 Build 14 CANopen Node Id 14 SDO Timeout 14 Version 5 4 2 CANope
12. IEC Message text 200 201 202 203 204 205 300 301 302 303 304 305 400 401 lost Guarding Msg lost connection Heartbeat started Heartbeat lost new NMT state Boot up CAN passive CAN bus off CAN overflow CAN buffer overflow CAN init CAN active PDO already used PDO length exceeded 2 1 3 Event triggered messages Messages due to errors in the CANopen network or the occurrence of communication objects using the producer consumer principle PDO EMCY shall not use a sequence number lt event trigged message gt net node lt event specifier gt lt parameter gt lt event specifier gt lt pdo event gt lt user event gt lt lss event gt lt block event gt EMCY ERROR SYNC USER lt user event gt lt pdo event gt net PDO lt parameter gt lt lss event gt lt block event gt LSS lt parameter gt BLOCK lt parameter gt The content of event triggered messages is described within the command description that enables the specific service Version 5 4 2 CANopen Gateway Server Page 13 of 42 port 3 Network access command specification 3 1 SDO access commands 3 1 1 Upload SDO Command syntax net node r ead lt index gt lt subindex gt lt datatype gt Accesses the remote device via SDO read messages Domain data have to be passed bas64 encoded See also SDO Block event and Appen
13. IGW900 9 1 2 2 3 Options for EMS Wiinsche CPC 9 1 2 2 4 Options for Peak 10 1 2 2 5 Options for Kvaser 10 2 Definitions 2 a 11 2 1 Commands a 12 2 1 1 Command Request 12 2 1 2 Command Response lt lt 4 ee es 12 2 1 3 Event triggered messages 4 64 es eames 13 3 Network access command specification 14 3 1 SDO access commands 4 3 1 1 Upload SDO 4 24 4 ee hee we ee eae 14 3 1 2 Download SDO ee 14 3 1 3 Configure SDO timeout 2 2 2 14 3 1 4 SDO Block Event 0 o o o 14 3 2 PDO access commands ee a 15 3 2 1 Configure RPDO command 15 3 2 2 Configure TPDO command 15 3 2 3 Read PDO data command lt 15 3 2 4 Write PDO data command 16 3 2 5 RPDO Event a e m oe e a e de a eoa e oOo a 16 3 3 CANopen NMT commands 16 Version 5 4 2 CANopen Gateway Server Page 3 of 42 port 3 3 1 3 3 2 3 3 3 3 3 4 3 3 5 3 3 6 3 3 7 3 3 8 3 3 9 Start Node Stop node Set node Preoperational Reset node Reset communication Enable node guarding Disable node guarding Enable heartbeat Disable heartbeat 3 3 10 Error control Event 3 4 Device Failure management 3 4 1 3 4 2 Read device error command Emergency Event 3 5 CANopen interface config
14. NFIGURATION state 4 5 2 Switch global Command syntax net _port_lss switch glob lt 0 1 gt Set complete network in CONFIGURATION or OPERATION state Page 26 of 42 CANopen Gateway Server Version 5 4 2 port 4 5 3 Configuration of node id Command syntax net _port_lss set_node lt nodeld gt Set the node id of an LSS slave 4 5 4 Request node Command syntax net _port_lss get_node Get the node id of an LSS slave 4 5 5 Identify LSS slaves Command syntax net _port_lss identity lt vendorId gt lt product gt lt rev lo gt lt rev hi gt lt serial low gt lt serial hi gt Scans the network for nodes that are in the given address range 4 5 6 Bitrate Configuration Command syntax net _port_lss set_bitrate lt sl_table_sel gt lt sl_table_idx gt lt gw_table_sel gt lt gw_table_idx gt Set the new bitrate of an LSS slave The LSS slave has to be in state CONFIGURA TION The first two parameter define the bitrate of the LSS slave The last two parameter define the bitrate of the CANopen Gateway Server They are used when autobaud is to be set at the LSS slaves Bitrate Table index 1000 0 800 1 500 2 250 3 125 4 reserved 5 50 6 20 7 Version 5 4 2 CANopen Gateway Server Page 27 of 42 port 10 8 Autobaud 9 Only table 0 the standard CANopen table is supported by the CANopen Gateway Server 4 5 7 Bitrate activation Command syntax n
15. PDO via an RTR CAN message A Receive RTR PDO has to be setup first 3 2 4 Write PDO data command Command syntax net w rite p do lt nr gt lt nr of data gt lt valuel gt lt value64 gt Sends given data with a PDO The PDO has to be setup before 3 2 5 RPDO Event Command syntax net PDO lt nr gt lt nr of data gt lt valuel gt lt value64 gt A PDO was received The mapped data is given as arguments formatted as decimal val ues The PDO has to be setup previously 3 3 CANopen NMT commands The CANopen Gateway Server has linke any othe CANopen device a node id itself see command line parameters Node id O and 0x80 have special meanings A NMT com mand to node id O adresses all CANopen nodes in the network including the server A NMT command to node id 0x80 adresses all CANopen nodes in the network excluding the server The server remains in the NMT state that was issued before 3 3 1 Start Node Command syntax net node start Sends the OPERATIONAL command 3 3 2 Stop node Command syntax net node stop Sends the STOPPED command Page 16 of 42 CANopen Gateway Server Version 5 4 2 port 3 3 3 Set node Preoperational Command syntax net node preop erational Sends the PREOPEATIONAL command 3 3 4 Reset node Command syntax net node reset nod Sends the RESET NODE command In case a SDO transfer is currently in progress that was started by a
16. Vv CANopen Gateway Server DS309 3 User Manual 1 2 r 0x1008 0 vs 1 set rpdo 1 0x200 event 2 u8 u32 DS309 Gateway port GmbH OK port set verbose Oxff into tpdo OK 1 0x200 event 1 u8 2 0x300 event 2 u32 u32 32 enable 32 ERROR 205 32 ERROR 202 32 ERROR 204 po t set OK USER LSS 1 unconfigumyred de heartbeat 1200 Boot up Heartbeat started new NMT state 1 master 1 CANopen e o TO TCP port Lss OK aporti iss OK Port 155 OK port Less OK identity 0x34 12 identity 0x34 12 identity 0x34 1234 Gateway device switch_sel 0x34 12345 1 1 info version 52 410640 4 2 0 3 1 00 0 0 port GmbH Halle 8 1 2014 CANopen Gateway Server Version 5 4 2 port Disclaimer All rights reserved The programs boards and documentations supplied by port GmbH are created with due diligence checked carefully and tested on several applications Nevertheless port GmbH can not take over no guarantee and no assume del credere lia bility that the program the hardware board and the documentation are error free respec tive are suitable to serve the special purpose In particular performance characteristics and technical data given in this document may not be constituted to be guaranteed product features in any legal sense For consequential damages which are emerged on the strength of use the program and the hardware boards therefore every legal responsibility or liability is excluded
17. ain value COM Shell gt w 0x2002 0 testl dat 0 ERROR 101 Syntax Error Bad Para Count Version 5 4 2 CANopen Gateway Server Page 33 of 42 port Write a domain value The raw data has to be converted to base64 format The Linux Tool base64 is used for this COM Shell gt w 0x2002 0 vs testl dat COM Shell gt 0 OK gt echo Hello World base64 SGVsbG8gV2 9ybGOhCg COM Shell gt w 0x2000 0 d SGVsbG8gV29ybGOhCg 0 OK COM Shell gt r 0x2000 0 d COM Shell gt 32 USER BLOCK 1 1 0 MIIzMTIzMTIZMTIZMTIZMTIZMTIZMTIZMTIZMTIZMO PDO Konfiguration Initialize PDO 1 and deinitialize PDO 1 Initialize PDO 2 and start network COM Shell gt set rpdo 1 0x181 event 1 u8 0 OK COM Shell gt set rpdo 1 0x80000181 event 1 u8 0 OK COM Shell gt set rpdo 2 0x181 event 1 u8 0 OK COM Shell gt 0 start 0 OK Reception of PDO 2 Switch off verbose error message Initialize PDO 3 Switch on verbose error message Initialize PDO 3 COM Shell gt PDO 2 1 Oxaa COM Shell gt _port_set verbose 1 0 OK COM Shell gt set rpdo 3 0x182 event 2 u8 0 ERROR 100 COM Shell gt _port_set verbose Oxff 0 OK COM Shell gt set rpdo 3 0x182 event 2 u8 0 ERROR 100 Syntax Error Invalid data Page 34 of 42 CANopen Gateway Server Version 5 4 2 port COM Shell gt set rpdo 3 0x182 event 2 u8 ul6
18. ee Set default network node In BNF notation a command defines as follows lt command request gt lt sequence gt lt net gt lt node gt lt command gt lt sequence gt UNSIGNED32 lt net gt UNSIGNED8 lt node gt UNSIGNED8 lt command gt lt command specifier gt lt compound command gt lt compound command gt lt command specifier gt lt parameter gt lt parameter gt lt value gt lt command parameter gt lt compound parameter gt lt value gt lt parameter gt Net and node numbers are starting with 1 The value O is used to address all nodes and all networks 2 1 2 Command Response The CANopen Gateway Server responds with the same sequence number at the first posi tion as given by the request This number shall be given in decimal format lt command response gt lt sequence gt lt response gt lt response gt lt value gt lt error string gt lt emcy list gt OK lt error string gt Error lt error code gt lt error code gt lt internal error code gt lt sdo abort code gt lt emcy list gt lt emcyl gt lt emcy254 gt lt emcyN gt UNSIGNED32 Allowed internal error codes IEC are listed below IEC Message text 100 request not supported 101 syntax error 102 Request not processed due to internal state Page 12 of 42 CANopen Gateway Server Version 5 4 2 port
19. ersion high gt lt version low gt lt serial number gt lt network class gt lt protocol version gt lt implementation class gt Version 5 4 2 CANopen Gateway Server Page 21 of 42 port 4 Command Extensions The standard DS309 3 allows user specific commands and event triggered messages All extensions provided by the port CANopen Gateway Server are prepended with the prefix _port_ Exception are the info commands since it is already available The CANopen Gateway Server allows multiple TCP IP connections This can be prob lematic if two clients don t know from each other and send NMT commands like start and preop To handle this situation one client can set a master flag and thus restrict others that way that they can not send NMT or LSS commands However to be compliant with the standard this only works with port specific commands The normal DS309 3 com mands do not know of the master flag Especially for multiclient environments the CANopen Gateway Server provides regis ter commands to hook up on a running server and register for already configured PDO heartbeat nodeguarding EMCY and TIME services 4 1 Status and Configuration 4 1 1 Set master Command syntax port set master lt 0 1 gt Activate master mode for TCP IP client The master flag can only be set from one client 4 1 2 Set verbose response Command syntax port set verbose Oxff Show verbose error messages 4 1 3 Get default
20. et _port_lss activate bitrate lt time gt Activates the bitrate The CANopen Gateway Server responds after 2 time is elapsed The time is given in milli seconds 4 5 8 Store Configuration Command syntax net _port_lss store On reception of this command the LSS slave saves the bitrate and node id The LSS slave has to be in CONFIGUATION state 4 5 9 Identify unconfigured LSS slaves Command syntax net _port_lss identity_non_cfg Invokes all unconfigured LSS slaves to send a message On reception of this message the CANopen Gateway Server will send the LSS event 4 5 10 LSS Event Command syntax USER LSS lt no gt On detection of an unconfigured LSS slave the CANopen Gateway Server sends the LSS Event no Description 1 unconfigured device detected 4 6 Miscellaneous Manchmal ergibt sich die Notwendigkeit ohne Bezug auf CANopen ohne ein PDO zu konfigurieren einen beliebigen CAN Frame zu senden Dazu kann das Kommando Page 28 of 42 CANopen Gateway Server Version 5 4 2 port _port_wr benutzt werden Command syntax _port_wr lt cob id gt lt type gt lt length gt lt data0 gt lt data7 gt length number of bytes type Frame specifier 2 characters first character frame format sS standard or base frame format xX extended base frame format second character frame type dD data frame rR RTR frame Versi
21. he RPDO Event is triggered The receive PDO is seen from the side of the CANopen Gateway Server A PDO can be deactivated by writing using value 0x80000000 for the cob TCP IP clients do not have separate namespaces for PDO i e if client 1 has setup PDO 1 and 2 and a client 2 connects and also sets up PDO 1 and 2 it alters the PDO definition of client 1 It is allowed to set all possible COB Id No extra checking is carried out This means that if the same COB ID is used for RPDO and TPDO it may happen that no PDO is received 3 2 2 Configure TPDO command Command syntax net set tpdo lt nr gt lt COB gt lt tx type gt lt nr of data gt lt datatypel gt lt datatype64 gt Setup a PDO for sending data The datatype maps to an object in the object directory The transmit PDO is seen from the side of the CANopen Gateway Server A PDO can be deactivated by writing using value 0x80000000 for the cob TCP IP clients do not have separate namespaces for PDO i e if client 1 has setup PDO 1 and 2 and a client 2 connects and also sets up PDO 1 and 2 it alters the PDO definition of client 1 It is allowed to set all possible COB Id No extra checking is carried out This means that if the same COB ID is used for RPDO and TPDO it may happen that no PDO is received 3 2 3 Read PDO data command Version 5 4 2 CANopen Gateway Server Page 15 of 42 port Command syntax net r ead p do lt nr gt Requests
22. le 14 upload SDO 11 us Datatypes 9 sT t Datatypes 9 me td Datatypes 9 verbose 14 Time Version Gateway management 13 difference Datatypes 9 visible string Datatypes 9 of day Datatypes 9 vs Datatypes 9 Timeout get SDO 14 timeout SDO 11 W TPDO PDO 11 write PDO 11 setup 14 transmission Examples CAN frame 15 19 triggerd messages Event 9 LU Ul6 Datatypes U24 Datatypes U32 Datatypes U40 Datatypes U48 Datatypes U56 Datatypes U64 Datatypes U8 Datatypes 9 unicode string Datatypes 9 unregister Emergency 14 Heartbeat 14 Nodeguarding 14 PDO 14 SDO 14 UNSIGNED 16 Datatypes UNSIGNED24 Datatypes UNSIGNED32 Datatypes UNSIGNED40 Datatypes UNSIGNED48 Datatypes O O 00 0 LL LL LLV Page 42 of 42 CANopen Gateway Server Version 5 4 2
23. mands can be entered interactively from command line then and sequence numbers can be omitted In command line mode the CANopen Gateway Server pro cesses the initialization file m4d_ini cmd This ASCII file is contains DS309 3 com mands Lines starting with are comments and are not executed It can be tailored to match the application needs 1 2 2 2 Options for Linux EtherCAN IGW900 Option Description S Timer resolution in ms 1 2 2 3 Options for EMS W nsche CPC Option D specifies the channel given in the configuration file C Windows cpcconf ini which is located in the Windows system directory Version 5 4 2 CANopen Gateway Server Page 9 of 42 port 1 2 2 4 Options for Peak Option Description i Interface 1 USB 2 Parallel Dongle I Interrupt for parallel dongle B I O base address for parallel dongle 1 2 2 5 Options for Kvaser Option D specifies the card channel The card channel can be obtained with the Kvaser Hardware Configuration tool Page 10 of 42 CANopen Gateway Server Version 5 4 2 port 2 Definitions Command controls the CANopen Gateway Server and interacts with CANopen devices It may have a long form and a short form The short form is a one or two letter abbreviation of the long form The long form is obtained by concatenating the short form and the string enclosed in brackets Datatypes S
24. n Gateway Server Page 39 of 42 port get_node LSS 15 L guarding NMT NMT disable 12 NMT enable 12 Layer Setting Services 14 line options Command 8 LSS 14 15 activate_bitrate 15 H Event 15 cea a cfe 15 NMT disable 12 y_hon_crg NMT enable 12 Ga lt node configuration Examples 18 Heartbeat gt set bitrate 15 register 14 set_node 15 unregister 14 f store 15 Heatbeat producer Configuration 13 switch_glob 15 switch_sel 15 She 116 Datatypes M 124 Datatypes management 132 Datatypes 140 Datatypes 148 Datatypes 156 Datatypes Default network Gateway 13 Default node Gateway 13 Examples Gateway 19 S 0 O 0 Gateway 13 164 Datatypes Version Gateway 13 I Datatypes 9 master 14 id Configuration Set 13 Id get CANopen Node 14 identify_non_cfg LSS 15 identity LSS 15 Init Configuration 12 N initialization file 8 masterflag 14 messages Event triggerd 9 INTEGER 16 Datatypes network default 14 en Gateway management Default 13 INTEGER32 Datatypes NE y g INTEGER40 Datatypes INTEGER48 Datatypes INTEGERS6 Datatypes INTEGER64 Datatypes INTEGER8 Datatypes 9 Commands 11 disable guarding 12 disable heartbeat 12 enable guarding 12 enable heartbeat 12 Error control Examples 18 Error Event 12 preoperational 12 reset communication 12 reset node 12 start 12 O00 0 0 0 0 Page 40 of 42 CANopen Gateway Server Version 5 4 2 port stop
25. nother TCP client then Reset node is not carried out If the SDO transfer was started by the TCP client that also sent the Reset node command the SDO transfer is aborted and the reset is carried ut o Note With node number O the gateway is reset too i e the PDO configuration is lost 3 3 5 Reset communication Command syntax net node reset comm unication Sends the RESET COMMUNICATION command See also Reset Node Siehe auch Knoten zuriicksetzen 3 3 6 Enable node guarding Command syntax net node enable guarding lt guardingtime gt lt lifetimefactor gt Activates the node guarding error control mechanism If the master doesn t receive a response of the slave in the given time it sends the event triggered message ERROR 200 or ERROR 201 Accuracy of the Guarding depends on the timer resolution On Linux platforms it can be adjusted with the command line parameter s On Windows it is fixed Version 5 4 2 CANopen Gateway Server Page 17 of 42 port 3 3 7 Disable node guarding Command syntax net node disable guarding Deactivates the node guarding error control mechanism 3 3 8 Enable heartbeat Command syntax net node nable heartbeat lt heartbeattime gt Start heartbeat dectection on the CANopen Gateway Server It is checked that heartbeat messages are received in the given time If a heartbeat message is not received an event triggered ERROR message is sen
26. on 5 4 2 CANopen Gateway Server Page 29 of 42 port 5 Appendix 5 1 Object Directory Overview Index hex Object Name Type Access 1000 VAR Device Type UNSIGNED32 const 1001 VAR Error Register UNSIGNED8 ro 1018 VAR Identity Object IDENTITY const 1002 VAR Manufacturer Status UNSIGNED32 ro Register 1003 ARRAY Pre defined Error UNSIGNED32 ro Field 1005 VAR COB ID SYNC UNSIGNED32 TW 1006 VAR Communication UNSIGNED32 rw Cycle Period 1007 VAR Synchronous Win UNSIGNED32 rw dow Length 1008 VAR Manufacturer Device VISIBLE_STRING const Name 1009 VAR Manufacturer Hard VISIBLE_STRING const ware Version 100A VAR Manufacturer Soft VISIBLE STRING const ware Version 100C VAR Guard Time UNSIGNED16 rw 100D VAR Life Time Factor UNSIGNED8 rw 1010 ARRAY Store Parameter Field UNSIGNED32 rw 1011 ARRAY Restore Default UNSIGNED32 rw Parameters 1012 VAR COB ID Time Stamp UNSIGNED32 rw 1013 VAR High Resolution UNSIGNED32 rw Time Stamp 1016 ARRAY Heartbeat Consumer UNSIGNED32 rw Entries 1017 VAR Producer Heartbeat UNSIGNED16 rw Time 1019 VAR Synchronous counter UNSIGNED8 rw overflow value 1028 ARRAY Emergency Con UNSIGNED32 rw sumer 1200 ARRAY Server SDO Parame UNSIGNED32 rw ter Page 30 of 42 CANopen Gateway Server Version 5 4 2 port
27. sed to send raw CAN frames Shell gt _port_wr 0x1111 xd 4 1 2 3 4 COM OK Shell gt OK Shell gt OK _port_wr 0x1111 sr 5 _port_wr 0x111 sd 3 10 16 Oxaa Version 5 4 2 CANopen Gateway Server Page 37 of 42 port 6 Index A control Examples NMT Error 18 access Examples SDO 17 activate_bitrate LSS 15 D d Datatypes 9 B Datatypes 9 Bool 9 base64 9 49 Bitrate get 14 Block SDO 11 domain 9 16 9 Bool Datatypes 9 Build get 14 124 9 7 132 9 140 9 En 148 9 CAN 156 9 i 164 9 driver 8 f tr ission E les 15 18 9 o ansmission Examples 15 NECE CANopen INTEGER24 9 INTEGER32 9 INTEGER40 9 INTEGER48 9 INTEGERS6 9 INTEGER64 9 Node Id get 14 Object directory 16 Command line options 8 command request 9 Commands 9 INTEGER8 9 commands extension 14 Commands NMT 11 sre 2 commands PDO 11 T communication NMT reset 12 id 0 Configuration 12 13 configuration Examples Examples LSS node 18 Time difference 9 Time of day 9 Examples PDO 17 men U24 9 Configuration U32 9 Heatbeat producer 13 U40 9 Init 12 U48 9 Restore 13 U56 9 Setid 13 U64 9 Start emergency consumer 13 U8 9 Stop emergency consumer 13 Store 13 consumer Configuration Configuration Start emergency 13 Configuration Stop emergency 13 unicode string 9 UNSIGNEDI6 9 UNSIGNED24 9 UNSIGNED32 9 UNSIGNED40 9 Page 38 of 42 CANopen Gateway Server Version 5 4 2 port UNSIGNEDA8 9 UNSIGNE
28. t lt nrOfElements gt lt datatypel gt a lt datatypeN gt lt pdoNr gt lt cobld gt lt nrOfElements gt lt datatypel gt lt datatypN gt 4 2 SDO 4 2 1 Register SDO Server Write Indikation Command syntax _port_reg sdoserverind Register for receiving of SDO Server Write Indikation The indication is called for all objects at manufacturer area Numeric values are indicated as SDOSERV lt index gt lt subindex gt size lt len gt data lt value gt Non Numeric values are indicated as SDOSERV lt index gt lt subindex gt b64size lt len gt data lt data gt lt data gt are codes as b64 4 2 2 Unregister SDO Server Write Indikation Command syntax _port_unreg sdoserverind Unregister for receiving of SDO Server Write Indikation 4 3 PDO 4 3 1 Register PDO Command syntax _port_reg rpdo lt pdoNr gt Register for receiving an RPDO 4 3 2 Unregister PDO Page 24 of 42 CANopen Gateway Server Version 5 4 2 port S S 3 a E S S gt _port_unreg rpdo lt pdoNr gt Unregister an RPDO 4 4 NMT Master 4 4 1 Register Nodeguarding Command syntax net node _port_reg guarding Register for receiving Nodeguarding events Events are only sent when a protocol viola tion has occured 4 4 2 Unregister Nodeguarding Command syntax net node _port_unreg guarding Stop receiving nodeguarding events 4 4 3 Register heartbeat Command syntax ne
29. t node _port_reg heartbeat Register for receiving heartbeat events Events are only sent when a protocol violation has occured or a new heartbeat start was detected 4 4 4 Unregister heartbeat Command syntax net node _port_unreg heartbeat Stop receiving heartbeat events 4 4 5 Register emergency Command syntax net node _port_reg emcy Register for receiving an emergency events Version 5 4 2 CANopen Gateway Server Page 25 of 42 port 4 4 6 Unregister emergency Command syntax net node _port_unreg emcy Stop receiving emergency events 4 4 7 Enable Sync Producer Command syntax _port_enable sync lt cobid gt lt sync cycle_in_ps gt lt sync_counter gt Start sending SYNC messages The master flag has to be set for this command SYNC cycle time is specified in micro seconds 4 4 8 Disable Sync Producer Command syntax _port_disable sync Stop sending SYNC messages The master flag has to be set for this command 4 5 LSS Master The CANopen Gateway Server can configure LSS slaves with the LSS commands For all commands the master flag has to be set The CANopen Gateway Server own identity object can be read with the info version command It is recommended that LSS services should be carried out in STOPPED state 4 5 1 Switch Selective Command syntax net _port_lss switch sel lt vendorld gt lt product gt lt revision gt lt serialNo gt Set single LSS slave in CO
30. t The time is given in milliseconds The heartbeat time of the producer has to be set with a separate SDO Download Com mand Accuracy of the Guarding depends on the timer resolution On Linux gt platforms it can be adjusted with the command line parameter s On Windows it is fixed 3 3 9 Disable heartbeat Command syntax net node disable heartbeat Stop heartbeat dectection on the CANopen Gateway Server 3 3 10 Error control Event Command syntax net node ERROR lt internal error code gt On detection of NMT errors or CAN errors this message is sent to a connected client 3 4 Device Failure management 3 4 1 Read device error command NOT implemented Page 18 of 42 CANopen Gateway Server Version 5 4 2 port 3 4 2 Emergency Event Command syntax net node EMCY lt emcy code gt lt error register gt lt m error code gt lt m error code gt lt UNSIGNED8 gt lt UNSIGNED8 gt lt UNSIGNED8 gt lt UNSIGNED8 gt lt UNSIGNED8 gt On reception of a CANopen EMCY message this message is sent Note Reception has to be enabled See command extension 3 5 CANopen interface configuration commands 3 5 1 Initialize gateway Command syntax net init lt bitrate gt Sets the bitrate the CANopen Gateway Server is working with The bitrate can be given as value or table index of the default CANopen table Bitrate Table index 1000 0 800 1
31. uration commands 3 5 1 3 5 2 3 5 3 3 5 4 3 5 5 3 5 6 3 5 7 Initialize gateway Store configuration Restore configuration Set heartbeat producer Set node id Start emergency consumer Stop emergency consumer 3 6 Gateway management commands 3 6 1 3 6 2 3 6 3 Set default newtork Set default node id Get version 4 Command Extensions 4 1 Status and Configuration 4 1 1 4 1 2 4 1 3 4 1 4 4 1 5 Set master Set verbose response Get default network Get default node Get Build information 16 16 17 17 17 17 18 18 18 18 18 18 19 19 19 19 20 20 20 20 20 20 20 20 21 22 22 22 22 22 22 23 Page 4 of 42 CANopen Gateway Server Version 5 4 2 port 4 1 6 Get CANopen node Id of server 23 4 1 7 Get CAN bitrate 23 4 1 8 Get SDO timeout 23 4 1 9 Get TPDO setup 23 4 1 10 Get RPDO setup 24 4 2 SDO 24 4 2 1 Register SDO Server Write Indikation 24 4 2 2 Unregister SDO Server Write Indikation 24 4 3 PDO 24 4 3 1 Register PDO 24 4 3 2 Unregister PDO 24 4 4 NMT Master 25 4 4 1 Register Nodeguarding 25 4 4 2 Unregister Nodeguarding 25 4 4 3 Register heartbeat 25 4 4 4 Unregister heartbeat 25 4 4 5 Register emergency 25 4 4 6 Unregister emergency 26 4 4 7 Enable Sync Producer 26 4 4 8 Disable Sync Producer 26 4 5 LSS Master 26 4 5 1 Switch Selective 26 4 5 2 Switch global 2
32. x 1 for the complete object directory Note The performance of the CANopen Gateway Server depends on the used CAN interface hardware Especially at high bus load and high baud rates some CAN messages may be lost 1 2 Installation and Start 1 2 1 CAN driver The CANopen Gateway Server accesses the CAN interface card by means of a layer 2 driver This driver has to be installed before using the CANopen Server For installation of the driver please refer to the delivered driver manual EMS W nsche http www ems wuensche com I ME Actia http www ime actia de Kvaser http www kvaser com Sontheim http www sontheim industrie elektronik de Janz http www janztec com Page 8 of 42 CANopen Gateway Server Version 5 4 2 port The most current list of supported hardware can be requested at service O port de 1 2 2 Command line options 1 2 2 1 Common options Option Argument Description Default value p port TCP IP port 7234 b baud CAN Baudrate 125 n id Node ID of CANopen Gateway Server 6 H time start producing HB frames at start up 0 R Don t send NMT PREOP ALL at exit D device CAN device channel e g canl V Version S Server mode L filename Path of licence file values for baudrate 20 50 125 250 500 1000 When the CANopen Gateway Server is started without option S it runs in command line mode Com
33. yntax CANopen Type Supported b Bool 4 u8 Unsigned8 V ul6 Unsigned16 Y u24 Unsigned24 V u32 Unsigned32 V u24 Unsigned40 Y u48 Unsigned48 V u56 Unsigned56 V u64 Unsigned64 V 18 Integer8 V 116 Integer16 V 124 Integer24 V 132 Integer32 Y 124 Integer40 4 148 Integer48 4 156 Integer56 V 164 Integer64 V r32 Real32 V r64 Real64 Y t Time of day two arguments day ms Y td Time difference vs Visible string V OS Octet string V us Unicode string V d Domain V Visible strings can have a maximum length of 127 bytes If the string contains white spaces it has to be enclosed in double guotes Octet and unicode strings and domain data are base64 encoded The encoded octet and unicode string can have a maximum length of 127 bytes Domain data up to 1 mega byte is supported Version 5 4 2 CANopen Gateway Server Page 11 of 42 port 2 1 Commands Commands are communicated as case insensitive ASCII strings Numbers are repre sented in manner of the C programming language 100 decimal starting with a number 0x64 hexadecimal starting with the string Ox 1 22 float 22e10 float 22e3 float 2 1 1 Command Request A command is composed of tokens separated by whitespaces and closed with a CRLF All commands are confirmed Each command starts with a 4 byte sequence number which is enclosed by square brackets The sequence number is followed by net and node of the CANopen device Both numbers are optional s

Download Pdf Manuals

image

Related Search

Related Contents

- A.J.Pinto  Water saving targets  Sala de reunião - Linux New Media  中地区地域福祉委員会 交通安全の看板を 中地区各地に設置しました。  Effetti dell`RFX-1000  COUSSINS DE NOYAUX DE CERISES  Mounting Instructions  買取申込書(店舗・訪問の場合)  Samsung Galaxy Tab P1000N/M16 User Manual(LTN)  12 Avril 2012 - SUD  

Copyright © All rights reserved.
Failed to retrieve file