Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » New Bit Pattern Display Type

Pages: [1]
Author Topic: New Bit Pattern Display Type
Capp777
Member
Posts: 2993
Post New Bit Pattern Display Type
on: April 27, 2017 (GMT)

Please consider adding a bit pattern display
type where the user can go into “display
configuration” to setup text values for a
specific bit pattern. For instance:

Equation: {A:1}*(2^1)+{A:0}*(2^0)

0 0 0 0 -> Text String 0
0 0 0 1 -> Text String 1
0 0 1 0 -> Text String 2
0 0 1 1 -> Text String 3

1 1 1 1 -> Text String 15

Maybe a maximum of one nibble
(16 text strings) to keep it manageable
in the sub menu.

A text string up to 14 character max would
be nice.

Edited.

F-150Torqued
Member
Posts: 437
Post Re: New Bit Pattern Display Type
on: April 28, 2017 (GMT)

BIT PATTERN DISPLAY

I have found a lot of PIDs are just “Flag” or “Bit” indicator oriented (at least on my ’04 F150 5.4l triton.

Trying to sort them out requires live monitoring while flipping switches, pressing buttons, moving gear shifter position or driving.

So to develop visual gauge so I can see each BIT as “1” or “0”, I developed TWO virtual PIDs – one for upper nibble and one for lower nibble – and display then on two digital gauges placed side by side – with decimal places set to Four. You see as “8.0000” “4.0000” and you can jot down the “hexadecimal” representation of decimal values quiet quickly. The “8” and the “4” is to help me readily know which gauge is upper and lower nibbles if they are monitored individually OR are NOT adjacent to each other. I go into these and edit Mode/PID and Short name to test different PIDs. I have a second set to test structured identical that operates the same way on byte B instead of A.

Here’s my virtual PIDs

FOR UPPER 4 NIBBLE:

Mode/PID 22xxxx (Where xxxx is whatever pid being tested)
Long Name: _Test A-Hi bits
Short Name: xxxx A-Hi bits
Min Max: 0, 1000
Unit: bits
Formula: 8+Val{{A:7}}*0.100001+Val{{A:6}}*0.010001+Val{{A:5}}*0.001001+Val{{A:4}}*0.0001001
Header: Auto or Blank – (or as might be required for pid being tested)

FOR LOWER 4 NIBBLE:

Mode/PID 22xxxx (Where xxxx is SAME AS ABOVE – pid being tested)
Long Name: _Test A-Lo bits
Short Name: xxxx A-Lo bits
Min Max: 0, 1000
Unit: bits
Formula: 4+Val{{A:3}}*0.1000001+Val{{A:2}}*0.010001+Val{{A:1}}*0.001001+Val{{A:0}}*0.0001001
Header: Auto or Blank – (or as might be required for pid being tested)

The purpose of the extra 01 past the end of each decimal multiplier (that appears to be un-necessary) actually has a purpose. It is necessary to move binary rounding out beyond truncation by the 4 decimal place setting in the gauges. Otherwise the possibility arises of getting something like “0102” or “0003” or some crazy thing that are not “bit” representations.

——————–

54371019

Capp777
Member
Posts: 2993
Post Re: New Bit Pattern Display Type
on: April 28, 2017 (GMT)

For bit testing I’ve been playing with…

{A:7}*(10^3)+{A:6}*(10^2)+{A:5}*(10^1)+{A:4}*(10^0)+{A:3}*(10^-1)+{A:2}*(10^-2)+{A:1}*(10^-3)+{A:0}*(10^-4)

1111.1111

Digital Display > Decimal Places = 4

My original post was to display different states indicated
by the bit patterns reported. (Where more than one bit
represents a given state). My given example used two bits
and four states.

F-150Torqued
Member
Posts: 437
Post Re: New Bit Pattern Display Type
on: April 29, 2017 (GMT)

I like the exponential thing instead of all the decimal digits I was playing with trying to get a whole byte handled in one display. But I could not get leading zeros to show up if the byte was less than Hex 16. That’s when I started putting a leading number out there and working only with decimals.

Exponents don’t produce binary rounding problems (like you encounter in accounting systems) without moving the decimal out and truncating?

And then: the display fails (goes crazy) when I specified more than about five or six decimals. That’s when I started putting a leading whole number out there and working only with decimals – but nine character digits do not fit very well on the digital gauge. So, I would up doing nibbles.

————-

54371019

Capp777
Member
Posts: 2993
Post Re: New Bit Pattern Display Type
on: May 26, 2017 (GMT)

Bump for Ian.

I am sure there are others looking to
assign text values to bit values (states).

cintakc
Member
Posts: 1661
Post Re: New Bit Pattern Display Type
on: May 26, 2017 (GMT)

Yes, I support this proposal

F-150Torqued
Member
Posts: 437
Post Re: New Bit Pattern Display Type
on: May 26, 2017 (GMT)

I also support this proposal as being a very valuable capability for utilizing certain PCM responses. ie: A treasure trove of flags are available on my F150 — PID 1689 contains eight separate flags indicating the PCM is operating in “FEMM” (Failure Engine Management Mode) for one of the systems represented within the flag byte. The bit tells which one. it is impractical to create a separate gauge for each one.

Alternatively: I could work with a “PURE RAW HEXIDECIMAL OUTPUT” option in the Digital Gauge dashboard ‘Display Configuration’ settings. I can perceive this approach being much easier programmatically to just SLAP the hex result on the display. Most users who would use this feature can readily visualize the bits in a Byte or even Word hexadecimal representation.

—————-

54371019

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.032 seconds.

  Follow me on twitter