CAN Adapters

ID #1102

How to use the ASCII command set?

 

First of all it is recommended to fully read the manual section about the ASCII command set. While doing this create a short list of your own, with all available commands in it. You'll get familiar with the available functions.

Then open the communication function to the CAN controller. On NET-CAN use Telnet (PuTTY is better). On other products open the serial port and configure it for 3Mbps,RTS/CTS,8N1 operation (PuTTY is useful again). Activate the logging option of PuTTY to later check in detail what happened.

Then you may issue some commands to the CAN controller. Note the upper or lower case of the command characters. There are commands which differ in meaning and syntax when written in lower case. Even if a certain command may operate the same in upper and lower case, only use it in the documented variant. In future firmware the lower case may be a different command.

First send a "C<CR>" to close the channel, in case you opened it previously.
Then send the commands  "V<CR>" to see the version information, and "N<CR>" to see the serial number.
These tests just confirm you correctly communicate with the CAN controller by ASCII commands.

Next set the bitrate for the CAN bus. Unless absolutely necessary use the "S5<CR>" command to  select 250kbit/s, or any other standard number. Note the upper case "S", the lower case "s" command has different syntax.
You have to configure the bitrate before opening the CAN channel, otherwise the controller is ill configured, and will send error frames to the CAN bus.

Then open the channel with the "O<CR>" command.

You will immediately receive data from the bus, if the connected devices transmit data without special request.
Or send some test frames in standard format "T" or as extended frame "t".

Insert the command "F<CR>" to see the status flags at arbitrary times.

Finally close the channel using the "C<CR>" command again.

 

Here is a sample log from a test session:


C
 
V
V1017
 
N
N430101234
 
S5
 
O
 
T0DF8051C8402F085840C01BE0
T09F8021C8E9FCB98A0400FFFF
T09F8011C884085817B48A2AD2
T09F1121C8E9A919000081F8FC
T09F8011C884085817B48A2AD2
T09F1121C8EAA919000081F8FC
T0DF8051C8602FEC5840503FEB
T0DF0101C8ECF05840503FEB1B
T19FA041C86E00F5157F072ACB
F
FA4
 
T0DF8051C8002F235840A002EC
T0DF0101C823F05840A002EC1B
T19FA041C80FC80E20300500F5
T09F1121C823FFFFFF7FFF7FFF
T09F8011C884085817B68A2AD2
T09F1121C824FFFFFF7FFF7FFF
T09F8011C884085817B68A2AD2
C
 


 

 

 

Tags: -

Related entries:

Last update: 2015-02-17 10:53
Author: Support
Revision: 1.0

Digg it! Print this record Send to a friend Show this as PDF file
Please rate this entry:

Average rating: 1 out of 5 (2 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry