Torque

Forums

Forums

Guest  

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




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Bitwise PID math

Pages: [1]
Author Topic: Bitwise PID math
frodus
Member
Posts: 518
Post Bitwise PID math
on: November 3, 2012 (GMT)

So Piemmm, you said we can use {A:1} to filter out bits.

Can I filter out two bits at the same time? i.e. {A:9}, or would I do {A:1}*{A:8} ?

I have a situation where a binary value of 9 would mean one thing, 8 would mean another and 1 would mean another. I need to detect when {A:1} and {A:8} is set for fault detection on an on/off display item.

Thanks

PS: would be great to open up the wiki so we can add content and help document. I know the equations took me a while to find them all like VAR(), SIGNED(), ABS() and I’m not sure if there are others we can use.

GaryDoug
Member
Posts: 72
Post Re: Bitwise PID math
on: November 4, 2012 (GMT)

I wasn’t aware there was an operator like that. I have been using the “&” operator which should work for any value. i.e.(A&9)

Electrical test engineer

piemmm
Administrator
Posts: 6629
Post Re: Bitwise PID math
on: November 6, 2012 (GMT)

Hi!

I haven’t actually thought of someone wanting {A:1}*{A:8}, so I’ll have to test – you may in the meantime get some mileage with: X&Y though

I’ve kept the wiki closed for the moment (mainly due to trying to keep spammers away from trashing it), but see the need to open it up – I need to change a few things to facilitate this first though

frodus
Member
Posts: 518
Post Re: Bitwise PID math
on: November 6, 2012 (GMT)

If you want some help, maybe give access to some of the more active members… that eliminates the spam issue.

I’d be more than willing to help fill in some of the info.

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

  Follow me on twitter