NefMoto

Technical => Tuning => Topic started by: masterj on August 15, 2013, 04:29:20 PM



Title: If...Else...
Post by: masterj on August 15, 2013, 04:29:20 PM
Hi, guys!
This might sound stupid but I can't understand in FR where is TRUE and where is FALSE, when it isn't same as examples in top of FR doc. Please look at the attached image and help me identify where is TRUE and where is FALSE line.
Thank you


Title: Re: If...Else...
Post by: ABCD on August 15, 2013, 07:48:26 PM
masterj:

You have got it reversed!
IF FALSE, then wdksgv_w /1/ value will go forward.
IF TRUE, then wdksv_w /2/ will go forward and will be averaged by a time filter with time as tfwdks_w to get final value of wdksgv_w /4/.

btw, what is this function?


Title: Re: If...Else...
Post by: masterj on August 16, 2013, 01:16:30 AM
masterj:

You have got it reversed!
IF FALSE, then wdksgv_w /1/ value will go forward.
IF TRUE, then wdksv_w /2/ will go forward and will be averaged by a time filter with time as tfwdks_w to get final value of wdksgv_w /4/.

btw, what is this function?

This is bwdksgv function. Ive almost finished working on throttle plate angle and will share my report on how to disable all the filters, limiters, etc there.

Btw: so /1/ is always false and /2/ is true? What about /3/ or /4/?


Title: Re: If...Else...
Post by: ABCD on August 16, 2013, 01:37:33 AM

Btw: so /1/ is always false and /2/ is true? What about /3/ or /4/?

When conditions before "IF" are true:
then, wdksv_w /2/ , pspvmin/1/, tfwdks_w/1/, wdksgv_w/4/ are calculated---> to give wdksgv_w

When conditions before "IF" are false:
then, wdksgv_w /1/ is used---> to give wdksgv_w

Now, you have to see when conditions are true or false.


Title: Re: If...Else...
Post by: masterj on August 16, 2013, 03:37:24 AM
When conditions before "IF" are true:
then, wdksv_w /2/ , pspvmin/1/, tfwdks_w/1/, wdksgv_w/4/ are calculated---> to give wdksgv_w

When conditions before "IF" are false:
then, wdksgv_w /1/ is used---> to give wdksgv_w

Now, you have to see when conditions are true or false.

I understand it :) And by the looks of it I kinda found out answer to my question. These /1/; /2/; ... are there to only show how many things are affected by TRUE of FALSE of IF. Where IF arrow points is always TRUE, another line is always FALSE. Easy peasy :)


Title: Re: If...Else...
Post by: masterj on August 16, 2013, 05:37:14 AM
One more situation, when IF paths are split up... Now we have two IF and how would I know which path is connected to which IF?  Also these IFs are also some paths of another statement...


Title: Re: If...Else...
Post by: ABCD on August 18, 2013, 09:16:15 PM
^^^^
Basically, an input is averaged over the time "TFWDKSOF".
IV=initial value starts with 0.

When, IF/2/ is true then this averaging is done.
When, IF/3/ is true then this averaging is started again from scratch with initial value as 0.


Title: Re: If...Else...
Post by: masterj on August 19, 2013, 01:58:44 PM
^^^^
Basically, an input is averaged over the time "TFWDKSOF".
IV=initial value starts with 0.

When, IF/2/ is true then this averaging is done.
When, IF/3/ is true then this averaging is started again from scratch with initial value as 0.

And final question: why there's marked /1/ and /4/ then? :)


Title: Re: If...Else...
Post by: nyet on August 19, 2013, 02:00:56 PM
i think the /# just indicates in which order they are executed/evaluated in the CPU

although i could be reading the FR wrong. my german sucks.


Title: Re: If...Else...
Post by: ABCD on August 19, 2013, 08:10:38 PM
The number scheme is just to differentiate. Like if you seen in first snapshot wdksgv_w has 1 & 4.
So, just mentioning wdksgv_w wont make much sense and also to know where it is coming from.

Nothing to do with order of execution. Everyhting is processed parellely. Though not 100 % sure on this  :)