B&B Electronics Command Response Protocol HVD100A3 Product Manual

B&b electronics command response protocol product manual

Advertisement

Quick Links

Model: HVD100A3
HDV100A3 Command
Response Protocol
Documentation Number: HDV100A3-4407CR
International Headquarters
B&B Electronics Mfg. Co. Inc.
707 Dayton Road -- P.O. Box 1040 -- Ottawa, IL 61350 USA
Phone (815) 433-5100 -- General Fax (815) 433-5105
Home Page: www.bb-elec.com
Sales e-mail:
orders@bb-elec.com
-- Fax (815) 433-5109
Technical Support e-mail:
support@bb-elec.com
-- Fax (815) 433-5104
© B&B Electronics -- November 2005
HDV100A3 Command & Response Manual-1306cr
Cover Page
B&B Electronics -- 707 Dayton Rd. -- PO Box 1040 -- Ottawa, IL 61350
PH (815) 433-5100 -- FAX (815) 433-5104

Advertisement

Table of Contents
loading

Summary of Contents for B&B Electronics Command Response Protocol HVD100A3

  • Page 1 Model: HVD100A3 HDV100A3 Command Response Protocol Documentation Number: HDV100A3-4407CR International Headquarters B&B Electronics Mfg. Co. Inc. 707 Dayton Road -- P.O. Box 1040 -- Ottawa, IL 61350 USA Phone (815) 433-5100 -- General Fax (815) 433-5105 Home Page: www.bb-elec.com Sales e-mail: orders@bb-elec.com -- Fax (815) 433-5109 Technical Support e-mail:...
  • Page 3: Table Of Contents

    Table of Contents INTRODUCTION... 1 Intelligent Mode Command Protocol... 2 Formatting the Control Bytes ... 3 DETAILED DESCRIPTION OF GENERAL FUNCTION CODES... 4 Command Acknowledgement ... 4 RS-232 Baud Rate Setup ... 5 Setting Baud 1, Baud 2... 7 Baud Rate Example... 8 Time Stamp Information ...
  • Page 4 WARNING! This Model HDV100A3 Converter Module allows you to connect to active J1708 / J1939 networks. It is possible that your transmissions through this converter module could cause malfunction of the network operation, damage to software or equipment, or bodily harm. Do Not Transmit Any Messages to the network without a complete understanding of the operation of the network.
  • Page 5: Introduction

    Introduction The HDV100A3 adapter has two modes of operation: J1708 Intelligent and J1939 Intelligent mode In Intelligent mode the HDV100A3 works with a command protocol to control different operations of the HDV100A3. The HDV100A3 performs several functions in the intelligent mode in order to reduce the overhead and timing requirements of the host application when communicating with the J1708 bus.
  • Page 6: Intelligent Mode Command Protocol

    Intelligent Mode Command Protocol The HDV100A3 uses a simple protocol to communicate to vehicle bus. The protocol is divided into four parts: Start Of Frame (SOF) Control Field (shown in light gray) Data Field (shown in dark gray) Checksum (CS) Intelligent Mode Message Structure Number of Control Bytes...
  • Page 7: Formatting The Control Bytes

    Formatting the Control Bytes The 2 byte is “Number of Control Bytes” to follow and always precedes the control field. The third byte is the ID byte. This byte tells the hardware where to direct the message. Valid entries for functions are: ID Codes =01 Message for J1708 =02 Message for J1939...
  • Page 8: Detailed Description Of General Function Codes

    Detailed Description of General Function Codes Command Acknowledgement All commands sent to the device will be acknowledged. If no error occurs an ACK will be sent with the ID byte that accompanied the command. If an error occurred, a NACK will be sent with the ID byte that accompanied the command as well as a Function code of $05 and the Error Code.
  • Page 9: Rs-232 Baud Rate Setup

    RS-232 Baud Rate Setup To set the baud rate for the RS-232 port, set a general command code of 08. Set the function code to 01. Then set 3 control bytes as follows. Function Start Control Command Function Bytes Code Code Frame Byte #...
  • Page 10 Bits 1 and 0 set the word length Bit 0 Bit 1 Default value. The HDV100A3 should always be set to 8-bit word length. B&B Electronics -- 707 Dayton Rd. -- PO Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104 Word Length 8 (default) HDV100A3 Command &...
  • Page 11: Setting Baud 1, Baud 2

    Setting Baud 1, Baud 2 Baud Rate Setup Table Baud Decimal Hex Divisor MSB Rate Divisor 9600 $00 (default) 14400 19200 38,400 57,600 115,200 230,400 460,800 All baud rates are entered as hex numbers. To calculate your own decimal divisor use the following formula. The decimal number must be converted to hexadecimal before entering the number.
  • Page 12: Baud Rate Example

    Baud Rate Example To set the PC baud rate to 57,600 baud, N,8,1, format the message as follows. Byte Byte Byte Function Number Value Start of frame Number of control bytes Command byte (08 = internal command) Function Bbte (01 = change baud) Baud 1 Baud 2 Number of data bytes...
  • Page 13: Time Stamp Information

    Time Stamp Information The HDV100A3 supports a four-byte rolling time stamp with a resolution of 1.5 microseconds per bit. The maximum time stamp value is 6,442.45 seconds before roll over. The 4-byte time stamp will be added to all transmission from the bus. The time stamp will be added to the transmission confirmation message.
  • Page 14 Byte Byte Function Number Value Start of frame Number of control bytes ID byte 08 = internal command Function code 20 = stop time stamping Number data bytes Checksum To resume time stamping send the following command: Byte Byte Function Number Value Start of frame...
  • Page 15: Master Reset Command

    Master Reset Command The master reset command allows the HDV100A3 to be reset from the PC. Sending this command resets the HDV100A3 to the default start-up state. You will lose all setting sent in the smart mode. Byte Byte Function Number Value Start of frame...
  • Page 16: J1708 Commands

    J1708 Commands Receiving Data from the J1708 Bus After the HDV100A3 is set into its Intelligent mode of operation and the RS-232 data rate is configured, you are now ready to communicate with the J1708 bus. A receive command must be sent to the HDV100A3 before attempting to transmit to the bus.
  • Page 17 Byte Byte value Byte Function number (hex) Start of frame The number of control bytes ID byte 01= J1708 Function code 10 hex stop receive Number of data bytes (00 place holder) Checksum (bytes 1 through 5 added together) After sending this command to the device, the device will respond with a confirmation message and data will cease.
  • Page 18: Transmitting Data To The J1708 Bus

    Transmitting Data to the J1708 Bus The HDV100A3 supports standard J1708 commands of up to 21 bytes. Additionally the HDV100A3 can send messages up to 100 bytes to the J1708 bus. It is the responsibility of the sending software to check for “ignition off”...
  • Page 19 After sending a transmit message to the HDV100A3 you will get the confirmation message if the checksum is correct. A transmit complete message is sent to the PC after the device successfully transmits the message to the J1708 bus. A second message should not be sent to the device before confirming that the first message has been sent.
  • Page 20: Set Filter Active

    J1708 Message Filter The J1708 message filter will operate on 4 different MID’s. Only messages with the same MID as set in the filter will be sent to the PC. The filters will be OR’ed together so that multiple MID’s can be filtered, MID1 or MID2 or MID3.
  • Page 21: Broadcast Message

    Broadcast Message The HDV100A3 supports one broadcast message. Once configured by the host application, this message will be sent repeatedly by the HDV100A3 at a programmed time interval. This feature is useful to provide a “heartbeat” function to the J1708 bus with no overhead to the host application’s software.
  • Page 22 To stop broadcast transmission it is not necessary to send the whole message. The message below will stop broadcast transmission. Byte Byte Function Number Value Start of frame Control bytes ID byte 1 = J1708 message Set broadcast 7 = On X = Time interval (see chart) Data bytes Checksum Byte 4 Values...
  • Page 23: J1939 Commands

    J1939 Commands The J1939 protocol is similar to the J1708 protocol. The message starts with Start of Frame byte 01. The number of control bytes will be 06. The control code for J1939 is 02. The function codes (XX) are as follows: 00=Sets receive function off 01=Sets receive on 02=Transmits a message with data...
  • Page 24: Start Receive On J1939 Bus

    wise to set the receiver off when not in use. Sending the Start Receive clears the mask. This renders the filter function useless. Start Receive on J1939 Bus Byte Byte Function Number Value Start of frame Control bytes ID byte 02 = J1939 message Function code 01 start reception Data bytes Checksum...
  • Page 25: Arbitration Field (Y1, Y2, Y3, Y4)

    Data messages received from the HDV100A3 operating in the J1939 mode, is formatted as follows: Control Field Start # of Contr Time Stamp Control Byte 4 Bytes Frame bytes 02 msb The message starts with 01. The number of control bytes is 05. Next is the control byte 02, followed by the time stamp, four bytes, with msb first.
  • Page 26 A message received from the HDV will be formatted as follows: <01><05><02><06><C7><CC><ED><0D><67><80><20><00><08><F0><7D><DA><00>< 00><FF><FF><DA><C9> The < > are placeholders and are NOT transmitted with the data. ** = value changes with message. Byte Byte Function Number Value Start of frame Control bytes ID byte 02 = J1939 message Time stamp MSB ** Time stamp MSB –1 **...
  • Page 27: Transmit Data To J1939 Bus

    Transmit Data to J1939 Bus Byte Byte Function Number Value Start of frame Control bytes ID byte 1 = J1708 message Function byte 02 transmit message MSB of arbitration field (J1939 priority bits) MSB-1 MSB-2 LSB of arbitration field (J1939 source address) Number of data bytes DATA From 0 to 8 bytes...
  • Page 28: Set Filter 1 To 4

    The mask can be used to look at a group of messages: To set the mask to filter on the J1939 priority field, the mask would be loaded with: (01, 06, 02, 04, E0, 00, 00, 00, 00, ED) To set the mask to filter on the J1939 PGN field, the mask would be loaded with: (01, 06, 02, 04, 07, FF, F8, 00, 00, 0B) To set mask to filter on both the priority field and the PGN field the mask...
  • Page 29 2. Set the “Mask” to the desired pattern (01, 06, 02, 04, XX, XX, XX, XX, 00, CS). 3. Set a filter (1 to 4) to the match value (01, 06, 02, YY, XX, XX, XX, XX, 00, CS). Be sure that this is NOT the same as any other filter value or the HDV100A3 may become erratic.
  • Page 30: J1939 Header Worksheet

    J1939 Header Worksheet This worksheet will aid in filling out/decoding the J1939 arbitration field. J1939 CAN Frame Number Function Entry Priority Bits Reserved Data Page PDU-Format (PGN Byte 2) PDU Specific (PGN Byte 3) Source Address B&B Electronics -- 707 Dayton Rd. -- PO Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104 Value Byte 1...
  • Page 31: Error Codes

    Error Codes Error Code Format: Byte Number Byte Value Error Code Type of Error Meaning of Error Generated Generated Inbuffer overflow; more than 127 bytes Checksum mismatch Protocol error; function, ID, code bad J1708 J1708 input buffer full missed bus message J1708 J1708 command unknown J1708...

Table of Contents