12.07.2015 Views

4n-gx-can-RS232-RS485-commands-v4.7 - eng

4n-gx-can-RS232-RS485-commands-v4.7 - eng

4n-gx-can-RS232-RS485-commands-v4.7 - eng

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CAN 2.0A/B ↔ <strong>RS232</strong>/<strong>RS485</strong> Converter(Prod. No. #630)- Listen Only Mode –No influence of the CAN system by the converteror- Normal Mode –A/B 11, 29 Bit IDCAN-side: 10 kbps ... 1 Mbps<strong>RS232</strong>- side: up to 1 Mbps<strong>RS485</strong>- side: up to 3 Mbps


Table of ContentsTable of Contents.....................................................................................................................................21 Introduction...........................................................................................................................................32 Startup...................................................................................................................................................43 Converter Block Diagram.......................................................................................................................54 Setup Mode............................................................................................................................................55 Normal Mode.........................................................................................................................................76 Converter ASCII Commands...................................................................................................................97 Technical Specifications: CAN ↔ <strong>RS232</strong>/<strong>RS485</strong> Adapter (#630)........................................................12


1 IntroductionAs a powerful tool the CAN converter supports development, service, testing and maintenance ofCAN-based systems. They are suitable for online monitoring and manipulation of the bus as well astheir logging.The converter supports 11 and 29 bit identifiers (CAN2.0A/2.0B). The Listen Only mode it is notransmission of Ack bit and error frames, thereby influencing the CAN system is avoided.The CAN baud rate is detected automatically by the converter. As well the converter provides theability to adjustthe baud rate and other parameters to your needs.The CAN Converter is ideally suitable for the investigation of the CAN bus data. The converter <strong>can</strong> beeasily plugged into any <strong>RS232</strong> or <strong>RS485</strong> port of a computer or notebook. The data <strong>can</strong> be displayedin any standard terminal program or the 4N-CAN-terminal program.More information <strong>can</strong> be found in the following sections.


2 StartupBefore first use:• Connect converter on <strong>RS232</strong>/<strong>RS485</strong> side with your pc <strong>RS232</strong>/<strong>RS485</strong>-port• Connect CAN-side with your application• Start the terminal programIn our download area you will find the converter optimized for the terminal program: 4N-GXCAN-Terminal• Choose the right COM port• Set COM port to 38600 Baud 8N1• Power on the converter• Send within 5 seconds a "s" (initiates the setup mode)• The converter responds "CAN2.0 – <strong>RS232</strong>/<strong>RS485</strong> Converter V4.4"• Send "h" for help output in the terminal• Set CAN side configuration as needed• Send "E" - Stores settings in the flash and restarts the converter. ( - corresponds to"Enter" key)• DoneImportant:Sending a "s" within 5 seconds switches the converter into setup mode. Options of this mode will bedescribed later. "E" or "Q" ends the setup mode.E - Saves Configuration to the converters flash memory, and exits the setup modQ - Exit without savingFor the operation of the converter, the following setup parameters must be set correctly:• CAN Baudrate (or Autobaud)• ID (results in 11- or 29-Bit Format)• Acceptance-Code• Acceptance-Mask• <strong>RS232</strong>/<strong>RS485</strong> Baudrate


4.1 CAN ID Filter SetupThe converters accept messages from specific IDs which <strong>can</strong> be defined by the CAN identifier (CI), theCAN-Acceptance-Code (CAC) and the CAN-Acceptance-Mask (CAM). CAC defines the mandatoryrequired bits of the received ID and the CAM, the bits to ignore. The CAN identifier<strong>can</strong> be determined by the choice of converter id to whether either will be accepted ONLY 11bits (id


4.2 CAN ModesThe converter is in Listen Only mode or normal mode to operate.L = 1 Listen Only Mode (read without ACK) L = 0 Normal Mode (read and write)5 Normal ModeIf the converter powered on and the setup mode is not initiated within 5 seconds, it starts innormal mode. In this mode, the communication of the CAN bus <strong>can</strong> be monitored (chapter:5.2 Receive Data) and data be transmitted to the bus (chapter: 5.1 Sending Data).5.1 Sending DataAll Data, sent from the computer to the COM port, will be output on the CAN bus.The following formats are used:ID CR space = $20 (Space "_") CR = $ 0D (Enter "") - ID without DataID space Data CR space = $20 (Space "_") CR = $ 0D (Enter "") - ID with DataWith the converter setting:CAN-Identifier = 1F000000 (29 Bit CAN-Identifier)the following data is output: (11 and 29 bit messages)InputMeaning7E8_0001020304 CAN ID 7E8 Data 00 01 02 03 04 Data L<strong>eng</strong>th 57E8_0 CAN ID 7E8 no Data Data L<strong>eng</strong>th 07E8_01_01 CAN ID 7E8 Data 01 Data L<strong>eng</strong>th 11FFFFFFF_010203_03 CAN ID 1FFFFFFF Data 0102030 Data L<strong>eng</strong>th 310001234_0102_02 CAN ID 10001234 Data 01020 Data L<strong>eng</strong>th 2With the setting:CAN-Identifier = 1FF (11 Bit CAN-Identifier)the following data is output: (only 11 bit CAN messages)InputMeaning7E8_0001020304_05 CAN ID 7E8 Data 00 01 02 03 04 Data L<strong>eng</strong>th 57E8_0 CAN ID 7E8 no Data Data L<strong>eng</strong>th 07E8_01_01 CAN ID 7E8 Data 01 Data L<strong>eng</strong>th 1In case of 11 bit ID no 29 bit ID messages will be sent!5.1.1 Send ErrorIf data is sent in the wrong format to the converter through the USB/COM port, it <strong>can</strong> be recognizedby the converter response "S" (Enter "S" Enter).e.g.: 1FFFFFFF_010Converter response: "S"(incomplete data, 0101 would be correct)


5.2 Receiving DataWhat data received by the converter and at <strong>RS232</strong>/<strong>RS485</strong> side are output for further processingdepends on the configuration of the CAN identifier, the CAM-Acceptance-Code and the CAN-Acceptance-Mask. A detailed description of these parameters <strong>can</strong> be found with examples inchapter "3.1 CAN ID Filter Setup".Accepted CAN messages will be output in ASCII format as followed:ID space Data space L<strong>eng</strong>th CRspace = $20 (Space "_") CR = $ 0D (Enter "")With the converter setting:CAN-Identifier = 1F000000 (29 Bit CAN-Identifier)CAN-Acceptance-Code = 00000000 (0 receives all CAN-Frames)CAN-Acceptance-Mask = FFFFFFFF (F receives all CAN-Frames)the following data is output on the USB side: (11 and 29 bit message)PC OutputMeaning7E8_0001020304_05 CAN ID 7E8 Data 00 01 02 03 04 Data L<strong>eng</strong>th 57E8_0 CAN ID 7E8 no Data Data L<strong>eng</strong>th 07E8_01_01 CAN ID 7E8 Data 01 Data L<strong>eng</strong>th 11FFFFFFF_010203_03 CAN ID 1FFFFFFF Data 0102030 Data L<strong>eng</strong>th 310001234_0102_02 CAN ID 10001234 Data 01020 Data L<strong>eng</strong>th 2With the setting:CAN-Identifier = 1FF (11 Bit CAN-Identifier)CAN-Acceptance-Code = 00000000 (0 receives all CAN-Frames)CAN-Acceptance-Mask = FFFFFFFF (F receives all CAN-Frames)the following data is output: (only 11 bit CAN messages)PC OutputMeaning7E8_0001020304_05 CAN ID 7E8 Data 00 01 02 03 04 Data L<strong>eng</strong>th 57E8_0 CAN ID 7E8 no Data Data L<strong>eng</strong>th 07E8_01_01 CAN ID 7E8 Data 01 Data L<strong>eng</strong>th 15.2.1 Receive ErrorError LED (Buffer Overflow LED) lights up, if data is sent to fast from the PC to the converter.Buffer Overflow <strong>can</strong> be recognized by "E" (Enter "E" Enter)."E" is send from converter to PC.At full CAN bus utilization <strong>can</strong> rarely cause errors (at 1 Mbps 100% bus utilization).To recognize this is the fact that the messages are not received in full.z.B.7E8_000102 CAN ID 7E8 Data 00 01 02 ? Data L<strong>eng</strong>th?7E8_01 CAN ID 7E8 Data 01 ? Data L<strong>eng</strong>th?


6 Converter ASCII Commands(CR)=Enter (Dez=13, Hex=0D)Es können Klein- und Großbuchstaben verwendet werden.BefehlFunktionS S Setup-Mode activationPCP0(CR)P1(CR)C0(CR)C1(CR)C2(CR)C3(CR)C4(CR)C5(CR)C6(CR)C7(CR)C8(CR)C9(CR)CA(CR)CB(CR)CC(CR)CD(CR)CE(CR)CF(CR)Is possible only after power up in the first 5 seconds! In setup mode,settings for the CAN side <strong>can</strong> be made and stored.Shows settings stored in converter RAM – changes have to be savedby "E" xitShow default settings.Response: “Settings: List(CR)OK(CR)“ or “ERROR(CR)“e.g.C CAN-Bitrate : 5L CAN-Mode : 0I CAN-Identifier : 10000000A CAN-Acceptance-Code : 00000100M CAN-Acceptance-Mask : 00000000R Baudrate : 3Identifier L<strong>eng</strong>th : 29Acc. Code L<strong>eng</strong>th : 32Acc. Mask L<strong>eng</strong>th : 32OK10 kbps CAN Bitrate20 kbps CAN Bitrate25 kbps CAN Bitrate50 kbps CAN Bitrate62,5 kb CAN Bitrate100 kbps CAN Bitrate125 kbps CAN Bitrate128,2 kb CAN Bitrate192 kbps CAN Bitrate250 kbps CAN Bitrate500 kbps CAN Bitrate800 kbps CAN Bitrate1.0 Mbps CAN Bitrate Other baud rates available on requestAutobaud – automatic baudrate DetectionAutobaud – automatic baudrate DetectionAutobaud – automatic baudrate DetectionResponse: “Settings: List(CR)OK(CR)“ or “ERROR(CR)“


BefehlIIxxx(CR)orIxxxxxxxx(CR)FunktionIdentifier in Hex (000...7FF)11 Bit Standard FormatorIdentifier in Hex (00000000...1FFFFFFF) 29 Bit Extended FormatL Lx(CR) Listen Mode Only (0...1)This setting determines whether only 11-bit or 11-bit and 29-bit areaccepted by CAN-Acceptance-Code and CAN-Acceptance-Mask.Response: “List of parameters: (CR)OK(CR)” or “ERROR(CR)“0 – CAN Normal Mode (read and write)1 – CAN Listen Only Mode (listening only, read)Response: “List of parameters: (CR)OK(CR)” or “ERROR(CR)“A Axxxxxxxx(CR) CAN-Acceptance-Code x = (0...000007FF) 11 Bit Standard FormatCAN-Acceptance-Code x = (0...1FFFFFFF) 29 Bit Extended Formatx = 0 receives all CAN-FramesResponse: “List of parameters: (CR)OK(CR)” or “ERROR(CR)“M Mxxxxxxxx(CR) CAN-Acceptance-Mask x = (0..000007FF) 11 Bit Standard FormatCAN-Acceptance-Mask x = (0..1FFFFFFF) 29 Bit Extended FormatRVNR0(CR)R1(CR)R2(CR)R3(CR)R4(CR)R5(CR)R6(CR)R7(CR)R8(CR)R9(CR)RA(CR)RB(CR)RC(CR)RD(CR)RE(CR)RF(CR)x = F receives all CAN-FramesResponse: “List of parameters: (CR)OK(CR)” or “ERROR(CR)“600 bps <strong>RS232</strong>/<strong>RS485</strong> Baudrate (all 8 N 1)1200 bps2400 bps4800 bps9600 bps19200 bps38400 bps57600 bps115200 bps230000 bps500000 bps600000 bps750000 bps1000000 bps1500000 bps3000000 bps Other baud rates available on requestResponse: “ (CR)OK(CR)” or “ERROR(CR)”Software Version NumberResponse: „Software Version: x.x(CR)“Converter Nummerx = 0..FResponse: „Converter-ID: xxxx xxxx(CR)“ x= 0..F


Befehl?orH?orHFunktionHelpThis table is output to the COM portE E ExitExits the Setup Mode and saves the configuration in flash memory of theconverter, followed by a Reset = Power On(Restart)Response: e.g.C CAN-Bitrate : 5L CAN-Data L<strong>eng</strong>th : 8I CAN-Identifier : 1F0000000A CAN-Acceptance-Code : 00000100M CAN-Acceptance-Mask : 00000000R USB-Baudrate : 3Identifier L<strong>eng</strong>th : 29Acc. Code L<strong>eng</strong>th : 32Acc. Mask L<strong>eng</strong>th : 32SAVE to EEpromOKRESETQ Q QuitExits the setup mode WITHOUT saving changes in the in flash memory ofthe converter, followed by a Reset = Power On(Restart)Response:OKRESETOther parameters, functions are available on request.


7 Technical Specifications: CAN ↔ <strong>RS232</strong>/<strong>RS485</strong> Adapter (#630)PC Software:Connectror 1:Connector 1:4N-GX CAN-TerminalCAN 2.0A/B:High speed full isolated CAN 2.0A & 2.0B BusSlope-Control Mode to Reduce EMIThermal Shutdown, Current LimitingISO 11898 Standard, CAN 2.0A & 2.0BSub-D male jack 9 pin (CiA DS102-1)Pin1 - PowerIn +7,5 ... 16V DC2 - CAN_L3 - GND4 - nc5 - nc6 - GND7 - CAN_H8 - nc9 - PowerIn +7,5 ... 16V DCCAN terminator:CAN 2.0 baudrates:Pin 1 is connected top in 9 internallyPin 3 is connected top in 6 internally120 R - between CAN_L und CAN_H (internally)10 kbps CAN Bitrate20 kbps CAN Bitrate25 kbps CAN Bitrate50 kbps CAN Bitrate62,5 kb CAN Bitrate100 kbps CAN Bitrate125 kbps CAN Bitrate128,2 kb CAN Bitrate192 kbps CAN Bitrate250 kbps CAN Bitrate500 kbps CAN Bitrate800 kbps CAN Bitrate1.0 Mbps CAN BitrateOther baud rates available on requestConnector 2: 232:±15 kV Human Body Model±8 kV IEC 1000-4-2, Contact Discharge±15 kV IEC 1000-4-2, Air-Gap DischargeLatchup Free1 Mbps Data RateEIA/TIA-232 Specifications Down to 3.0 V


<strong>RS485</strong> Receiver:+/- 15 kV Human Body Model+/- 6 kV IEC 1000-4-2, Contact Discharge+/- 12 kV IEC 1000-4-2, Air-Gap DischargeAllow Up to 128 Receivers on the BusTrue-Fail-Safe Receiver-7V .. +12V Common-Mode RangeThermal Protection Against Output Short CircuitConnector 2:<strong>RS485</strong> Driver:+/- 9 kV Human Body ModelSlev-Rate Limited for Errorless DataTransmission-7V .. +12V Common-Mode RangeCurrent LimitingThermal Shutdown for Driver-OverloadProtectionSub-D 9 pin female jackPin<strong>RS485</strong>1 - TX- (Out)2 - TX+ (Out)3 - RX+ (In)4 - RX- (In)5 - GNDA 120 R terminator connects RX- und RX+<strong>RS232</strong> & <strong>RS485</strong>baudrates:<strong>RS232</strong>6 - nc7 - RXD (In)8 - TXD (Out)9 - nc600 bps (all 8 N 1)1200 bps2400 bps4800 bps9600 bps19200 bps38400 bps57600 bps115200 bps230000 bps500000 bps600000 bps750000 bps1000000 bps1500000 bps


Galvanic isolation:Power supply:Indicators:Operatingtemperature:Dimensions:3000000 bps<strong>RS232</strong> up to 1 Mbps, <strong>RS485</strong> up to 3 MbpsOther baud rates on request!2500 Vrms 1 Min.Viorm=560VpeakElectronic Modul with Urethan sealing6,8 .. 16V DC over CAN connectorPower: Run LEDCAN 2.0A/B: TX/RX LED + Buffer Overflow LED<strong>RS232</strong>/<strong>RS485</strong>: TX/RX LED + Buffer Overflow LED-5..+70°CL 83 B 42 H 21 (mm) plastic housing(Material: ABS-94HB)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!