Output

(Engine-Level Function)

Deprecated. Do not use in new code.

Description: Places formatted numbers or text on the screen.
Returns: Nothing
Usage: Steady State only.
Function Groups: Graphics
Related to: Format | GUIText | TextAttribs | ZText
Format:  Output(X, Y, Type, Width, Precision, Value, Foreground, Fill, Background, Size, Obsolete)
Parameters:  
X
Required. Any numeric expression giving the X screen coordinate of the lower left corner of the number or text on the screen.
Y
Required. Any numeric expression giving the Y screen coordinate of the lower left corner of the number or text on the screen.
Type
Required. Any numeric expression giving the type of the data to display. The valid values for this parameter are:

Type

Data Type

1

Short

2

Long

3

Float

4

Text

5

Binary

6

Octal

7

Hexadecimal

Status variables can be output using a Type value of 1 that will produce either a 0 or 1 on the screen. The type of the Value parameter does not have to match the Type parameter, except for text.

Width
Required. Any numeric expression giving the minimum number of characters to display. If fewer characters are required to produce the output, the area is filled with blank spaces on the left to make up the required number of characters. This is useful for aligning numbers up on the right. If more characters are required than the Width parameter specifies, the extra characters are extended to the right.

By making Width zero, the output will be aligned on the left. If the Width parameter is greater than or equal to 100 and the Type parameter is 3, the format of the floating point number displayed is in the most compact form which may be in exponential form if the exponent is less than -4 or is greater than the specified Precision parameter.

The actual width used in this mode is 100 less than the specified width. Trailing zeroes are not displayed in this mode. Values of Width outside the range of 0 to 255 inclusive are invalid.
Precision
Required. Any numeric expression giving the precision of the output. This has different meanings for the different output types.

For types 1 and 2 (short and long), it gives the minimum number of digits to appear. If fewer digits are required to display the number, leading zeroes are added to the number.

For type 3 (float), it gives the number of digits to appear after the decimal point if Width is less than 100. If Width is greater than or equal to 100, it specifies the maximum number of significant digits to appear.

For type 4 (text), it gives the maximum number of characters to display. If the string is longer than this parameter, only the number of characters given by the Precision parameters are displayed.

Note: Values of Precision outside the range of 0 to 255 are invalid.
Value
Required. Any numeric or text expression giving the value to display. If the Type is 4, this value may only be a text expression. Otherwise, this value is not required to have the same type as specified by the Type parameter - VTScada does the conversion.
Foreground
Required. Any numeric expression giving the color of the characters to display.
Fill
Obsolete - set to zero.
Background
Required. Any numeric expression giving the color of the background area for the output characters.
Size
Required. Any numeric expression giving the height of the characters in units of Y screen coordinates. If this value results in a specification of less than 12 screen pixels high, the text will be the small text (8 pixels high). Otherwise, the text will be the large text. If Size is negative, it will be interpreted as a dot text output of size equivalent to the absolute value of the size. The number will be displayed to the nearest multiple of the base 8 pixel by 8 pixel text. This produces faster, non-destructive large characters than the normal large text characters.
Obsolete n/a
No longer used, but is maintained for backward compatibility with previous versions of VTScada. Set to 0.
Comments: Should not be used for new code. Maintained for backward-compatibility only. This statement is the general statement for displaying numbers and text on the screen. For small characters, or large characters with a negative Size, the statement is non-destructive (can change without destroying the underlying image). Large character output is destructive. For non-destructive out put, care must be taken when choosing the colors on a colored (non-zero) background since the characters are exclusive ORed with the background. This gives a more general method of displaying text than the Text statement but requires more parameters.