Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 61

Thread: Filtering DFCO Cells

  1. #21
    EFILive Developer Site Admin Blacky's Avatar
    Join Date
    Mar 2003
    Posts
    9,500

    Default

    EFILive provides the same set of operators as 'C'. (Except for equality in C is ==, in EFIlive it is just = and non-equality in C is !=, in EFILive it is <>). And there is no ?: operator, use the built in function iff() instead.

    So create a calcualted PID that returns 0 or 1:
    iff({GM.STATE05} & 128,1,0)

    Then use that calculated PID in the filter.

    Regards
    Paul
    Before asking for help, please read this.

  2. #22
    EFILive Crew Site Admin Tordne's Avatar
    Join Date
    Oct 2004
    Posts
    3,870

    Default

    Quote Originally Posted by Blacky
    EFILive provides the same set of operators as 'C'. (Except for equality in C is ==, in EFIlive it is just = and non-equality in C is !=, in EFILive it is <>). And there is no ?: operator, use the built in function iff() instead.

    So create a calcualted PID that returns 0 or 1:
    iff({GM.STATE05} & 128,1,0)

    Then use that calculated PID in the filter.

    Regards
    Paul
    Thanks mate!!

    What is the 128, is that a position marker or something for the binary data? It looks like the DFCO portion of the STATE05 PID is going to be in the first position.

    Cheers,
    Andrew
    EFILive Crew


  3. #23
    EFILive Developer Site Admin Blacky's Avatar
    Join Date
    Mar 2003
    Posts
    9,500

    Default

    The bits are listed MSb to LSb (Most Significant bit to Least Significant bit). 128 is the equivalent of 10000000 in binary. It is used to isolate just the DFCO bit in STATE05 that we are interested in.

    The & operator will take the value of STATE05, AND it with 10000000 to get a zero or non zero result based on the value of the 7th (MSb) bit.
    i.e. if the DFCO bit was set in STATE05 then the value would be 1xxxxxxx, if DFCO was not set then the value would be 0xxxxxxx where the x's are don't care values (i.e. all the other bits in the STATE05 value).

    Doing a bitwise AND:
    1xxxxxxx
    &
    10000000
    is
    10000000
    Which is non zero and evaluates to TRUE in the iff() function.

    0xxxxxxx
    &
    10000000
    is
    00000000
    Which is zero and evaluates to FALSE in the iff() function.

    Hope that helps.

    Paul
    Before asking for help, please read this.

  4. #24
    EFILive Crew Site Admin Tordne's Avatar
    Join Date
    Oct 2004
    Posts
    3,870

    Default

    Great explanation Paul . I knew it was going to be something like that, I just wanted to make sure of the logic so that I could isolate the correct bit for DFCO.

    Cheers,
    Andrew
    EFILive Crew


  5. #25
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default

    Do the other C bitwise operators like >> and << work...?

    If I wanted to plot GM.STATE05 bit 7 on a chart,
    would I create and plot a calculated pid like either of these:
    {GM.STATE05} >> 7 & 1
    {GM.STATE05} / 128 & 1



    P.S. What is the order of precedence of the operators in EFILive...?

  6. #26
    EFILive Crew Site Admin Tordne's Avatar
    Join Date
    Oct 2004
    Posts
    3,870

    Default

    Quote Originally Posted by Blacky
    So create a calcualted PID that returns 0 or 1:
    iff({GM.STATE05} & 128,1,0)

    Then use that calculated PID in the filter.
    Hi Joe,

    I think this is what the PID might look like, using the DFCO state as an example.
    Andrew
    EFILive Crew


  7. #27
    EFILive Developer Site Admin Blacky's Avatar
    Join Date
    Mar 2003
    Posts
    9,500

    Default

    I have not implemented >> and << (I guess I should, it would not be difficult).

    Use the iff() function and & operator described previously to plot individual bits as either 0 or 1 on the charts.

    See attached image of new page just added to the Scan Tool manual.

    Paul
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Image1.png 
Views:	234 
Size:	56.6 KB 
ID:	396  
    Before asking for help, please read this.

  8. #28
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default

    Quote Originally Posted by Tordne
    I think this is what the PID might look like, using the DFCO state as an example.
    Quote Originally Posted by Blacky
    Use the iff() function and & operator described previously to plot individual bits as either 0 or 1 on the charts.
    Andrew,
    Paul,

    Hi there; I didn't think about it, but you're right, that would produce the required plot.

    Thanks.

  9. #29
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default

    Quote Originally Posted by Blacky
    See attached image of new page just added to the Scan Tool manual.

    Thanks, I'm going to print it out and paste it to the inside of my glovebox door...
    (programmers always print out precedence charts).

    Joe

  10. #30
    EFILive Crew Site Admin Tordne's Avatar
    Join Date
    Oct 2004
    Posts
    3,870

    Default

    Quote Originally Posted by joecar

    Thanks, I'm going to print it out and paste it to the inside of my glovebox door...
    (programmers always print out precedence charts).

    Joe
    LOL... You guys are scaring me again

    You'll be able to ask yourself when you come to a T junction "should I turn left | right?"
    Andrew
    EFILive Crew


Page 3 of 7 FirstFirst 12345 ... LastLast

Similar Threads

  1. How to select mutliple cells in a row to smooth?? but not all of the cells.
    By 2010 Bumblebee in forum General (Petrol, Gas, Ethanol)
    Replies: 2
    Last Post: April 29th, 2010, 03:34 PM
  2. AD filtering question?
    By 67SS509 in forum General
    Replies: 27
    Last Post: November 16th, 2009, 03:24 PM
  3. MAP cells all the same colour????
    By hquick in forum General (Petrol, Gas, Ethanol)
    Replies: 11
    Last Post: October 21st, 2008, 05:02 PM
  4. PLX WB reading 13.6-13.62 in all cells
    By Chalky in forum General (Petrol, Gas, Ethanol)
    Replies: 2
    Last Post: May 19th, 2006, 04:16 PM
  5. Filtering Data
    By bink in forum General
    Replies: 32
    Last Post: August 13th, 2005, 12:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •