SAE J1939 - AmeriCommerce

Transcription

SAE J1939Serial Control and Communications Vehicle NetworkPresented byWilfred Vossesd electronics, Inc.525 Bernardston RoadGreenfield, MA 01038http://www.esd-electronics.usDownload/View this presentation at:http://www.canseminar.com/Tutorials.html/ esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301

LiteratureLiterature onController Area Network,CANopen and SAE J1939 esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 2

esd Product Lineesd electronics provides: CAN Hardware Interfaces – PCI, cPCI, VME, PMC, PC104, ISA, and more CAN Gateways – USB, EtherNet, Bluetooth, IEEE488, and more CAN Converters – CANopen, DeviceNet, Profibus, and more CAN Embedded Controllers Drivers and APIs for various operating systems Free CAN Analyzer software – included with driveresd electronics, Inc.525 Bernardston RoadGreenfield, MA 01301Tel.: 413-773-3170Fax: 413-773-3171http://www.esd-electronics-usa.com esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301

What is SAE J1939 – General Aspects Higher-layer protocol based on Controller Area Network (CAN)Provides serial data communications between Electronic Control Units(ECU) in any kind of heavy duty vehicles. Protocol features based on J1708 (RS485) J1587 Ingenious protocol design with very little protocol overhead Driven by data, not myriad of functions as other HLPs Takes full advantage of all CAN features Detailed documentation only available through SAE esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 4

SAE J1939 ApplicationsJ1939-based protocols are used in: Diesel power-train applicationsIn-Vehicle networks for trucks and busesAgriculture and forestry machinery (ISO 11783)Truck-Trailer connectionsMilitary vehicles (MiLCAN)Fleet management systemsRecreational vehiclesMarine navigation systems (NMEA2000) esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 5

What is CAN – General Aspects Serial Network Technology for Embedded Solutions Originally designed by Bosch forautomotive industryBecame very popular in industrialautomation Network technology established among micro-controllers Well suited for high speed/real-time applications Replaces expensive Dual-Port RAM technology Excellent error detection and fault confinement Extremely reliable Max. baud rate of 1 MBit/sec – SAE J1939 uses 250 kBit/sec esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 6

SAE J1939 – Quick ReferenceJ1939 takes advantage of CAN features such as: Maximum reliabilityExcellent error detection & fault confinementCollision-free bus arbitrationJ1939 Specifics: Shielded twisted pair wireMax. network length of 40 meters ( 120 ft.)Standard baud rate of 250 kBit/secUses 29-Bit Message IDMax. 30 nodes (ECUs) in a network esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 7

SAE J1939 – Quick Reference esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 8

SAE J1939 – Quick ReferenceJ1939 Specifics: Does not support Master/Slave or Client/ServerconfigurationDoes not support node monitoringFeatures Address Claiming immediately after networkstart-up Allows “Plug&Play” feature Allows segmentation of messages larger than 8 bytes esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 9

SAE J1939 – Standards CollectionSAE J1939 Standards Collection scheme is based on theISO/OSI 7-Layer Model esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page10

SAE J1939 – Standards CollectionJ1939Recommended Practice for a Serial Control and Communications Vehicle NetworkJ1939-01Recommended Practice for Control And Communications Network for On-Highway EquipmentJ1939-02Agricultural and Forestry Off-Road Machinery Control and Communication NetworkJ1939-11Physical Layer - 250k bits/s, Twisted Shielded PairJ1939-13Off-Board Diagnostics ConnectorJ1939-15Reduced Physical Layer, 250k bits/sec, Un-Shielded Twisted Pair (UTP)J1939-21Data Link LayerJ1939-31Network LayerJ1939-71Vehicle Application LayerJ1939-73Application Layer – DiagnosticsJ1939-74Application - Configurable MessagingJ1939-75Application Layer - Generator Sets and IndustrialJ1939-81Network Management esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page11

SAE J1939 – Message Format (J1939/21) CAN Standard 2.0A was extended to 2.0B to allow a 29-Bit Identifieraccording to J1708 and J1587. IDE Bit indicates 11-Bit or 29-Bit Message Identifier Both formats can co-exist on the same CAN bus MilCAN uses J1939 29-Bit Message ID andCANopen 11-Bit Message IDJ1939/21 also defines the segmentation of messages largerthan 8 bytes. esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 12

SAE J1939 – Message Format esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 13

SAE J1939 – Parameter Group Number Parameters embedded in the 29-Bit message identifier are divided intothree sections: Priority PGN (Parameter Group Number) 8 Bit Source AddressPGN identifies the Parameter Group (PG)PGs point to information of parameter assignments within 8 byteCAN data field, repetition rate and priority8672 different Parameter Groups per page – 2 pages are available esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 14

SAE J1939 – Parameter Group NumberPriority First three bits represent priority during arbitration processProvides eight priority levelsA value of 0 (000) highest priority;a value of 8 (111) lowest priorityHigh priority messages assigned to time critical data such astorquecontrol data from transmission to engineLower level priorities suitable for non-time-critical data such asengine configuration dataR Reserved for future purposesShould always be set to 0 when transmitting messages esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 15

SAE J1939 – Parameter Group NumberDP – Data Page Page selector for PDU (Protocol Data Unit) Format (PF) fieldCurrently at 0, pointing to Page 0Page 1 for future purposesPDU Format (PF) PF 0 - 239 (PDU1) indicates a destination address in PSPF 240 - 255 (PDU2) indicates extension to PDU Format (PF)PDU Specific (PS) Content interpreted according to information in PDU Format (PF) esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 16

SAE J1939 – PGNs and SPNs esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 17

SAE J1939 – PGNs and SPNsPGN 65262Engine TemperatureTransmission Rate1 secData Length8 bytesData Page0PDU Format (PF)254PDU Specific (PS)238Default Priority6PG Number65262 (FEEEhex)Description of DataByteSPN1Engine Coolant Temperature1102Fuel Temperature1743, 4Engine Oil Temperature1755, 6Turbocharger Oil Temperature1767Engine Intercooler Temperature528Engine Intercooler Thermostat Opening1134 esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 18

SAE J1939 – PGNs and SPNsSPN 110Engine Coolant TemperatureTemperature of liquid engine cooling systemData Length1 ByteResolution1 deg C / BitOffset-40 deg CData Range-40 to 210 degCTypeMeasuredReferencePGN 65262 esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 19

SAE J1939 – PGN RangeDPPGN Range (hex)Number ofPGNsSAE or ManufacturerAssignedCommunication0000000 – 00EE00239SAEPDU1 Peer-to-Peer000EF001MFPDU1 Peer-to-Peer000F000 – 00FEFF3840SAEPDU2 Broadcast000FF00 – 00FFFF256MFPDU2 Broadcast1010000 – 01EE00239SAEPDU1 Peer-to-Peer101EF001MFPDU1 Peer-to-Peer101F000 – 01FEFF3840SAEPDU2 Broadcast101FF00 – 01FFFF256MFPDU2 BroadcastSAE Assigned by SAEMF Manufacturer Specific – Proprietary Messages esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 20

SAE J1939 – Proprietary Parameter GroupsProprietary Parameter Groups and their numbers are designed using theexact same structure as Parameter Group and their numbers defined by theSAE.Parameter GroupNameProprietary AParameter GroupNumber61184 (00EF00hex)DefinitionProprietary PG using the PDU1 Format for Peer-to-Peercommunication.Transmission RateManufacturer SpecificData Length0 – 1785 bytes (multi-packet supported)Extended Data Page(R)0Data Page0PDU Format239PDU Specific8 bit Destination Address – Manufacturer AssignedDefault Priority6Data DescriptionManufacturer Specific esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 21

SAE J1939 – Communication MethodsDestination Specific Communications: Use PDU1 (PF values 0 to 239) Destination address requiredBroadcast Communications: Use PDU2 (PF values 240 to 255)Sending a message from single or multiple sources to singledestination.Sending a message from single or multiple sources tomultipledestinations.Proprietary Communications*: Use either PDU1 or PDU2 CAN be either Destination Specific or Broadcast Use proprietary PGNs* According to SAE J1939:“Where it is important to communicate proprietary information.” Duh! esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 22

SAE J1939 – Parameter Group NumberBroadcast Communication esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 23

SAE J1939 – Parameter Group NumberDestination Specific Communication esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 24

SAE J1939 – Source Address Source Address Last 8 bits of 29-Bit message identifier Source address Adress of transmitting ECU (node) A total of 254 addresses available Every address must be unique within the network ECUs cannot share addresses PGNs are independent of source address Every ECU is allowed to transmit any messageNote: The CAN standard in itself does not support node (ECU)addresses, only message IDs. esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 25

SAE J1939 – Message Types1. CommandOrdinary PGN – Supports both, PDU1 and PDU22. RequestSpecifically Assigned PGN (00EA00hex)PDU1 Only (Peer-to-Peer)Destination Address 255 Global Destination Address3. Broadcast/ResponseOrdinary PGN – Supports both, PDU1 and PDU24. AcknowledgementSpecifically Assigned PGN (00E800hex)PDU1 Only (Peer-to-Peer)Destination Address 255 Global Destination Address5. Group FunctionsSpecifically Assigned PGNsUsed for proprietary functions, network management and multi-packet functions. esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 26

SAE J1939 – Request MessageParameter Group NameRequestParameter Group Number59904 (00EA00hex)DefinitionRequests a Parameter Group from a single device or alldevices in the network.Transmission RateUser defined (no more than 2 to 3 times a second isrecommended)Data Length3 bytes (CAN DLC 3)Extended Data Page (R)0Data Page0PDU Format234PDU SpecificDestination Address (Global or Specific)Default Priority6Data DescriptionByte 1, 2, 3 Requested Parameter Group Number esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 27

SAE J1939 – Acknowledgement MessageParameter Group NameAcknowledgementParameter Group Number59392 (00E800hex)DefinitionProvides handshake between transmitting and respondingnodes.Transmission RateUpon reception of a command or request.Data Length8 bytes (as described in the following)Extended Data Page (R)0Data Page0PDU Format232PDU SpecificDestination Address (Global 255)Default Priority6Data DescriptionBytes 1 8 Positive Acknowledgement, NegativeAcknowledgement, Access Denied or Cannot Respond esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 28

SAE J1939 – Multi-Packet TransportSupports Peer-to-Peer and Broadcast esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 29

SAE J1939 – Broadcast Announce MessageBAM!In order to broadcast a multi-packet message a node must first send aBroadcast Announce Message (BAM). A BAM message contains thefollowing components: Parameter Group Number of the multi-packet messageSize of the multi-packet messageNumber of packagesThe Broadcast Announce Message (BAM) is embedded in the TransportProtocol – Connection Management (TP.CM) PGN 60416 and the actualdata transfer is handled by using the Data Transfer PGN 60160. esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 30

SAE J1939 – Transport ProtocolParameter GroupNameTransport Protocol – Connection Management (TP.CM)Parameter GroupNumber60416 (00EC00hex)DefinitionUsed for Communication Management flow-control (e.g.Broadcast Announce Message).Transmission RateAccording to the Parameter Group Number to be transferredData Length8 bytesExtended Data Page (R)0Data Page0PDU Format236PDU SpecificDestination Address ( 255 for broadcast)Default Priority7Data Description(For Broadcast Announce Message only)Byte1 - Control Byte 322,3 – Message Size (Number of bytes)4 – Total number of packages5 – Reserved (should be filled with FFhex)6-8 – Parameter Group Number of the multi-packet message(6 LSB, 8 MSB) esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 31

SAE J1939 – Transport ProtocolParameter GroupNameTransport Protocol – Data Transfer (TP.DT)Parameter GroupNumber60160 (00EB00hex)DefinitionData Transfer of Multi-Packet MessagesTransmission RateAccording to the Parameter Group Number to be transferredData Length8 bytesExtended Data Page (R)0Data Page0PDU Format235PDU SpecificDestination AddressDefault Priority7Data DescriptionByte1 – Sequence Number (1 to 255)2-8 - Data esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 32

SAE J1939 – Broadcast Data Transfer esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 33

SAE J1939 – Flow ControlTransport ProtocolConnection Management (TP.CM) – PGN 00EC00hexThe TP.CM Data can be: Connection Mode Request to Send – TP.CM RTS Connection Mode Clear To Send – TP.CM CTS End of Message Acknowledgement – TP.CM EndOfMsgACK Connection Abort – TP.Conn Abort esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 34

SAE J1939 – Network Management Network Management defined in SAE J1939/81Handles automatic allocation of node addresses (Plug & Play)per Address Claiming procedureAddress Claiming not supported per default in any other HLPJ1939 Network Management allows to identify ECUsand their primary function.Node monitoring is not defined in J1939– must be application specificJ1939 does not support Master/Slave or Client/Master- must be application specific esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 35

SAE J1939 – ECUs and CAs esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page36

SAE J1939 – Address and NAME SAE J1939 defines 64 bit NAME to uniquely identify each ECUEach ECU must hold at least one name and one address foridentification purposes ECU address defines the source or destination for messages ECU name indicates ECU main function performed at ECU address Function instance indicator used when multiple ECUs with same mainfunction share the same network esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 37

SAE J1939 – Address Claiming 64 bit NAME to uniquely identify nodes (ECUs)Necessitates unreasonable resources to maintain standardcommunicationsEach ECU utilizes an 8 bit address to identify the source of a messageor to access (destination address) another ECU in the networkAddress Claim Procedure: Designed to assign addresses to ECUs right after thenetwork startupAssuring that assigned address is unique to ECUSAE J1939 Standard defines Preferred Addresses to commonly useddevices in order to minimize the rate of multiple devices demanding thesame address esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 38

SAE J1939 – Preferred AddressesIndustry GroupPreferred Address RangeGlobal (Applies to all industry groups)0 – 84 Assigned85 – 127 Reserved248, 252 - 255 ReservedIndustry Group #1 – On-Highway Equipment128 – 160 Dynamic161 – 247 AssignedIndustry Group #2 – Agricultural and Forestry Equipment128 – 207 Dynamic208 – 247 ReservedIndustry Group #3 – Construction Equipment128 - 207 Dynamic208 – 247 ReservedIndustry Group #4 – Marine Equipment128 – 207 Dynamic208 – 247 ReservedIndustry Group #5 – Industrial, Process Control, StationaryEquipment128 – 207 Dynamic208 – 247 Reserved esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 39

SAE J1939 – Address ClaimingTwo possible scenarios:Sending an Address Claimed message (Standard) ECU sends Address Claimed message into the CAN busECUs receiving address claim will record & verify claimed address withinternal address tableIn case of address conflict ECU with lowest NAME value will succeedRemaining ECUs must claim different address or stop transmitting tonetworkRequest for Address Claimed message Necessary procedure for ECUs powering up late (e.g. trailers,diagnostics tools, etc.)Used to determine and claim available address or to find out whichECUs are currently on the network esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 40

SAE J1939 – Address ClaimingTwo possible address claimscenarios: esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 41

SAE J1939 – Address ClaimingNode A starts initialization and Power-On Self Test (POST) some timeahead of node B. While node B is going through initialization and POST, node A sendsout it address claim message. Node B, after having finished initialization and POST, attempts to claimthe same source address as node A In response node A, having determined that its NAME has higherpriority, resends the address claim message. Node B receives the address claim message, determines that node A’sname has higher priority. In the left scenario, node B sends a Cannot Claim message. In the rightscenario it claims another address by sending another Address Claimmessage. esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 42

SAE J1939 – Address ClaimingCAN Message Collision is possible! esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 43

SAE J1939 – Address Management MessagesMessagePGNPFPSSADataLengthDataRequest for AddressClaimed59904234DASA1)3 bytesPGN 60928Address Claimed60928238255SA8 bytesNAMECannot Claim SourceAddress609282382552548 bytesNAMECommanded Address65240254216SA92)NAME,SAnew1) In case no address has been claimed as of yet the source address could be set to 254.2) The commanded address, since it is longer than 8 bytes, is sent using the Transport Protocol as described in chapterTransport Protocol. esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 44

SAE J1939 – Network Topology ECUs in a J1939 network segment are connected by a single, linear,shielded twisted pair of wiresWiring topology of the network should be as straight as possible tominimize electrical reflections: Short stub lengths Avoiding complex network structures esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 45

SAE J1939 – Network Topology Each bus segment should be terminated by resistors, typically 120 Ω Termination resistors should always be on both ends of the bus Dividing network into sub-networks may be necessary(e.g. for truck and trailer)Segmentation requires bridges esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 46

J1939/13 Off-Board Diagnostic ConnectorJ1939/13 defines a standard connector fordiagnostic purpose.The connector is a Deutsch HD10 - 9 – 1939 (9pins, round connector). esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 47

J1939 Online Forumhttp://www.j1939forum.comJ1939Forum.com is the Online meeting place where to findadditional information on SAE J1939 and get help with issues relatedto SAE J1939. esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 48

LiteratureLiterature onController Area Network,CANopen and SAE J1939 esd electronics, Inc. 525 Bernardston Road Greenfield, MA 01301Page 49

SAE J1939 Standards Collection scheme is based on the . J1939-71 Vehicle Application Layer J1939-73 Application Layer - Diagnostics J1939-74 Application - Configurable Messaging J1939-75 Application Layer - Generator Sets and Industrial J1939-81 Network Management SAE J1939 Standards Collection