MLV and status 1 to 8 graphic display?

Questions specific to Megalogviewer

Moderator: LT401Vette

Post Reply
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

MLV and status 1 to 8 graphic display?

Post by arran »

Hi,

Feature request - Can the contents of the status registers be presented graphically in Megalogviewer?
Similar to Crank, ASE, warm up, run, .... at the bottom right of the console, it would add a lot of "ease of use" to the experience. I am currently trying to look at what is happening with Idle VE, Air Con, Fan and having to sit here with a calculator converting dec to bin to see what is happening with bit 5 or 6 is a lot harder that ideally it could be.

Thanks, Arran
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by LT401Vette »

It is on the todo. Right now all you can do is create a calculated field that will display if the bit is on and off. That helps a great deal, but isn't what a stand alone indicator would be.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by arran »

Thanks, ill keep an eye out for any updates. Also thanks for the tip on the calculated field.

Arran
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
shaodome
Master MS/Extra'er
Posts: 741
Joined: Thu Aug 26, 2004 1:58 pm

Re: MLV and status 1 to 8 graphic display?

Post by shaodome »

any updates on this?
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by arran »

Based on what I read in the embedded help in MLV I put together this formula to display when idle ve is active:

[Status6]>15&&[Status6]<32||[Status6]>47&&[Status6]<64||[Status6]>79&&[Status6]<96||[Status6]>111&&[Status6]<128||[Status6]>144&&[Status6]<160||[Status6]>175&&[Status6]<192||[Status6]>207&&[Status6]<224||[Status6]>239&&[Status6]<=255

I can't see how to use a BITTEST function like I'm more familiar with in Assembler, but with a combination of AND and OR the status6 value can be tested to see if it is BETWEEN a number of values, indicating that bit 5 is active. Not very elegant
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by jsmcortina »

A single ampersand, like in C.
value & mask
e.g. [Status6] & 32

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by arran »

Thanks, a couple of handy custom fields I've just setup:

To display when Closed loop idle is active:
[Status2]&128

To display when Idle VE is active:
[Status6]&16

To display when Idle Advance is active
[Status6]&32

The '&&' results in a true/false 1 or 0 result but did NOT correctly track the Status bit. '&' results in a decimal value and correctly tracks the bit value
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by LT401Vette »

The '&&' results in a true/false 1 or 0 result but did NOT correctly track the Status bit. '&' results in a decimal value and correctly tracks the bit value
The && is a logical AND, so both sides of it need to be true (non-zero), then the output will be 1.0.
Where a single & is a bitwise AND, so the output will be the value after applying the mask.

Example:

64 && 32 = 1
32 && 32 = 1
(32+64) && 32 = 1

64 & 32 = 0
32 & 32 = 32
(32+64) & 32 = 32

You can use binary to make it look clearer:
0b00100000 & 0b00100000 = 32 (0b00100000)

The output is always in decimal, but the input can be Hex, Oct, decimal or binary.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by Peter Florance »

Sorry for the hijack, but can I use bit wise & to mask the upper 4 bits of a value?
I want to log wheel speeds via CANbus, but they are first 12 bits and I need to throw away the 4 highest order bits.
Thanks

Sent from my XT1080 using Tapatalk
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by jsmcortina »

Yes.
Mask it with 0x0fff

Not sure how MLV accepts the C-style 0x prefix for hex ??
That's 4095 in decimal.

i.e. [raw value] & 4095

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by Peter Florance »

jsmcortina wrote:Yes.
Mask it with 0x0fff

Not sure how MLV accepts the C-style 0x prefix for hex ??
That's 4095 in decimal.

i.e. [raw value] & 4095

James
Thanks!

Sent from my XT1080 using Tapatalk
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by LT401Vette »

MLV's Math parser is fine with the 0x prefix or 0b for binary 0b111111111111
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: MLV and status 1 to 8 graphic display?

Post by Peter Florance »

LT401Vette wrote:MLV's Math parser is fine with the 0x prefix or 0b for binary 0b111111111111
Very cool. Thanks

Sent from my XT1080 using Tapatalk
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
Post Reply