Converting Byte Value to Bit (on / off) targetId

Hello friends!
Pls, just for example, let me know, what kind of CAN Message should be for β€œIgnition ON” :

and for " 1000 rpm" tacho value:

Thanks a lot in advance!

IGNITION:
frame canId=β€œ0x26E”
value targetId=β€œ26” startbit=β€œ0” length=β€œ1” units=β€œbit”/

RPM:
frame canId=β€œ0x0AA”
value name=β€œRPM” offset=β€œ4” bitcount=β€œ16” conversion=β€œV/4”/

@Porsche1970 you have the parameters for the two methods mixed up, startbit / bitcount and offset / length

Ignition (Enginebit: Running suggested instead of ignition dwell targetId 26>56)
frame canId=β€œ0x26e”
value targetId=β€œ56” startbit=β€œ0” bitcount=β€œ1” units=β€œbit”

RPM:
frame canId=β€œ0x0aa”
value targetId=β€œ37” offset=β€œ4” length=β€œ2” conversion=β€œV/4”

1 Like

I want to set a bit varialble (like F.cut) with a source value which have several F.cut bits. so if any of the source bits are set the target var is set to true else set to false. I would use the following line to achieve this:
<value targetId="406" offset="0" length="1" units="bit" conversion="(V &amp; 0x30) != 0"></value> <!-- F. cut -->

is it the right way, if not how to do ?

Looks correct otherwise, but 0x30 is two bits on, so it would be better to mask only one bit.

yes 2 bits, and a wants OR logic on those 2 bits.

Looks correct to me then.