Você está na página 1de 10

Appendix A – Additional Libraries

WAGO-I/O-PRO 32 Library

Standard.lib

Contents
ASCIIBYTE_TO_STRING .........................................................................3
REAL_STATE .............................................................................................4
STANDARD_VERSION.............................................................................6
STRING_COMPARE ..................................................................................7
STRING_TO_ASCIIBYTE .........................................................................8

WAGO-I/O-PRO 32 Standard A-1


A-2 Standard WAGO-I/O-PRO 32
Appendix A – Additional Libraries

ASCIIBYTE_TO_STRING

WAGO-I/O-PRO 32 Library elements


Category: STRING function
Name: ASCIIBYTE_TO_STRING
Type: Function X Function block Program
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers

Input parameters: Data type: Comments:


byt BYTE The input value is a number of data
type BYTE.

Return value: Data type: Comments:


ASCIIBYTE_TO_STRING STRING The return value of the function is a
character of data type STRING.

Graphic display:

Time behaviour:

Function description:

This function convents a number from data type BYTE to a character of data type
STRING.

WAGO-I/O-PRO 32 Standard A-3


REAL_STATE

REAL_STATE

WAGO-I/O-PRO 32 Library elements


Category: Information about Real operations
Name: REAL_STATE
Type: Function Function block X Program
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers

Input parameters: Data type: Comments:


RESET BOOL A TRUE initialises the variable error
again to zero.

Output parameters: Data type: Comments:


ERROR BYTE A value unequal to zero indicates an
error with a real operation.

Graphic display:

Time behaviour:

Function description:

This function block offers the programmer the possibility to react to errors occurring
during computation with floating point numbers. In a program the function block
REAL_STATE can be invoked after each operation in order to recognize a number
overflow. In the event of an error, the ERROR output adopts a value unequal zero.

A-4 Standard WAGO-I/O-PRO 32


Appendix A – Additional Libraries

The following output values are possible:

ERROR = 3 -> Integer overflow


ERROR = 4 -> Floating overflow
ERROR = 5 -> Floating underflow
ERROR = 7 -> Divide by zero
ERROR = 9 -> Undefined float
ERROR = 10 -> Conversion error
ERROR = 11 -> Floating point stack underflow
ERROR = 12 -> Floating point stack overflow

WAGO-I/O-PRO 32 Standard A-5


STANDARD_VERSION

STANDARD_VERSION

WAGO-I/O-PRO 32 Library elements


Category: Running time diagnosis
Name: STANDARD_VERSION
Type: Function X Function block Program
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers

Input parameters: Data type: Comments:


EN BOOL A TRUE at this input activates this
function.

Return value: Data type: Comments:


STANDARD_VERSION WORD Library version of Standard.lib.

Graphic display:

Time behaviour:

EN

STANDARD VERSION

Function description:

The STANDARD_VERSION function returns the current library version number. This
function can be used for information purposes during program development.
Furthermore it can serve to avoid version conflicts with the running time.

Version: Description:

1.0 First version (16#100)

A-6 Standard WAGO-I/O-PRO 32


Appendix A – Additional Libraries

STRING_COMPARE

WAGO-I/O-PRO 32 Library elements


Category: STRING function
Name: STRING_COMPARE
Type: Function X Function block Program
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers

Input parameters: Data type: Comments:


STR1 STRING A character string with max. 255
characters.
STR2 STRING A character string with max. 255
characters.

Return value: Data type: Comments:


STRING_COMPARE BOOL Returns the results of the comparison.

Graphic display:

Time behaviour:

Function description:

Using this function the programmer can compare two character strings each with
max. 255 characters. If they coincide function feeds back TRUE. If the character
chains are, however, not identical FALSE is feedback.

WAGO-I/O-PRO 32 Standard A-7


STRING_TO_ASCIIBYTE

STRING_TO_ASCIIBYTE

WAGO-I/O-PRO 32 Library elements


Category: STRING function
Name: STRING_TO_ASCIIBYTE
Type: Function X Function block Program
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers

Input parameters: Data type: Comments:


str STRING A character string with max. 255
characters.

Return value: Data type: Comments:


STRING_TO_ASCIIBYTE BYTE The return value of the function is a
number of data type BYTE.

Graphic display:

Time behaviour:

Function description:

This function converts a character, from data type STRING to a character of data
type BYTE.

A-8 Standard WAGO-I/O-PRO 32


Appendix A – Additional Libraries

WAGO-I/O-PRO 32 Standard A-9


A-10 Standard WAGO-I/O-PRO 32

Você também pode gostar