PSM Arithmetic, Example Of PSM Function - GF54.21-D-3055-01TSC
Model 907
with code ED5 (Parameterisable special module)
Speed signal, differentiation, integration
Vehicle speed signal function blocks
The vehicle speed signal (interior CAN (CAN B): "VehSpd_Disp") can be output at one of the pulse-width-modulation-compatible outputs.
Formula: Pulses [1/s] = (vehicle speed [km/h] * 4 [Pulses/m])/3.6
| Value range for vehicle speed | 4 to 409.4 km/h |
| Value range of pulse width modulated signal | 0...100 % |
| Pulse length | 200 Hz |
4 pulses/m are output. The pulse width is 4 ms.
At 112.5 km/h, the pulse duration is the same as the pulse pause. This 1:1 ratio is maintained up to higher speeds.
In other words, at higher speeds the pulse length and pause length shorten at the same time.
The vehicle speed signal is implemented via the blocks of the programmable logic controller (PLC), arithmetic unit and multifunction output blocks. The picture shows the simplified function block operation.
The configuration is available in the tables.
Function description of implementation
Comparator 2, calculation step 1 (Comp 2):
- Limit the valid value range of the input signal from 0 to 4094 (0 to 409.4 km/h). Values above 4094 are set to 0.
Calculation block 3, calculation step 2 (Calc 3):
- Multiply input signal by number of pulses/m.
Calculation block 4, calculation step 3 (Calc 4):
- Conversion of number of pulses to cycle duration
Calculation block 5, calculation step 4 (Calc 5):
- Calculate pulse duration from cycle duration.
PLC Gil threshold switch (S):
- Define ranges of cycle duration.
- 0 to 800: A = 1
- 801 to 22 727: B = 1
- 22 727: C = 1
PLC G12 value table i (WTI):
- Depending on result of threshold switch
- A = 1 → Duty cycle = 50% of cycle duration (result of arithmetic block 5, calculation step 4)
- B = 1 → Duty cycle = constant (4 ms)
- C = 1 → Duty cycle = 0; pulse width modulation (PWM) is shut off.
Multifunction output block (MFA 6):
The cycle duration and pulse duration are output depending on the input signal.
Signal identification number = Signal ID.
The signal IDs are notated in hexadecimal form.
| Input | Signal name | Signal ID | Comparison assignment |
|---|---|---|---|
| Compare_2_a | Out_AU_Const_3 | 0x8042 | Input a (a) > Input b (b) |
| Compare_2_b | VehSpd_Disp | 0x3023 | |
| Compare_2_c | VehSpd_Disp | 0x3023 | |
| Compare_2_d | Const_Bit_0 | 0x1000 |
| Input | Signal name | Signal ID | Upper limit value | Lower limit value |
|---|---|---|---|---|
| Calc_3_a | Out_AU_Compare_2 | 0x8025 | 16 376 | 0 |
| Calc_3_m1 | Out_AU_Const_4 | 0x8043 | ||
| Calc 3 m2 | Const Bit 1 | 0x1001 | ||
| Calc_3_b | Const_Bit_0 | 0x1000 |
| Input | Signal name | Signal ID | Upper limit value | Lower limit value |
|---|---|---|---|---|
| Calc 4 a | Out AU Const 5 | 0x8044 | 3 600 000 | 0 |
| Calc_4_m1 | Const_Bit_1 | 0x1001 | ||
| Calc_4_m2 | Out_AU_Calc_3 | 0x8002 | ||
| Calc 4 b | Const Bit 0 | 0x1000 |
| Input | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13 | F14 | F15 | F16 | Signal name | Signal ID | Mode | Sequential point (1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SS1 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Out_AU_Calc_4 | 0x8003 | Threshold A | 0 |
| Threshold B | 800 | |||||||||||||||||||
| Threshold C | 22 727 | |||||||||||||||||||
| Threshold D | 65 535 | |||||||||||||||||||
| Input | Signal name | Signal ID | Upper limit value | Lower limit value |
|---|---|---|---|---|
| Calc_5_a | Out_AU_Calc_4 | 0x8003 | 400 | 0 |
| Calc 5 m1 | Const Bit 1 | 0x1001 | ||
| Calc_5_m2 | Out_AU_Const_6 | 0x8045 | ||
| Calc_5_b | Const_Bit_0 | 0x1000 |
| Input | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13 | F14 | F15 | F16 | Signal name | Signal ID | Value table 1 | Default value (signal name) | Const_Bit_0 | 0x1000 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| WT1_1 (value 1) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Out_G11_SS1_A | 0x11 D3 | Value 1 (signal name) | Out_AU_Calc_5 | 0x8004 | |
| WT1_2 (Value 2) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Out_G11_SS1_B | 0x11 D4 | Value 2 (signal name) | Out_G12_K1_value | 0x308C | |
| WT1 3 (Value 3) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Out_G11_SS1_C | 0x11 D5 | Value 3 (signal name) | Const_Bit_0 | 0x1000 | |
| WT1 4 (Value 4) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Const_Bit_0 | 0x1000 | - | Value 4 (signal name) | Const_Bit_0 | 0x1000 |
| Constants block (KB_1) | Arithmetic unit | Meaning |
|---|---|---|
| Constant 3 | 4094 | Maximum reception value |
| Constant 4 | 4 | Number of pulses per meter |
| Constant 5 | 3 600 000 | Vehicle speed factor in cycle duration |
| Constant 6 | 2 | Pulse duration factor |
| Constants block 1 (KB1) | Group 12 | Meaning |
|---|---|---|
| Constants 1 | 400 | Pulse duration |
| 1 A High-Side, PWM | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13 | F14 | F15 | F16 | Signal name | Signal ID | Multifunction output block | - | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Input1 (Active) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Out AU Compare_2 | 0x8025 | - | Model | Output (1) |
| Input2 (Const/puls) | Const_Bit_0 | 0x1000 | Reactivation attempts | 1 | |||||||||||||||||
| Input3 (Cutoff reset) | Term15 Actv | 0x1219 | PWM type | Time (1) | |||||||||||||||||
| Input4 (Cycle time) | Const_Bit_0 | 0x1000 | - | ||||||||||||||||||
| Input5 (Pulse time) | Const Bit 1 | 0x1001 | |||||||||||||||||||
| Input6 (PWM active) | Out AU Compare_2 | 0x8025 | |||||||||||||||||||
| Input7 (PWM period) | Out_AU_Calc_4 | 0x8003 | |||||||||||||||||||
| Input8 (PWM duty) | Out_G12_WT1 | 0x308B | |||||||||||||||||||