self cancling turn signal

Discussion and support for MoTeC Power Distribution Modules

self cancling turn signal

Postby shrive81 on Tue May 23, 2017 12:25 pm

Ok gents want to start off by saying thank you for all the help I was able to successfully program both PDM and communicate via can bus.. looking ot upgrade the current programming as I have left and right turn signals that currently are a toggle switch and only turn off if I remember to hit the button. Trying to figure out how to make a self canceling toggle lets say for 45 seconds. So if I hit the right turn button on the PDM it will turn on the right turn signal and will automatically turn off after a set time..

thanks gents
shrive81
 
Posts: 27
Joined: Thu Dec 29, 2016 6:44 am

Re: self cancling turn signal

Postby Stephen Dean on Tue May 23, 2017 3:48 pm

Hi,

Try using the Result Delay option, and set the Result goes false when the channel is false for... value to 45 seconds. This will hold the channel active for 45 seconds after the channel goes False (i.e. not on)
Stephen Dean
MoTeC Research Centre Melbourne, Australia
User avatar
Stephen Dean
Site Admin
 
Posts: 1788
Joined: Tue Dec 02, 2014 10:29 am
Location: Melbourne

Re: self cancling turn signal

Postby the_bluester on Wed May 24, 2017 11:34 am

I set up a counter which cancelled the indicator after a set number of flashes (Ten I used, though I was fiddling around and also had it set up so that a short press got three and a longer one ten) which allowed for immediate cancel by pressing the button again or pressing the other indicator button or hazard lights as the main output function was a toggle. I am not sure if the result delay will allow for that?
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: self cancling turn signal

Postby the_bluester on Wed May 24, 2017 10:21 pm

I had a look into my experimental setup that cancelled after ten flashes.

First up, I have a Function.flasher which is a flash with a 0.6 second on and 0.6 off time using the logic (PDM Battery voltage = True) that keeps all flashes synchronised, I used it in my headlight flasher as well.

Next I have functions to drive the indicators and hazard lights. Three of, Function.Indicators left, right and Hazard. The functions are toggles using the buttons I have assigned to the indicators and hazard lights. The two indicators have a false override of Function.indicators cancel (below)

Function.indicator cancel is a condition with the logic of ((Function.Indicator left = True AND Function.indicator right = True) OR (Function.Indicator Right= True AND function.Indicator left = True) OR (Function.Hazard lights = True) OR (Function.Indicator cancel counter = 10))

Function.indicator pulse, is a condition and has the logic of (Output.Indicators left = True OR Output.Indicators right = True) The output of that function us used by Function.Indicator cancel counter. Which is a counter, minimum of 0, max of 10, no wrap around, with a "constant 0" over ride using Function.indicator cancel counter zero.

Function.Indicator cancel counter zero is a condition, using the logic (Function.indicator left = False) OR (Function.indicator right false) OR (Function.Hazard lights false) OR (Function.Indicator cancel counter = 10 for 0.5 seconds)

The outputs are driven by a simple AND/OR arrangement. Left is driven by ((function.flasher = true AND Function.Indicators left = True) OR (Function.flasher = True AND Function.Hazard lights = True)) Likewise for the right indicators output, obviously with right substituted for left.


Long story, but the upshot is that if you press either indicator button the indicators will come on on that side, if you do nothing more they will stop after ten flashes. If you press the button again while it is flashing it will stop, if you press the button for the opposite indicator or for hazard lights it will stop and the new function will start. Hazard lights will run continuously and will not be cancelled by either indicator button, only a second press of the hazard lights button.

If you want more or less flashes than ten, you just need to change the max of the flash counter and the Function.Indicators cancel final logic to more or less than 10 on the counter.

I got the short press getting three flashes and a longer one ten going just to prove I could make different length button presses do different things but that is a whole other complication and I will probably not use it in the car. The only thing I plan to use that for is so I can use one button to run the wipers from off-int-low-high with one length press, high-low-int with a longer one and an even longer press for off from any speed. Possibly the same for a counter that I hope to use for variable boost control.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: self cancling turn signal

Postby DipDip71 on Tue Aug 01, 2017 4:00 pm

Hello the_bluester,
I do not understand some of your functions, especially: function.indicator cancel.
Can you post a complete "TurnSignal.pdm" configuration file for flashing left and right and hazard warning lights ?
Thank you in advance.
Didier
DipDip71
 
Posts: 5
Joined: Fri Sep 30, 2016 7:03 pm

Re: self cancling turn signal

Postby the_bluester on Tue Aug 01, 2017 8:10 pm

I will strip down one I have on file (Saves confusion about unrelated functions) and post it here once I have a chance.

EDIT: It will take me ages to strip it down without loosing all the stuff is relevant. Nothing secret in my setup so here it is, this one was a bench experiment but it all tested as working how I wanted.
Attachments
PDM30 HR31 start file 0.01 button experiment.pdm
(247.53 KiB) Downloaded 2666 times
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: self cancling turn signal

Postby the_bluester on Thu Aug 03, 2017 11:19 am

To put a few words around function.indicator cancel.

It is a false over ride for either the left or right indicator functions that drive the outputs. Basically it is a collector of inputs.

Basically if the left indicator function is active and you press the right indicator button or hazard lights, the output of the cancel function provides the false over ride to cancel the left indicator, the same applies if the right indicator function is active and you press either left indicators or hazards. Finally, if the indicator pulse counter reaches the configured number of pulses, that also cancels whichever indicator is active. It does chew up a few functions in the PDM but it is probably not a problem for most cars.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: self cancling turn signal

Postby DipDip71 on Fri Aug 04, 2017 2:24 am

Great thank the_bluester,
I analyze in detail your management (in the PDM file) of the turn and the hazard lights.
Didier
DipDip71
 
Posts: 5
Joined: Fri Sep 30, 2016 7:03 pm

Re: self cancling turn signal

Postby DipDip71 on Fri Aug 04, 2017 6:44 am

Hello the_bluester,

I wrote in my first message:
DipDip71 wrote:I do not understand some of your functions, especially: function.indicator cancel.


In your PDM example, i see :
Image

Why twice the same combination of and ?

Didier
DipDip71
 
Posts: 5
Joined: Fri Sep 30, 2016 7:03 pm

Re: self cancling turn signal

Postby the_bluester on Fri Aug 04, 2017 1:17 pm

They look similar but do not do quite the same thing.

The Left = true AND Right = True makes engaging the right hand indicator cancel the left if it is active, the Right = true AND Left = True cancels the right indicator if the left is engaged while the right is active. Basically the functions are a mirror image of each other.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Next

Return to PDM15 PDM16 PDM30 and PDM32

Who is online

Users browsing this forum: No registered users and 2 guests