当前位置:网站首页>[UDS unified diagnostic service] IV. typical diagnostic service (6) - input / output control unit (0x2F)

[UDS unified diagnostic service] IV. typical diagnostic service (6) - input / output control unit (0x2F)

2022-04-23 17:57:00 Tomorrow is like noon

Four 、 Diagnose typical services (6)— Input / output control unit (0x2F)

I summarized a table myself , Free download , Corresponding learning , better !
link :https://download.csdn.net/download/sinat_40003796/85031818

Diagnostic service of each functional unit :

  • Diagnosis and communication management function unit
  • Data transmission function unit
  • Read fault information function unit ( Storage data transmission function unit )
  • Online programming function unit ( Upload and download function unit )
  • function / Component test function unit ( Routine function unit )
  • Input / output control unit (0x2F)

This article mainly explains “ Input / output control unit (0x2F)”, For the rest, see other articles .

————————————————————

InputOutputControlByIdentifier (0x2F) and RoutineControl (0x31) The purpose and usage of these two diagnostic services are somewhat similar , All are call ECU Some predefined operation sequences inside , So we Control from the outside by means of diagnosis ECU The interface of .

InputOutputControlByIdentifier (0x2F) service

ECU Simply put, it's a pair of input (sensor) Calculate and then generate output (actuator) The system of .2F This service is right ECU Control the input and output of . This service will need to be used on the production line , such as , In the final assembly stage , Workers need to verify whether various functions on the vehicle are normal , For example, whether the lifting of four windows is normal , If you press one switch after another , That's inefficient , If you can observe the window lifting through a diagnostic command , Efficiency is much higher .

 Insert picture description here
such as ,ECU Receive an input signal A, We can use it 2F Here it is A Give us the value we need ;ECU For an actuator B Control , We can use it 2F The service is coupled with some specific parameters to realize the B The control of , For example, door control can lift and lower the window 、 Control of rearview mirror folding, etc .

 Insert picture description here

2F Service request from 4 Part of it is made up of :

  • SID, service ID
  • dataIdentifier, Used to identify controlled IO object
  • controlOptionRecord, Used to identify the control mode , For example, start 、 Stop controlling , You can also have some user-defined parameters for more accurate control , For example, how long does the action of an actuator last .
    controlOptionRecord It's divided into two parts , Namely 1 individual byte Of inputOutputControlParameter, And a number of byte Customized by the manufacturer controlState.
  • controlEnableMaskRecord, This is an optional parameter , Used to identify controlOptionRecord Which of the parameter By using .

UDS Four types of... Are clearly defined inputOutputControlParameter:

  • 0x00 returnControlToECU ( Give control back to ECU, That is, end control )
  • 0x01 resetToDefault ( take dataIdentifier Referenced input signal 、 Internal parameters 、 Set the output signal as the default value )
  • 0x02 freezeCurrentState( take dataIdentifier Referenced input signal 、 Internal parameters 、 The output signal is frozen )
  • 0x03 shortTermAdjustment ( take dataIdentifier Referenced input signal 、 Internal parameters 、 Set the output signal , In fact, it is equivalent to the beginning of ECU The control of )

in addition ,UDS Definition It can be used 22 Service read 2F Used in services dataIdentifier, The return value is the status information , What is the specific status information , User defined .

14229 Take an example to feel 2F service :

This example uses 2F control Air Inlet Door Position ( Air inlet door position ), With the identifier 0x9B00 To identify the position of the air inlet door .Air Inlet Door Position [%] = decimal(Hex) * 1 [%] , That is, this position is expressed as a percentage .

step1:
tester send out 22 9B 00 Read the current position of the air inlet door ECU return 62 9B 00 0A , 0x0A = 10(dec), Indicates that the current position is 10%

step2:
tester send out 2F 9B 00 03 3C , It means to adjust the position of the air inlet door to 60%,0x3C = 60(dec)ECU return 6F 9B 00 03 0C, Indicates acceptance of control , The current position of the air inlet door is 12%. because ECU Respond immediately after receiving the request , And it takes time to adjust the position of the door , So it hasn't reached 60%.

step3:
After a while tester send out 22 9B 00 Read the current position of the air inlet door ECU return 62 9B 00 3C , 0x3C = 60(dec), Indicates that the current position has arrived 60%

step4:
tester send out 2F 9B 00 00, Give control back to ECUECU return 6F 9B 00 00 3A, Accept the request , The current position is 58%

step5:
tester send out 2F 9B 00 02, frozen 9B 00 This ID The position of the air inlet door represented by this state ECU return 6F 9B 00 02 32, Accept the request , The current position remains at 50%

版权声明
本文为[Tomorrow is like noon]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546376503.html