Professional Documents
Culture Documents
Sunroof
System and function overview
›This collection is addressed for students who are attending Software Testing
course and want to understand the process of creating and perform tests based on
system requirements.
Sunroofs may be manually operated or motor driven and are available in many shapes, sizes and
styles.
Roof with 1 motor: Glass Panel as moving element or Sun Blind as moving element (canvas).
Roof with 2 motors: Glass and Sun Blind as moving elements;
The user can control the sun roof via Switch and Remote(LIN):
Switch (5 states switch):
Remote Control(LIN):
Car key: Open or Close the Sun Roof with the car key
Voice control: Open or Close the Sun Roof with voice commands
Air handling: Close(if Open or Intermediary Open) the Sun Roof when Air Circulation is
on
User interface movements are executed according with customer description(State machine):
Function Description
Reference field Recorded force profile of mechanical system during initialization. When expected
force level is exceeded, a pinch event is detected and motor is doing a reverse.
Reference position Refers to the known 0 position which usually is the closing mechanical block.
Motor position is known and calculated referring to the position 0.
Position counting Hall sensor position counting (2 Hall system) -> detect changes in position;
conversion to absolute position
Stall / Block detection No Hall pulses in one direction for a certain time (see e.g. below for close
movements)
*Mechanical limits
Authorization Used to inhibit start/ongoing roof movement, except special
movements(reversal);
Can be: Hardware or LIN/CAN
Sleep mode ECU goes in low power mode to reduce current consumption
Test_ ReInitialization: RP and RF valid DefaultSettings() 1. Press FrontSwitch SACkp 1. No movement is started
02 and GP and SB in Close SetMotorPosition(GP, GPClose)
position SetMotorPosition(SB, SBClose) 2. Wait(reInitSwTimer) 2. GP movement is started to Close Block, RP is
learned and relaxes to Close position
SB movement is started to Close Block, RP is
learned and relaxes to Close position
3. Release FrontSwitch SACkp 3. No movement is started
within SwReleaseTimer
4. GP and SB movements are started towards
4. Press FrontSwitch SACkp again Open and stops in Open position
within InitTimer After Open position is reached, GP and SB
movements are started towards Close and stops
in Close position
5. RP and RF valid for GP and SB
5. Check RP and RF for GP and SB
Test_ Initialization: Procedure DefaultSettings() 1. Press FrontSwitch SACkp 1. a. GP movement is started to Close Block, RP is
04 interrupted by SetMotorPosition(GP, GPClose) learned and relaxes to Close position
SetEnableRoof(OFF) SetMotorPosition(SB, SBClose) b. SB movement is started to Close Block, RP is
SetRp(GP, invalid) learned and relaxes to Close position
SetRf(GP, invalid)
SetRp(SB, invalid) 2. Release FrontSwitch 2. No movement is started
SetRf(SB, invalid) SACkp within
SwReleaseTimer
3. GP and SB movements are started towards Open
3. Press FrontSwitch SACkp
again within InitTimer
4. GP and SB movements are interrupted
4. During movement in
Open, SetEnableRoof(OFF) 5. No movement is started
5. SetEnableRoof(ON) 6. RP is valid and RF invalid
6. Release FrontSwitch
SACkp and check RP and RF
1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd
GP - - - - -
Tilt
SB - - - - -
E.g.: Preconditions: - GP(Glass Panel) and SB(Sun Blind) Closed * 1 – first position target reached
st
GP - - - - - - -
Close
SB - - - - - - -
GP Close - Close - Close Close Close
~
SB - - - - - - -
Glass T11
Panel at GP Close Close Close Close Close
Tilt
moveme
SB - - - - -
nt start
GP - - - - -
~
SB - - - - -
GP - - - - -
Open
SB - - - - -
Test_10 User Interface: Tilt DefaultSettings() Press FrontSwitch Tilt SB movement is started towards Tilt and stops
request when GP and SetMotorPosition(GP, in Tilt position
SB in Close position GPClose) After Tilt position is reached by SB, GP
SetMotorPosition(SB, SBClose) movement is started towards Tilt and stops in
Tilt position
Test_11 User Interface: Tilt DefaultSettings() Press FrontSwitch Tilt GP movement is started towards Close and
request when GP and SetMotorPosition(GP, GPTilt) stops in Close position
SB in Tilt position SetMotorPosition(SB,
SBIntermediary)
Test_05 User Interface: DefaultSettings() Press FrontSwitch SAO GP movement is started automatically
Automatic Open SetMotorPosition(GP, towards Open and stops in Open position
request when GP GPClose)
and SB in Close SetMotorPosition(SB,
position SBClose)
Test_06 User Interface: DefaultSettings() Press FrontSwitch SAC GP movement is started automatically
Automatic Close SetMotorPosition(GP, towards Close and stops in Close position
request when GP in GPIntermediary)
Intermediary Area SetMotorPosition(SB,
and SB in Open SBOpen)
position
Test_07 User Interface: DefaultSettings() Press FrontSwitch SAC SB movement is started towards Close
Automatic Close SetMotorPosition(GP, automatically and stops in Close position
request when SB in GPClose)
Intermediary Area SetMotorPosition(SB,
and GP in Close Intermediary)
position
GP - Open - Open Open Open Open GP Close Close - Close Close Close
~ ~
SB Tilt OPen Tilt Open Open Open - SB - - Close Close Close Close
Glass Glass
Panel at GP - Open - Open Open Open Open Panel at GP Close Close - Close Close Close
Tilt Tilt
movement movement
SB Tilt OPen Tilt Open Open Open - SB - - Close Close Close Close
start start
GP - Open - Open Open Open Open GP Close Close - Tilt Close Tilt Close Tilt Close
~ ~
SB Tilt OPen Tilt Open Open Open - SB - - Close - Close Tilt Close Tilt Close
Test_08 User Interface: DefaultSettings() Press FrontSwitch SQO SB movement is started towards Open.
Quick Open SetMotorPosition(GP, GPClose) When SB reaches the Tilt position, GP
request when GP SetMotorPosition(SB, SBClose) movement is started towards Open, also.
and SB in Close Both motors moves to Open afterwads and
position stops in Open position
Test_09 User Interface: DefaultSettings() Press FrontSwitch SQC SB and GP movements are started towards Tilt.
Quick Close SetMotorPosition(GP, When GP reaches the Tilt position, stops and
request when GP GPIntermediary) wait for SB motor.
in Intermediary SetMotorPosition(SB, SBOpen) After SB reaches the Tilt position, both motors
Area and SB in moves to Close afterwads and stops in Close
Open position position
› In case of a block / pinch event during a movement, the movement should stop and
reverse for reversal distance:
› Block during Close movements:
* x - position where block is performed:
Close ≤ x < Tilt -> movement reverse to Tilt
Tilt ≤ x ≤ Open -> movement reverse to Open
› Block during Open movements:
* x - position where block is performed:
Close ≤ x < Tilt -> relax for relax distance towards Close direction
Tilt ≤ x ≤ Open -> relax for relax distance towards Tilt direction
Test_ Block/Pinch Events: Block event DefaultSettings() 1. Press FrontSwitch SAC 1. GP movement is started towards Close direction
13 during Close movement in SetMotorPosition(GP,
Intermediary Area on GP GPIntermediary) 2. During movement, 2. When Block is performed, GP stops and reverse to
SetMotorPosition(SB, SBOpen) SetBlockClose(GP, Open position
IntermediaryArea)
Test_ Block/Pinch Events: Block event DefaultSettings() 1. Press FrontSwitch SAO 1. SB movement is started towards Open direction
14 during Open movement in SetMotorPosition(GP, GPClose)
Intermediary Area on SB SetMotorPosition(SB, SBClose) 2. During movement, 2. When Block is performed, GP stops and relaxes to
SetBlockOpen(GP, Close position for Relax distance
IntermediaryArea)
Test_ Block/Pinch Events: Override DefaultSettings() 1. Press FrontSwitch SAC 1. GP movement is started towards Close direction
15 Anti-pinch function - only SetMotorPosition(GP, GPOpen)
manual movement allowed SetMotorPosition(SB, SBOpen) 2. During movement, 2. When Block is performed, GP stops and reverse to
during override mode SetBlockClose(GP, Open position
IntermediaryArea)
3. GP movement is started towards Close direction
3. Press FrontSwitch SACkp,
within IcebreakerTimer 4. GP movement is stopped
4. Release FrontSwitch SACkp 5. GP movement is started towards Close direction and
stops in Close position
5. Press FrontSwitch SAC
Test_ Stuck switch: Stuck Switch for DefaultSettings() 1. Press FrontSwitch SACkp 1. GP movement is started towards Close and stops
16 Auto Close for GP -> Err SetMotorPosition(GP, GPOpen) when StuckSwTime is exceeded
published on LIN SetMotorPosition(SB, SBOpen)
SetParameter(GP, StuckSw, 2. 2. LIN_MotorError: SwitchErr
StuckSwTime) CheckMotorError(GP,Switch
Err) on LIN
Test_ Stuck switch: Stuck Switch for DefaultSettings() 1. Press FrontSwitch SQOkp 1. GP movement is started towards Open and stops
17 Quick Open for GP -> Err SetMotorPosition(GP, GPClose) when StuckSwTime is exceeded
published on LIN SetMotorPosition(SB, SBOpen)
SetParameter(GP, StuckSw, 2. 2. LIN_MotorError: SwitchErr
StuckSwTime) CheckMotorError(GP,Switch
Err) on LIN
Test_ Stuck switch: Other request DefaultSettings() 1. Press FrontSwitch SAOkp 1. GP movement is started towards Open and stops
18 during Stuck Switch Err for GP SetMotorPosition(GP, GPClose) when StuckSwTime is exceeded
SetMotorPosition(SB, SBOpen)
SetParameter(GP, StuckSw, 2. Press FrontSwitch SACkp 2. No movement is started
StuckSwTime)
Test_ Air handling[LIN]: Auto Close DefaultSettings() SetAirHandling(AutoClose) GP movement is started towards Close and stops in
20 request when GP in Tilt Area SetMotorPosition(GP, GPTiltArea) Close position
and SB in Open position SetMotorPosition(SB, SBOpen)
Test_ Air handling[LIN]: Auto Close DefaultSettings() SetAirHandling(AutoClose) GP movement is started towards Close and stops in
21 request when GP and SB in SetMotorPosition(GP, GPOpen) Close position
Open position SetMotorPosition(SB, SBOpen)