Counter on Function

Discussion and support for MoTeC Power Distribution Modules

Counter on Function

Postby Donovan CR6 on Wed Apr 08, 2020 5:46 pm

Hi Guys
Is there a way to use a counter on a function?
So basically I want to have 3 different aircon temperature settings, I currently have one setting using hysteresis coming on at 6degrees and off a 1 degree. I want a low, medium and high with different temp settings but how do I put a counter on this? Seems like the counter only works with an output and not a function?
Donovan CR6
 
Posts: 40
Joined: Tue Feb 07, 2017 10:45 pm

Re: Counter on Function

Postby David Ferguson on Thu Apr 09, 2020 2:40 am

I have implemented a several functions using counters. Such as
Wiper Speed = Counter(range:0..2, increment:Wiper Speed Button, edge=rising, wrap=true)
Display Brightness = Counter(range:1..4,increment:Display Brightness Button, edge=rising, wrap=true,override:Master Shutdown Switch, constant=4)

I then use this channels in other functions such as:
Wiper Switch.intermittent = (Wiper On Req = true) and (Wiper Speed = 0)
Wiper Switch.slow = (Wiper On Req = true) and (Wiper Speed = 1)
Wiper Switch.fast = (Wiper On Req = true) and (Wiper Speed = 2)


These Switch functions are then used in the various output conditions
so the low speed wiper output condition would be
Wiper Switch.slow or Wiper.Intermittent.Speed (<- this is function that uses flash())

Hopefully that example is enough to get you going. if not, post your config and I'll see if we can help directly.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1379
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California


Return to PDM15 PDM16 PDM30 and PDM32

Who is online

Users browsing this forum: No registered users and 2 guests