IXXAT CAN@net II/Generic Скачать руководство пользователя страница 17

CAN@net II/Generic, Version 1.5 

ASCII Protocol Server 

 

17

 

 

ERR_CAN_BAUD_UNKNOWN  0x81  CAN init command received. 

Baudrate is unknown 

ERR_CAN_AUTOBAUD_ 
FAILED 

0x82  CAN bus baud rate was not 

detected 

ERR_CAN_SET_BAUD_ 
FAILED 

0x83  CAN controller failed to set 

requested baud rate 

ERR_INTERFACE_STATE_ 
WRONG 

0x90  Interface is in the wrong state 

to execute this command 

Table 4.2.3 CAN@net II/Generic error codes 

 

4.2.6 Info Message 

Messages 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 will never be sent 
in an asynchronous way without a previous request. 
 

Message format: 
 

Message text 

\r\n 

 

The groups of characters are separated by a space each. For a valid "Info 
message", all fields must be specified. 

 
Detailed: 

 

Message type "Info message" 

Message text  Readable message text 

\r\n 

Message terminator 

 

Example for an "Info message": 
 

Response to a "CAN controller Command"; the command has been executed 
successfully: 

      I OK \r\n 

 

Содержание CAN@net II/Generic

Страница 1: ...CAN net II Generic TCP IP Gateway for CAN with Open Socket API MANUAL ENGLISH...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Отзывы: