learning wiper and washer

All information about power management unit
Post Reply
FIS
Posts: 15
Joined: Fri Feb 09, 2018 12:39 pm

learning wiper and washer

Post by FIS » Wed Feb 28, 2018 6:02 am

Hello
I learn to configure as follows
wiper1.pmu
(25.03 KiB) Downloaded 27 times
One switch of the keyboard switches to activate wiper slow and fast (2stages) and using switchboard ID0x435 SW1 to connect simple push on steering switch to activate washer pump

Q:
1. is this correct to set k_wiper: s1.setChannel as w_wipers.slowOut and s2.setChannel as w_wipers.fastOut
wiper2.pmu
(26.61 KiB) Downloaded 24 times
2. In wiper2.pmu when I activate SW1 (washer) I want to activate wiper slow too. I put this on formula in o_wipers_slow. Is this correct?

3. I notice if I use formula in o_wipers_slow or o_wipers_fast the respective output pin setting in w_wipers goes to blank. Is this normal?

Thank you

jgm
Posts: 73
Joined: Wed Oct 19, 2016 3:59 pm

Re: learning wiper and washer

Post by jgm » Wed Feb 28, 2018 2:30 pm

Hi,

1. Setting keypad button k_wiper by setChannel is not required. I've removed these setting from your project.

2. The easiest way to activate the slow mode of the wiper is to use "Single swipe" option. There is Input channel for the Single swipe. I've used it with your washer button.

Please find attached a modified project that uses Single swipe.
(more in the next post)
Single_swipe.png
Attachments
wipers1_singleSwipeByWasher.pmu
(27.06 KiB) Downloaded 24 times

jgm
Posts: 73
Joined: Wed Oct 19, 2016 3:59 pm

Re: learning wiper and washer

Post by jgm » Wed Feb 28, 2018 2:41 pm

3. Changing the formula of the slow/fast output is not recommended, as it will be changed every time you use Wipers Module.

It's better to modify input signal.
Please find an attached example that activates the slow mode for 3 seconds when the washer is clicked.

Instead of using k_wiper directly I route it by math channel. And then use this math channel as the input for Wipers Module.

a. First we need to generate 3s second pulse: f_washerPulse = pulse c_washNwipe.rising 3s
b. Then we need to mix the k_wipers and the pulse: n_wiperMaster = max(f_washerPulse, k_wiper)
c. Finally use the n_wiperMaster in Wiper Module

(Also, the f_washerPulse can be used for washer output. (Or not, as you prefer.)
Using_wiperMaster.png
Attachments
wipers1_swipeThreeSecondsByWasher.pmu
(29.2 KiB) Downloaded 29 times

FIS
Posts: 15
Joined: Fri Feb 09, 2018 12:39 pm

Re: learning wiper and washer

Post by FIS » Thu Mar 01, 2018 2:18 pm

jgm wrote:
Wed Feb 28, 2018 2:41 pm
3. Changing the formula of the slow/fast output is not recommended, as it will be changed every time you use Wipers Module.

It's better to modify input signal.
Please find an attached example that activates the slow mode for 3 seconds when the washer is clicked.

Instead of using k_wiper directly I route it by math channel. And then use this math channel as the input for Wipers Module.

a. First we need to generate 3s second pulse: f_washerPulse = pulse c_washNwipe.rising 3s
b. Then we need to mix the k_wipers and the pulse: n_wiperMaster = max(f_washerPulse, k_wiper)
c. Finally use the n_wiperMaster in Wiper Module

(Also, the f_washerPulse can be used for washer output. (Or not, as you prefer.)

Using_wiperMaster.png

I have to do online practices :roll:
Could you please explain the 'number' operations? how you decide to create wiperMaster, I read the manual but has limited information I can understand
Thank you very much

jgm
Posts: 73
Joined: Wed Oct 19, 2016 3:59 pm

Re: learning wiper and washer

Post by jgm » Thu Mar 01, 2018 3:55 pm

You need to "mix" two channels.
One (k_wiper) has values 0, 1 or 2.
The second (f_washerPulse) has values 0 or 1.
You want to select the greater of these two channels.
Max (the maximum value of two values) gives you what you need.

max(0, 0) = 0
max(0, 1) = 1
max(1, 0) = 1
max(1, 1) = 1
max(2, 0) = 2
max(2, 1) = 2

This only one solution to your problem. There are other solutions that solve your problem in the same or similar way.

FIS
Posts: 15
Joined: Fri Feb 09, 2018 12:39 pm

Re: learning wiper and washer

Post by FIS » Thu Mar 01, 2018 5:55 pm

Got it! Thanks agin :D

Post Reply
stół kuchenny okrągły

Who is online

Users browsing this forum: No registered users and 1 guest