The application layer of SAEJ1939 provides a method for the application process to access the OSI environment, mainly including management functions and general useful mechanisms to support the application. It first specifically describes the common rules that the application layer needs to abide by, including message format, ISO Latin alphabet set, parameter value range, parameter value range definition, parameter grouping principle, transmission repetition rate and engine parameter naming rules. Then the core content of the specific description of the application layer is the definition of various parameters and parameter groups in the vehicle system.
In SAEJ1939, parameters are used to describe a specific physical quantity. These descriptions include data length, data type, resolution, data range and label for reference. Each specific parameter is assigned a unique label known as the suspect parameter number (SPN).
For each parameter, its data type should be determined. The type of data can be either a state or a measurement. The state type represents the current state of a multi-state parameter, or the result of the operation performed by the transit node. This operation is the result of calculations based on local and/or network “measurement” and/or “status” information. It should be noted that this operation does not require specific confirmation information.
For example, the status data indicates that a solenoid has been activated, but it does not need to be tested to confirm that the solenoid has fulfilled its function. The data for the state types are as follows: engine brakes engaged, power take off (PTO) speed control in operation, cruise control in operation, cruise control in the “SET” operating state (relative to when the “SET” switch contact is closed). measurement value), fault code, torque/speed control proxy mode, ideal speed/speed limit, engine torque mode, ideal engine running speed and asymmetry adjustment of engine running speed, etc.
The measured value type data represents the current value obtained by the transmitting node after measuring a certain parameter, so that the state of the defined parameter can be determined. The data belonging to the type of measurement values are as follows: intake air pressure, ignition on/off, cruise setting switch on, maximum cruise speed, cruise setting speed, engine speed and load percentage at current speed, etc.
A parameter group is a collection of parameters conveyed in the same SAEJ1939 message. The definition of parameter group includes refresh cycle, data length, default priority, parameter group number, parameter table, etc. Parameter groups may include commands, data, requests, replies, and reject replies, among others. Parameter groups are considered data, whether in a single-packet message or in a multi-group message. Because the parameter group does not have to contain the source address, any device can send out the parameter group. Each specific parameter group is assigned a unique parameter group number, namely PGN.
Typically, parameters are organized into parameter groups according to the following guidelines:
(1) By function (gasoline, coolant, fuel, etc.) and not by type (temperature, pressure, speed, etc.).
(2) It has a similar update speed (in order to reduce unnecessary system overhead).
(3) According to the general subsystem (equipment for measuring and transmitting data).
1) Definition of the range of parameter values
The definition of the range of parameter values is specified in the common rules of the SAEJ1939 application layer. Parameters can be divided into continuous parameters in bytes and discrete parameters in bits.
(1) Continuous parameters in bytes. Signals with bytes as the minimum length unit can be divided into single-byte, double-byte, 4-byte and ASCII data types, as shown in Table 1.
A value in the “Error Indication” range indicates that no valid parameter data is available due to some type of error in a sensor, subsystem or function block. A value in the range of “not available” indicates that the message transmitted by the module contains a parameter that is not available or supported in that module. Values in the “not requestable” range provide a means for the device to transmit command messages and identify parameters that do not require a response from the receiving device.
The attributes of continuous parameters generally include: ① data length: ② resolution (the size and unit of the actual value represented by a numerical value in one dimension): ③ the valid value range of the parameter; ④ offset; ⑤ parameter type (measurement parameter or state parameter).
In order to maintain the consistency of data definition, SAEJ1939 recommends using SLOT [scaling, limit, offset, transfer] to define existing continuous parameters and future continuous parameters that need to be added. type parameters, as shown in Table 2.
Each SLOT provides a numerical range and resolution suitable for most parameters in a given type. If desired, a different scale factor or offset can be used. All SLOTs should be scaled by another SLOT to the power of 2.
This reduces the math required for internal scaling conversions and the chance of misinterpreting values.
The offset should be properly selected according to the following two points: ① offset = 0; ② offset = 50% (equal to the range of soil values). The actual value of the parameter – offset + resolution × parameter value. For example, the actual value of temperature=(-40+1)℃/b×parameter value.
(2) Discrete parameters with bits as length unit. Discrete parameters include two types of measurement parameters and state parameters, as shown in Table 3. Measurement-type discrete parameters represent the state through measurement and observation, such as whether the engine is currently ignited, whether the cruise setting switch is turned on, etc. The state-type discrete parameter indicates that a certain state with a polymorphic signal is changed by an operation, or a command is issued to change the state, but this operation does not require specific confirmation information, such as the engine brake is activated.
2) Definition of parameters
The definition of parameters adopts the situation definition of text description and attribute template. Parameters are identified by a unique SPN. The definitions of continuous parameters and discrete parameters are as follows.
(1) Definition of continuous parameters. The general form of continuous parameter definition is shown in Table 4.
Example The percentage of actual output torque of the engine (Table 5), which refers to the output torque calculated by the engine. This data is transmitted in the indicated torque as a percentage of the reference engine torque. The engine (output) torque percentage value cannot be less than zero and includes the torque required to overcome friction in the cylinder.
3) Parameter group definition
The parameter group is identified by a unique PGN. The definition of the parameter group includes the following contents: transmission cycle, data length, data page (DP), PDU format (PF), PDU specific field (PS), default priority (P), parameter group Number (PGN) data field content definition, etc.
Read more: The basics of hybrid cars