IXXAT CAN@net II/Generic Manual Download Page 14

CAN@net II/Generic, Version 1.5 

ASCII Protocol Server 

 

14

 

 

FILTER ENABLE 

Enable the filter list 

FILTER DISABLE 

Disable the filter list 

FILTER LOAD 

Load the filter list from flash 

FILTER SAVE 

Save the filter list to flash 

FILTER SHOW 

Show content and status of the controller 
filter list 

Table 4.2.1 CAN controller commands 

All messages of type "CAN controller command" are answered by the ASCII-
Protocol server with either an error message (see 4.2.5) or an OK packed in an 
Info message (see 4.2.6). 
 

 

 
 

Figure 4-1 CAN Controller Command Request/Response Cycle 

It is good practice to issue CAN controller commands to the ASCII-Protocol 
server only one at a time and then wait for the response. As some commands 
may take longer to be processed than others, the timing of the response 
messages may vary. So the sequence of responses to commands which were 
issued in a row may be changed. And the ASCII-Protocol provides no 
mechanism (like message identifiers) to match commands to their responses. 

4.2.4 Device Command 

Messages of the type "Device command" are used to exchange information 
regarding the CAN@net II/Generic as a whole. 
 

Message format: 

D  Command  Parameters  \r\n 

 

The groups of characters are separated by a space each. For a valid "Device 
command", the fields D, Command and \r\n must be specified. The field 
Parameters is optional and its usage depends on the exact Command. 

Detailed: 

Message type "Device Command" 

Command 

Parameters 

Usage see the following table 

\r\n 

Message terminator 

CAN@net II/ 

Generic 

(Server) 

CAN Controller Command

 

Error or Info message

 

Summary of Contents for CAN@net II/Generic

Page 1: ...CAN net II Generic TCP IP Gateway for CAN with Open Socket API MANUAL ENGLISH...

Page 2: ...s document is only allowed with explicit permission of HMS Technology Center Ravensburg GmbH HMS Technology Center Ravensburg GmbH reserves the right to change technical data without prior announcemen...

Page 3: ...ion 9 4 ASCII Protocol Server 10 4 1 ServerFunction 10 4 2 ASCII Protocol 10 4 2 1 Basic Message Format 10 4 2 2 CAN Message 11 4 2 3 CAN Controller Command 12 4 2 4 Device Command 14 4 2 5 Error Mess...

Page 4: ...configuration 7 Figure 3 1 Connectors and displays of the CAN net II Generic 8 Figure 4 1 CAN Controller Command Request Response Cycle 14 Figure 4 2 Device Command Request Response Cycle 15 Figure A...

Page 5: ...ter studying the information on our homepage and the manuals please contact our support department In the support area on our homepage you will find the relevant forms for your support request In orde...

Page 6: ...otocol The server relays the commands and messages to the CAN bus and vice versa The server is restricted to accept only a single connection to TCP port 19227 Additional connection requests are reject...

Page 7: ...c Server Figure 2 2 Bridge configuration 2 3 CAN ID Filtering The CAN net II Generic application firmware includes a filtering mechanism based on CAN Identifiers The basis for the filtering is a filte...

Page 8: ...tors two Duo LEDs are available which indicate the communication status For more information on the LEDs please see chapter 3 2 Indicators of the manual CAN net II Intelligent PC CAN Interface Figure...

Page 9: ...on as described in chapter 3 2 Basic device configuration must be done for both devices For the CAN net II Generic which shall act as server it is sufficient to do the basic configuration 2 One of the...

Page 10: ...ted Ethernet TCP IP client In addition to CAN messages the server also handles commands These can be commands to start stop the CAN controller to set the CAN baudrate and so on It is also possible to...

Page 11: ...ssage types are CAN message CAN controller command Device command Error message Info message 4 2 2 CAN Message The ASCII Protocol messages of type CAN message are used to exchange CAN messages between...

Page 12: ...0 1 2 3 4 5 6 7 r n Note The messages are ASCII coded Every single character of the example message M SD7 200 1 2 3 4 5 6 7 r n will be one byte in the TCP paket 4D 20 53 44 37 20 32 30 30 20 31 20 32...

Page 13: ...SJA1000 running at 16 MHz INIT AUTO The CAN controller tries to auto detect a baud rate on the bus START Start an initialized CAN controller STOP Stop a CAN controller RESET Reset a CAN controller STA...

Page 14: ...e response As some commands may take longer to be processed than others the timing of the response messages may vary So the sequence of responses to commands which were issued in a row may be changed...

Page 15: ...t or power on RESET Device reset Table 4 2 2 Device commands All messages of type Device command are answered by the ASCII Protocol server with either an error message see 4 2 5 or the requested infor...

Page 16: ...es and their description Error Code Description ERR_QUEUE_OVERRUN 0x10 Software queue overrun ERR_DATA_OVERRUN 0x11 CAN controller buffer overrun ERR_STATUS_SET 0x12 CAN error status set ERR_STATUS_RE...

Page 17: ...sages of the type Info message are used to feed the ASCII Protocol client with actual information This message is sent only as a response to requests like CAN controller command or Device command They...

Page 18: ...essages with this new ID will now be forwarded to the Ethernet Due to the fact that this filter list is kept in RAM the modifications to it are volatile This means that with power down the modificatio...

Page 19: ...these times can vary from 2 200 msec or possibly worse in extreme situations When the workload on the CAN net II Generic is so high that it cannot process all messages the excess messages are discarde...

Page 20: ...SCII Protocol server This command also sets the desired CAN bus baud rate The command C INIT 500 r n for example will initialize the can controller hardware to 500 kBit sec Wait for the ASCII Protocol...

Page 21: ...being the actual IP address of the CAN net II Generic Please make sure that your Web Browser has no Proxy settings enabled and that the IP network between your host running the Web Browser and the CAN...

Page 22: ...modifying whether the CAN net II Generic should act as an ASCII Protocol server or client A screenshot of the device configuration page is shown in Screenshot 5 2 on the following page When opened the...

Page 23: ...ct as client in a bridge configuration as described in 2 2 Bridge setup If a valid IP address is entered here the CAN net II Generic will act as client in a bridge configuration It will use the IP add...

Page 24: ...ion reply information 4 The new device configuration is now stored in the device In order to apply the new settings the device must reboot Enter the password for your device and press the Reboot Devic...

Page 25: ...power cycle Or by clicking the Load button the filter list from flash can be restored overwriting the filter list in RAM Screenshot 5 4 Filter configuration Filter configuration steps 1 The Load butt...

Page 26: ...c regardless of their ID If the filter list is enabled only the identifiers which are in the list are forwarded from CAN to TCP IP 4 All filter list changes are held in RAM In order to store the chang...

Page 27: ...II Generic Version 1 5 Web Interface 27 5 4 Expert Configuration With the expert configuration the CAN netII Generic can be optimized for different communication demands Screenshot 5 6 Expert configu...

Page 28: ...ms The CAN net II Generic will retrigger the burst collection time of 20ms with every received CAN message 20ms after the last CAN response message the CAN net II Generic will send a TCP packet with a...

Page 29: ...When writing TCP applications in general the data stream character of TCP must be considered Let s have a look at an example Imagine the CAN net II Generic receives 3 messages on the CAN bus After pac...

Page 30: ...n file form using the Web Interface Check the home or index page of the CAN net II Generic Web Interface for the CAN net II Generic demo client application link The demo does not respect the TCP data...

Page 31: ...ges to the demo application Here the messages are displayed using the printf function Clear the complete filter list set a single CAN ID to be allowed from CAN to Ethernet and enable the filter mechan...

Page 32: ...ven example CAN Bus 1 with baudrate 250 kBd and CAN Bus 2 with 100 kB will be connected using an Ethernet TCP IP network Two IP addresses are required for the bridge setup Please ask your system admin...

Page 33: ...ask 255 255 255 0 Gateway address 0 0 0 0 3 Devices must be connected to the Ethernet network and must be reset Connect to the Client web interface with any Internet browser with enabled JavaScript ty...

Page 34: ...Web Browser cannot open the CAN net II Generic Web Interface A Make sure the Internet Browser you are using has its proxy settings disabled With the proxy settings enabled a URL request to the IP addr...

Page 35: ...ta rate of your system Q The CAN net II Generic does not send my ASCII Protocol CAN messages on the CAN bus A Make sure that the CAN controller is initialized with the correct baud rate and that it is...

Page 36: ...setup one CAN net II Generic must be configured to act as server standard configuration and one CAN net II Generic must be configured to act as client The client can be configured via the Web Interfa...

Page 37: ...E extended T Frame Type D Data R RTR D Data Length Code 0 through 8 ID CAN Message ID XX CAN Message Data 0 through 8 Bytes long r n Message terminator Controller Messages Command Parameters C INIT B...

Page 38: ...C STATUS I CAN status command received I CAN status Bus off Error Warning Data Overrun Init Mode Note all XYZ are optional C FILTER ADD I OK ID 0xX added to filter list C FILTER REMOVE I OK ID 0xX rem...

Page 39: ...E 10 Software queue overrun E 11 CAN controller buffer overrun E 12 CAN error status set E 13 CAN error status reset E 14 Bus off E 20 Unknown message frame format E 21 Unknown message RTR flag E 70...

Page 40: ...om baudrate configuration XYZ failed BT0 and BT1 are invalid CAN init command received Baudrate configuration XYZ failed E 83 CAN controller failed to set requested baud rate E 90 Interface is in the...

Reviews: