Nothing Special   »   [go: up one dir, main page]

8 Results and Reports: 8.1 Results of A Calculation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

I Results and Reports 91

8 Results and Reports

8.1 Results of a calculation


KISSsoft displays the results of a calculation in the Results window (see chapter 4.2.3, The Results
window). If no results are displayed, an error has occurred during the calculation. If this happens, a
system message appears in a message box to alert you to the error. An indicator in the status bar
(see chapter 4.5, Tooltips and status bar) shows whether the results are consistent, i.e. whether the
results match up with the data in the user interface.

8.1.1 Add your own texts in the results window


\ext\.rpt\". This file must then
be named using this convention: "Modulname + result.RPT" (e.g. for a cylindrical gear pair
Z012result.RPT).

Then define the new parameters or values that are to be added. These values then also appear at
the end of the "Results" window.

The syntax corresponds exactly to the entries for the report templates.

8.2 Calculation reports


Select Report > Generate to generate reports about your calculations. In addition, the tool bar and
the F6 function key give you quick, convenient access to this action. The report contents depend on
which tab is currently active (see chapter 5.1, Standard and special tabs). The Length (see chapter
8.5.2, Scope of a report) and Appearance (see chapter 8.5.3, Formatting) of standard reports can be
influenced by user-defined report templates (see chapter 8.5, Report templates).

A calculation module can contain further reports which you can access via the Report menu.

Reports are usually displayed in the KISSsoft Report Viewer (see chapter 4.4.1, Report Viewer).
Important: The report is not saved when you return from the report viewer to the input window. To
make it permanently available, you must save it with a new name!

Note

In general, a report should only be created if the calculation is consistent (see chapter 5.3,
Calculating and generating a report). If this is not the case, you can still generate the report, but the
status of the calculation will then be noted in the report.
I Results and Reports 92

Note

When you generate a standard report, the system generates a report file with the module's label as
its file name. The file is saved in the directory defined as the TEMPDIR (see chapter 2.6, Global
settings - KISS.ini) in the KISS.ini file (see chapter 2.6.1, Definitions in [PATH]).

8.3 Drawing data


Depending on the calculation module, you can select Report > Drawing data to generate a report
which can be used to output drawings.

8.4 Report settings


Select the Report >Settings menu option to tailor the automatic generation of reports. All the
settings can also be defined globally in the KISS.ini (see chapter 2.6.3, Definitions in [REPORT]) file.

8.4.1 General
Here you define the scope of the report (see chapter 8.5.2, Scope of a report) and whether warnings
from the calculation are to be included in it. You can also set the font size, language and the
standard format used to save reports.

The report can be viewed in two different modes: "overwrite" or "compare".

If a report is generated, and a previous report is still open, the data will be updated. The cursor in the
editor will remain in the same line it was in before this. This feature will help you analyze specific
values using different inputs.

In the report settings, change the report mode to "compare" if you need to compare two or more
reports at a time. This mode can only by set if you are using KISSedit as the editor. You can also
synchronize the reports and scroll through them all at the same time.

You can also set these report settings directly in the KISS.ini file.

8.4.2 Page layout


Here you can define the paper size and the page margins used to generate reports automatically.
I Results and Reports 93

8.4.3 Header and footer


In KISSsoft, reports are usually generated with headers and footers. You can define your own header
and footer lines. There are a number of placeholders available for this.

Placeholder Description

%logo Picture file

%date Dated

%time Time

%pn Number of pages

%pc Number of pages

%t Tab

The %logo placeholder uses the selected graphics file to integrate a user-defined logo (company
label). The date and time are output in accordance with the details specified under Extras >
Settings.

8.4.4 Start and end block


Reports in KISSsoft are usually generated with a start block and an end block. You can define these
start and end blocks yourself. The start and end blocks are defined in template files which are stored
in the rpt directory in the installation folder.

Language Start block file End block file

German kissd.rpt kissfd.rpt

English kisse.rpt kissfe.rpt

French kissf.rpt kissff.rpt

Italian kissi.rpt kissfi.rpt

Spanish kisss.rpt kissfs.rpt

Russian kissr.rpt kissfr.rpt

Portuguese kissp.rpt kissfp.rpt

Chinese kissc.rpt kissfc.rpt

Commands that can be used in these templates and what they mean:

Command Description
I Results and Reports 94

DATE Date (select "Extras > Settings" and then set your preferred output
format.)

TIME Time (select "Extras > Settings" and then set your preferred output
format.)

PROJECT Project name

PROJECTDESCRIPTION Description of the project

FILENAME/DESCRIPTION File name

FILENAME.EXT File name with extension (e.g. "Example1.Z12")

FILEPATH Path with file name (e.g. "C:\Temp\GearPair.Z12")

DESCRIPTION Description of the file

COMMENT Comment for the file

CUSTOMER Customer name as defined in the project

USER User name (Windows user name)

RELEASE Version number (e.g. "04-2010")

COMPANY Company name (as defined in the license file)

NLINES Number of lines in the report

IMPERIALUNITS Whether US customary units are specified for IF statements

METRICUNITS Whether metric units are specified for IF statements

PROJECTUSED Whether projects are used for IF statements

8.5 Report templates


For each calculation module, KISSsoft provides report templates to define the form and content of
the reports. You can use these supplied templates as the basis for generating user-defined templates
for producing reports that meet your requirements. However, you must ensure the Formatting (see
chapter 8.5.3, Formatting) and Storage locations (see chapter 8.5.1, Storage locations and
descriptions) remain the same.

8.5.1 Storage locations and descriptions


The report templates supplied by KISSsoft are stored in the directory that has been set as RPTDIR
(see chapter 2.6, Global settings - KISS.ini) in the KISS.ini (see chapter 2.6.1, Definitions in [PATH])
file. If RPTDIR (see chapter 2.6.1, Definitions in [PATH]) was not defined in KISS.ini (see chapter
2.6, Global settings - KISS.ini), you will find the templates in the installation folder under rpt. It is
essential that user-defined report templates are stored in the RPT subdirectory, in the EXTDIR (see
chapter 2.6.1, Definitions in [PATH]) directory. This is the only way to prevent your templates from
I Results and Reports 95

being overwritten if a patch is installed. When the system generates a report, it uses the user-defined
template from the EXTDIR directory, if present. Otherwise it uses the template from the RPTDIR to
create the report.

The report template labels have this structure: MMMMlsz.rptIt is made up of:

MMMM Module descriptor e.g. M040

l For historical reasons, always = l

s Language of the report s = d, e, f, i, s or a

z For historical reasons, always = 0

.rpt File type

Examples

Bolt calculation:

M040LD0.RPT Bolt calculation, German printout

M040USER.RPT Default printout via the interface,


results in the M040USER.OUT file
Cylindrical gear calculation:

Z012LD0.RPT Cylindrical gear pair, German printout

Z012USER.RPT Default printout via the interface,


results in the Z012USER.OUT file

Z10GEAR1.RPT Output via interface, contains only data

for gear 1, results in file Z10GEAR1.OUT

Z10GEAR2.RPT Output via interface, contains only data

for gear 2, results in file Z10GEAR2.OUT

Z011LD0.RPT Single gear, German printout

Z013LD0.RPT Rack, German printout

Z014LD0.RPT Planetary gear, German printout

Z015LD0.RPT 3 gears, German printout

Z016LD0.RPT 4 gears, German printout


Spring calculation:

F10SPRING.RPT Default printout for drawing data results in the F10SPRING.OUT


file
English printout:

M040LE0.RPT Bolt calculation, English printout


I Results and Reports 96

American printout:

M040LA0.RPT Bolt calculation, American printout

8.5.2 Scope of a report


To preset the scope or length of a report, on a scale of 1 to 9, select the Report > Settings menu
option. 9 will produce a complete report, and 1 will produce a short report. In the report template, you
see a number between 1 and 9 at the beginning of every row. This number works together with the
setting described above to determine whether or not the row is to be read.

Example: If you entered 5 (medium) as the report length, all the lines in the report template that start
with 1, 2, 3, 4 or 5 are read. Rows with 6, 7, 8 and 9 will be not read.

8.5.3 Formatting
Both the report template and the report generated from this are text files that are created with the
Microsoft Windows font. You should always edit text in MS Windows, otherwise accented characters
such as ä, ö, ü, as well as some special characters, may be represented incorrectly.

The following statements and key words are defined in the report format:

Texts that are to be output


Comments that are not to be output
Descriptions and formatting of calculation variables
Limited branchings (IF ELSE END)
Iterations (FOR-loops)

8.5.3.1 Text formatting features

You can use these text formatting features in RPT:

Description Start End

Underline <UL> </UL>

Cross out <STRIKE> </STRIKE>

Grease <BF> </BF>

Italic <IT> </IT>

Superscript <SUPER> </SUPER>

Subscript <SUB> </SUB>


I Results and Reports 97

Font size <FONTSIZE=xx>

Enlarge font size <INCFONTSIZE> </INCFONTSIZE>

Reduce font size <DECFONTSIZE> </DECFONTSIZE>

Page break <NEWPAGE>

Line break <BR>

Text color red <RED> <BLACK>

Text color green <GREEN> <BLACK>

Text color blue <BLUE> <BLACK>

Http link or e-mail address <LINK=destination> </LINK>

Blank space <SPACE>

Insert figure <IMAGE=name,WIDTH=xx,HEIGHT=yy>

Insert image <INCLUDEGRAPHIC=name,WIDTH=xx,HEIGHT=yy>

Adding a report template <EXECUTE=name.rpt>

8.5.3.2 Comments

Comment lines begin with //. Comments are ignored when a report is created.

Example

// Hier habe ich am 13.12.95 die Protokollvorlage geändert, hm

Aussendurchmesser mm : %10.2f {sheave[0].da}

In this case, only the second line will be output.

8.5.3.3 Calculation variables

You cannot define your own variables (apart from the number variables used for FOR loops (see
chapter 8.5.3.5, FOR loop), which you (as the user) specify, and which can output a value.

Placeholder

Use placeholders to specify the file type and formatting for a variable:

%i stands for a whole number


%f stands for a floating point number
I Results and Reports 98

1. 2f stands for a formatted floating point number with 1 places in total (including prefix
operator and decimal separator) and 2 decimal places
%s stands for a left-justified character string (text)
%ns stands for a right-justified character string in a n- number field (n is a whole number).

The data types must match the definition in the program. The value is returned in exactly the place
where the placeholder is positioned. The syntax of the formatting corresponds to the C /C++standard.

Examples

%10.2f returns a right-justified 10-digit floating point number, with 2 decimal places.
%ireturns an unformatted whole number in exactly this location.
%30s stands for a right-justified character string in a field that is 30 characters long (if the
number 30 is omitted, the characters will be left justified).

Counter-examples

%8.2i is an invalid formatting because a whole number has no decimal places.


%10f2 outputs a right-justified 10-digit floating point number. However, the 2 decimal places are
ignored and output as text 2. The default setting is to output floating point numbers to 6 decimal
places.

Variables

The variable to be displayed must stand after the placeholder in the same row. The variable is
identified by being enclosed in curly brackets. If these brackets are left out, the variable name will be
displayed as normal text.

Important: It is essential that the number of placeholders exactly matches the number of pairs of
brackets {}.

Example

%f {sheave[0].d} is the value of the variable sheave[0].d at the point %f as a floating point number with
6 decimal places.

Basic calculation types - output of changed variables

You can output changed variables in the report. They can be multiplied or divided with a coefficient.
You can also add or subtract a number. This functionality is also available in the arguments of IF- or
FORinstructions (see below).

Value of the variable multiplied %3.2f {Var*2.0}


I Results and Reports 99

Value of the variable divided %3.2f {Var/2.0}

Value of the variable added %3.2f {Var+1.0}

Value of the variable subtracted %3.2f {Var-2}

The two Degree and Gear functions are also available for converting variables to degrees or radians:

Angle %3.2f {grad(angle)}

Variables can also be directly linked with each other, e.g. in the form {sheave[0].d- sheave[1].d}. More
than two numbers can be linked. Numbers that have sign operators must be enclosed in brackets, for
example {ZR[0].NL*(1e-6)}.

The available functions are listed in Table 8.2.

Function Meaning

sin(angle) sine of angle in the radian measure

cos(angle) cosine of angle in the radian measure

tan(angle) tangent of angle in the radian measure

asin(val) arcsine of val, returns radian measure

acos(val) arccosine of val, returns radian measure

atan(val) arctangent of val, returns radian measure

abs(val) |val|

exp(val) eval

log(val) Return value x in ex = val

log10(val) Return value x in 10x = val

sqr(val) Return value val2

sqrt(val) Return value

int(val) Whole number of val

pow(x;y) Return value xy

sgn(val)

Return value

sgn2(val)
Return value

grad(angle) Converting from the radian measure to degrees

rad(angle) Converting from degrees to radian measure


I Results and Reports 100

mm_in(val) Return value val/25.4

celsius_f(val)
Return value val + 32

min( 1; ...; 5) The return value is the minimum of v1 5

max( 1; ...; 5) The return value is the maximum of v 1 5

and( 1; 2) binary and function

or( 1; 2) binary or function

xor( 1; 2) binary exclusive or function

AND( 1; ...; 5) logical and function

OR( 1; ..., 5) logical or function

NOT(val)
Return value

LESS( 1; 2)

Return value

EQUAL( 1; 2)

Return value

GREATER( 1; 2)

Return value

ROUND(x;n) Rounds off x to n places

strlen(str) Length of character string

strcmp(str1;str2) Compare character string

Return value:

1 if str1 = str2

0 otherwise
8.1 table: Functions available for calculations in the report

8.5.3.4 Condition query IF ELSE END

The condition query or branching enables you to output certain values and texts only if a particular
condition has been fulfilled. The following conditions are supported:

Combination of characters Meaning

= equal

You might also like