beautypg.com

5 calculating new logworks channels, 1 creating calculated value channels – Innovate Motorsports LogWorks 3 User Manual

Page 116

background image

LogWorks3_Manual_1.01.doc

- 116 -

10.5 Calculating new LogWorks channels

The restrictions on variable names also apply to channel names used in the

calculations. These restrictions are imposed specifically to allow calculations because the
math calculator cannot distinguish between for example a channel name “5+mychannel”
and the command to add 5 to the channel “mychannel”. Same is true for example for
“mychannel-5” or subtracting 5 from the channel “mychannel”.

10.5.1 Creating calculated value channels


Suppose you want to create a new channel from existing data. This channel can be used then
just like any other channel in LogWorks. The LogWorks 3 restriction of 64 value channels and 32
bit channels includes calculated channels.


Example 5: Calculate torque and horsepower channels from vehicle weight, acceleration
channel, gear ratios, tire diameter and rpm channel

? Enter vehicle weight in lb = m
F = m * ACCEL #ACCEL is the acceleration channel from the LMA-3

? Enter tire diameter in inches = dia

r = dia/(2*12) #calculate radius in feet

? Enter final drive ratio = finaldrive
? Enter gear ratio = gear_ratio

trq = F * r / (gear_ratio * finaldrive)
MC(power;hp) = trq * RPM / 5252 #RPM is the RPM channel

MC( ) indicates that a new value channel is to be created (Make Channel). The first word after the
parenthesis ( ‘power’ in the example) is the name of the new channel. The second word,
separated from the first by a semicolon, is the unit assigned to the channel.

The format of the MC command is:

MC(channel_name; channel_unit; minimum_bound; maximum_bound)

The channel unit, minimum_bound and maximum_bound are optional. See below.

LogWorks value channels have ‘bounds’. The bounds are there to limit what is shown on the
main session window to the interesting region. Input channels are naturally bounded by the input
capability of the data collection devices, typically 0..5V. Calculated channels have no such natural
limits. When no bounds are specified, the MC command calculates the minimum and maximum
of the bounds automatically by looking at the minimum and maximum of the calculated trace in all
sessions. This can lead to too large a range because calculations are always performed on all
sessions in a log.