3.9. Motor Door Driver - MotDoorDrvr
Id |
MotDoorDrvr |
Title |
Motor Door Driver |
System |
Closure |
Document Type |
Application Software Component Specification Preview |
3.9.1. Overview
The Motor Door Driver component controls the movement of a motorized door. It processes inputs from hall sensors and current sensors to determine the door position and detect issues like jamming or pinching. The component drives the motor to open or close the door based on actuation requests.
3.9.2. Functions
Title |
Description |
|
|---|---|---|
1 |
Initialize |
Initializes the component, reads calibration data from non-volatile memory |
2 |
Process Inputs |
Reads and processes inputs from hall sensors, current sensors, and actuation requests |
3 |
Determine Door State |
Determines if the door is opened, closed, moving, jammed, etc. based on sensor data |
4 |
Control Motor |
Controls the motor to open or close the door based on the current state and actuation request |
5 |
Detect Faults |
Detects faults like jamming, pinching, overcurrent and takes appropriate actions |
6 |
Update Outputs |
Updates output signals with the current door state and faults |
3.9.3. Ports
Id |
Direction |
Data Type |
Dimensions |
Unit |
|
|---|---|---|---|---|---|
1 |
DoorActuateReq |
Incoming |
Enum: VtSig_MotorReq_t |
[-1] |
inherit |
2 |
DoorActuateReq_valid |
Incoming |
boolean |
[-1] |
inherit |
3 |
HallSensorSpeed |
Incoming |
single |
[-1] |
inherit |
4 |
model_curent |
Incoming |
inherit |
[-1] |
inherit |
5 |
testing_with_model |
Incoming |
boolean |
[-1] |
inherit |
6 |
SenseClosedDoor |
Incoming |
Enum: VtSig_DoorOpenStatus_t |
[-1] |
inherit |
7 |
SenseClosedDoor_valid |
Incoming |
boolean |
[-1] |
inherit |
8 |
FRAM_PosPercentIn |
Incoming |
uint8 |
[-1] |
inherit |
9 |
FRAM_PosPercentIn_valid |
Incoming |
boolean |
[-1] |
inherit |
10 |
FRAM_DoorRangeIn |
Incoming |
int32 |
[-1] |
inherit |
11 |
FRAM_DoorRangeIn_valid |
Incoming |
boolean |
[-1] |
inherit |
12 |
HallSensorCounter |
Incoming |
int32 |
[-1] |
inherit |
13 |
HallSensorCounter_valid |
Incoming |
boolean |
[-1] |
inherit |
14 |
Door_State |
Outgoing |
Enum: VtSig_MotorStatus_t |
[-1] |
inherit |
15 |
Door_State_send |
Outgoing |
boolean |
[-1] |
inherit |
16 |
BridgeCmd |
Outgoing |
Enum: bridge_mode_t |
[-1] |
inherit |
17 |
BridgeDuty |
Outgoing |
uint8 |
[-1] |
inherit |
18 |
dbg_DoorSpeedFrame |
Outgoing |
Bus: CAN_RollerShutterSpeed_t |
[-1] |
inherit |
19 |
dbg_DoorSpeedFrame_send |
Outgoing |
boolean |
[-1] |
inherit |
20 |
dbg_DoorState |
Outgoing |
Bus: CAN_RollerShutterState_t |
[-1] |
inherit |
21 |
dbg_DoorState_send |
Outgoing |
boolean |
[-1] |
inherit |
22 |
FRAM_PosPercentOut |
Outgoing |
uint8 |
[-1] |
inherit |
23 |
FRAM_PosPercentOut_send |
Outgoing |
boolean |
[-1] |
inherit |
24 |
FRAM_DoorRangeOut |
Outgoing |
int32 |
[-1] |
inherit |
25 |
FRAM_DoorRangeOut_send |
Outgoing |
boolean |
[-1] |
inherit |
26 |
PositionPercent |
Outgoing |
uint8 |
[-1] |
inherit |
27 |
PositionPercent_send |
Outgoing |
boolean |
[-1] |
inherit |
3.9.4. Parameters
Id |
Data Type |
Dimensions |
Range |
Unit |
Description |
|
|---|---|---|---|---|---|---|
1 |
MotDoorDrvr_AntiPinchCurrentThreshold |
single |
[1,1] |
Min: 0, Max: 30 |
A |
The system shall trigger anti-pinch response if the window motor current exceeds threshold |
2 |
MotDoorDrvr_AntiPinchDetectionTime |
single |
[1,1] |
Min: 0, Max: 10 |
sec |
Delay for trigger window anti-pinch response |
3 |
MotDoorDrvr_CalibrationType |
uint8 |
[1,1] |
Min: 0, Max: 5 |
0 - ticks based calibration , 1- timer based calibration , 2 - overccurent based calibration |
|
4 |
MotDoorDrvr_DownTuneParam |
single |
[1,1] |
Min: 0, Max: 100 |
Tunable param for going down calibration |
|
5 |
MotDoorDrvr_LowerLevelCalc |
uint8 |
[1,1] |
Min: 0, Max: 100 |
% |
size of end stop lower tolerance (of window movement) |
6 |
MotDoorDrvr_PinchAndStallDetectionOn |
boolean |
[1,1] |
Min: 0, Max: 1 |
1 - use separated Pinch and Stall detection 0 - skip calibration |
|
7 |
MotDoorDrvr_UpTuneParam |
single |
[1,1] |
Min: 0, Max: 100 |
Tunable param for going down calibration |
|
8 |
MotDoorDrvr_UpperLevelCalc |
uint8 |
[1,1] |
Min: 0, Max: 100 |
% |
Level above which window will be considered closed |
9 |
MotDoorDrvr_WindowMotorOverCurrentDetectionTime |
single |
[1,1] |
Min: 0, Max: 10 |
sec |
Delay for trigger window motor fault response |
10 |
MotDoorDrvr_WindowMotorOverCurrentThreshold |
single |
[1,1] |
Min: 0, Max: 30 |
A |
The system shall stop the window and trigger a fault if the motor current exceeds threshold |
11 |
MotorizedDoorDrv_ActuationTimeout |
single |
[1,1] |
Min: 0, Max: 1 |
sec |
time delay to actuate Motor when received actuation request |
12 |
MotorizedDoorDrv_BridgeDutyClosing |
single |
[1,1] |
Min: 0, Max: 100 |
% |
Nominal bridge duty for roller shutter motor control for closing |
13 |
MotorizedDoorDrv_BridgeDutyMax |
single |
[1,1] |
Min: 0, Max: 100 |
% |
Max bridge duty for roller shutter motor control |
14 |
MotorizedDoorDrv_BridgeDutyOpening |
single |
[1,1] |
Min: 0, Max: 100 |
% |
Nominal bridge duty for roller shutter motor control for opening |
15 |
MotorizedDoorDrv_BridgeFreq |
single |
[1,1] |
Min: 0, Max: 1000 |
Hz |
Set bridge frequency |
16 |
MotorizedDoorDrv_CalibrationSpeed |
single |
[1,1] |
Min: -10, Max: 10 |
m/s |
If not a zero, then this param will override low speed SP for calibration |
17 |
MotorizedDoorDrv_CheckHWFault |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - do not check 1 - check HWFault pin diagnostic state |
|
18 |
MotorizedDoorDrv_ClbStuckDelay |
single |
[1,1] |
Min: 0, Max: 3000 |
sec |
Time delay to transit during calibration if it is stucked |
19 |
MotorizedDoorDrv_EnableDBGmessage |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - not use 1 - enable debug message |
|
20 |
MotorizedDoorDrv_EndStopOverCurrDown |
single |
[1,1] |
Min: 0, Max: 30 |
A |
Overcurrent threshold for EndStop window Down calibration |
21 |
MotorizedDoorDrv_EndStopOverCurrUp |
single |
[1,1] |
Min: 0, Max: 30 |
A |
Overcurrent threshold for EndStop window Up calibration |
22 |
MotorizedDoorDrv_FeedbackTimeout |
single |
[1,1] |
Min: 0, Max: 10 |
sec |
Delay valid HallSensor signal |
23 |
MotorizedDoorDrv_InvertHS_V |
boolean |
[1,1] |
Min: 0, Max: 1 |
If UseQEncoder is true, this setting will invert hall sensor readings (sign) |
|
24 |
MotorizedDoorDrv_InvertMotorCmds |
boolean |
[1,1] |
Min: 0, Max: 1 |
1 - inverted forward/reverse command to motor |
|
25 |
MotorizedDoorDrv_JammedConditions |
boolean |
[1,6] |
Min: 0, Max: 1 |
index 1 - jammed hall sensor , index 2 - threshold overcurrent , index 3 - diag overcurrent , index 4 - diag HW Fault , index 5 - pinch detection ,index 6 stall detection |
|
26 |
MotorizedDoorDrv_JammedDelay |
single |
[1,1] |
Min: 0, Max: 10 |
sec |
Delay for hall sensor jamming detection |
27 |
MotorizedDoorDrv_KD |
single |
[1,1] |
Min: , Max: |
diff gain for regulator |
|
28 |
MotorizedDoorDrv_KI |
single |
[1,1] |
Min: , Max: |
integral gain for regulator |
|
29 |
MotorizedDoorDrv_KN |
single |
[1,1] |
Min: , Max: |
N coefficient for regulator |
|
30 |
MotorizedDoorDrv_KP_Closing |
single |
[1,1] |
Min: , Max: |
proportional gain for regulator during closing |
|
31 |
MotorizedDoorDrv_KP_Opening |
single |
[1,1] |
Min: , Max: |
proportional gain for regulator during opening |
|
32 |
MotorizedDoorDrv_K_Slowdown |
single |
[1,1] |
Min: 0, Max: 1 |
Door speed reduction near endpoints |
|
33 |
MotorizedDoorDrv_LinearDoorRange |
single |
[1,1] |
Min: 0.01, Max: 100 |
m |
Linear distance that door travels between endpoints |
34 |
MotorizedDoorDrv_ManualCtrl |
uint8 |
[1,1] |
Min: 0, Max: 4 |
manual target position control 0-from controller, 1-stop, 2-open, 3-close, 4 - calibration |
|
35 |
MotorizedDoorDrv_MovingDownCalibrDelay |
single |
[1,1] |
Min: 0, Max: 60 |
sec |
Delay for window down calibration |
36 |
MotorizedDoorDrv_MovingUpCalibrDelay |
single |
[1,1] |
Min: 0, Max: 60 |
sec |
Delay for window up calibration |
37 |
MotorizedDoorDrv_OverCurrentCalibrDelayCommon |
single |
[1,1] |
Min: 0, Max: 10 |
sec |
Common Overrcurrent timout for calibration |
38 |
MotorizedDoorDrv_OverCurrentDelay |
single |
[1,1] |
Min: 0, Max: 60 |
sec |
Delay for overcurrent detection |
39 |
MotorizedDoorDrv_OverCurrentLim |
single |
[1,1] |
Min: 0, Max: 100 |
A |
Overcurrent limit |
40 |
MotorizedDoorDrv_OverCurrentLimDTC |
single |
[1,1] |
Min: 0, Max: 100 |
Overcurrent limit for DTC |
|
41 |
MotorizedDoorDrv_PWMDutyClosing |
uint8 |
[1,41] |
Min: 0, Max: 100 |
Motor bridge PWM duty for closing |
|
42 |
MotorizedDoorDrv_PWMDutyClosingMin |
single |
[1,1] |
Min: 0, Max: 100 |
% |
min motor bridge PWM duty for closing with PID |
43 |
MotorizedDoorDrv_PWMDutyOpening |
uint8 |
[1,41] |
Min: 0, Max: 100 |
Motor bridge PWM duty for opening |
|
44 |
MotorizedDoorDrv_PWMDutyOpeningMin |
single |
[1,1] |
Min: 0, Max: 100 |
% |
min motor bridge PWM duty for opening with PID |
45 |
MotorizedDoorDrv_Percent |
single |
[1,41] |
Min: 0, Max: 100 |
% |
Percent Table |
46 |
MotorizedDoorDrv_SlowdownPosition |
single |
[1,1] |
Min: 0, Max: 100 |
% |
Door linear position, at which door’s speed will be reduced |
47 |
MotorizedDoorDrv_StartCurrent |
single |
[1,1] |
Min: 0, Max: 100 |
A |
Minimum current above which system detects motor rotation |
48 |
MotorizedDoorDrv_TargetOperationTime |
single |
[1,1] |
Min: 0.1, Max: 100 |
sec |
Time constraints to open/close door at normal conditions |
49 |
MotorizedDoorDrv_TimeForRollBack |
single |
[1,1] |
Min: 0, Max: 5 |
sec |
Time for Roll back after jamming |
50 |
MotorizedDoorDrv_UseQEncoder |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - not use 1 - for working with hall sens driver in QEncoder mode |
|
51 |
MotorizedDoorDrv_UseWakeupCause |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - do not check 1 - check Wakeup Cause |
|
52 |
MotorizedDoorDrv_WaitAfterLoading |
single |
[1,1] |
Min: 0, Max: 60 |
sec |
Delay by time for loading parameters from Flash |
53 |
MotorizedDoorDrv_WaitFullCloseTime |
single |
[1,1] |
Min: 0, Max: 3000 |
sec |
Delay by time after which system consider that roller shutter is closed |
54 |
MotorizedDoorDrv_WaitFullOpenTime |
single |
[1,1] |
Min: 0, Max: 3000 |
sec |
Delay by time after which system consider that roller shutter is opened |
55 |
MotorizedDoorDrv_WheelRadius_max |
single |
[1,1] |
Min: 0, Max: 100 |
sm |
Minimum motor wheel raduis, santimeters |
56 |
MotorizedDoorDrv_WheelRadius_min |
single |
[1,1] |
Min: 0, Max: 100 |
sm |
Minimum motor wheel raduis, santimeters |
57 |
MotorizedDoorDrv_useDoorClosedSens |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - not used 1 - used additional sensor |
|
58 |
MotorizedDoorDrv_useFlashStatus |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - not use 1 - use FlashStatus |
|
59 |
MotorizedDoorDrv_useHallSensJammed |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - not used 1 - used hall sensor for jamming determain |
|
60 |
MotorizedDoorDrv_usePID |
boolean |
[1,1] |
Min: 0, Max: 1 |
0 - used PWM table 1 - used PID with speed table |