PDA

View Full Version : Getting my current gear displayed



Daniel
08-02-2011, 10:27 PM
On my video vbox lite I'm trying to create a gear indicator so it displays 0,1,2,3,4,5,or 6 and struggling to get my head around it.

I have an input module so I have RPM.

I used to use Trackvision and had a formula in Excel that did it. I have ported that formula to the MATHS channel now but am struggling at the last step.

This is the formula i'm using in the MATHS channel:

('uIM0'*60*0.00123821)/(('G4'+0.0001)*4.76)

That calculation works fine and gives me a value. Now, in excel, I took the result of that formula, and had another formula in another cell check it and tell me what gear I was in based on the result of the formula above.

The Excel formula is:

=IF(T35>3.267,1,IF(T35>2.13,2,IF(T35>1.517,3,IF(T35>1.147,4,IF(T35>0.921,5,IF(T35>0.001,6))))))

T35 is the cell with the result from the first calculation. How can I port this to the MATHS channel so I can just display what gear I am in? (I don't want to use the gearlever animation, just display the number)

I'm probably being thick :)

Darran
09-02-2011, 09:34 AM
You're on the right lines. But the Display Range element used by the gear stick animation can also display text instead of images for each range. As the maths channels in the Video VBOX don't support an IF function, this will give you the visual output you would like.

Create a new display range element and set the background to transparent or load a background image.
Point the parameter to your maths channel
Pick the desired font settings
As you add each range for each gear (e.g. 0.001-0.921, 0.922-1.147, etc.), set the Type to Text. Then enter 1, 2, 3 or whichever gear you want to display in the Text input field.
87

Daniel
10-02-2011, 01:40 PM
Hi Darran,

That's exactly what it is, thank you, I didn't realise I could change the graphic to text. I'll give it a test this weekend.

Thanks again.