0% found this document useful (0 votes)
22 views16 pages

Visual Lib (M912220e)

This document contains information about libraries for visualizing sequences on the user LED of a WAGO PLC. It describes functions for getting the library version, setting and starting flashing sequences, and setting the index of the next sequence. The functions allow configuring and running light sequences on the user LED to provide visual status or feedback.

Uploaded by

rixano3420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views16 pages

Visual Lib (M912220e)

This document contains information about libraries for visualizing sequences on the user LED of a WAGO PLC. It describes functions for getting the library version, setting and starting flashing sequences, and setting the index of the next sequence. The functions allow configuring and running light sequences on the user LED to provide visual status or feedback.

Uploaded by

rixano3420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Appendix A – Additional Libraries

WAGO-I/O-PRO 32 Library

Visual.lib

Contents
VISUAL_VERSION....................................................................................2
SET_FLASHING_SEQUENCE ..................................................................4
SET_FLASHING_SEQUENCE_INDEX....................................................6
START_FLASHING_SEQUENCE.............................................................8
STOP_FLASHING_SEQUENCE .............................................................10
FLASHING_SEQUENCE (Data type) ......................................................12
LED_COLOURS (Data type) ....................................................................14

WAGO-I/O-PRO 32 Version 1.1.0 Mod_com.lib A-1


VISUAL_VERSION

VISUAL_VERSION

WAGO-I/O-PRO 32 Library elements


Category: User specific visualisation of the USR-LED
Name: VISUAL_VERSION
Type: Function X Function block Program
Library name: Visual.lib
Applicable to: All programmable fieldbus controllers except MODBUS

Input parameter: Data type: Comments:


EN BOOL FB execution control.
The operations defined in the function
body are performed with EN = TRUE.

Return value: Data type: Comments:


VISUAL_VERSION WORD Library version

Header:

FUNCTION VISUAL_VERSION: WORD


VAR_INPUT
EN: BOOL;
END_VAR

Graphic display:

Time behaviour:

A-2 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32


Appendix A – Additional Libraries

Function description:

The function VISUAL_VERSION returns the current version number of the library
Visual.lib. It is for information purposes only during PLC application development
time. During runtime it is possible to detect version conflicts.

Version: Description:
1.0 First version (16#100)
1.1 Bugfix for firmware versions which do not support the
Visual.lib. (16#101)
1.2 Adaptation to WAGO-I/O-PRO 32 in the version 2.2 or better.
(16#102)
5.0 Compatible with the WAGO-I/O-PRO 32 version 2.2 SR5. The
library works with the onlinechange feature.

WAGO-I/O-PRO 32 Version 1.1.0 Visual.lib A-3


SET_FLASHING_SEQUENCE

SET_FLASHING_SEQUENCE

WAGO-I/O-PRO 32 Library elements


Category: User specific visualisation of the USR-LED
Name: SET_FLASHING_SEQUENCE
Type: Function X Function block Program
Library name: Visual.lib
Applicable to: All programmable fieldbus controllers except MODBUS

Input parameter: Data type: Comments:


EN BOOL FB execution control.
The operations defined in the function
body are performed with EN = TRUE.
POINTER_TO_POINTER_ DWORD Address of the pointer to the
TO_ARRAY sequences.

Return value: Data type: Comments:


SET_FLASHING_ BOOL FALSE:
SEQUENCE Sequences were not set.
TRUE:
Sequences were set.

Header:

FUNCTION SET_FLASHING_SEQUENCE: BOOL


VAR_INPUT
EN: BOOL;
POINTER_TO_POINTER_TO_ARRAY: DWORD;
END_VAR

Graphic display:

A-4 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32


Appendix A – Additional Libraries

Time behaviour:

Function description:

The flashing sequence is set for the USR-LED using the


SET_FLASHING_SEQUENCE function. The sequences are written with the data
type FLASHING_SEQUENCE. If following an online-change the pointer on the
sequences or the array of the sequence is removed, the
STOP_FLASHING_SEQUENCE function must be polled in advance in order to avoid
an uncontrolled flashing of the LED. The GET_PROGRAM_ID function in the
System.lib library is used to recognise an online-change.
(As from version 3.0)

(* Example for setting four sequences


VAR
Param: ARRAY [0..3] OF FLASHING_SEQUENCE;
PointerToFS: POINTER TO FLASHING_SEQUENCE;
END_VAR

...Fill the array...


PointerToFS: =ADR(Param);
SET_FLASHING_SEQUENCE(1, ADR(PointerToFS));
*)

WAGO-I/O-PRO 32 Version 1.1.0 Visual.lib A-5


SET_FLASHING_SEQUENCE_INDEX

SET_FLASHING_SEQUENCE_INDEX

WAGO-I/O-PRO 32 Library elements


Category: User specific visualisation of the USR-LED
Name: SET_FLASHING_SEQUENCE_INDEX
Type: Function X Function block Program
Library name: Visual.lib
Applicable to: All programmable fieldbus controllers except MODBUS

Input parameter: Data type: Comments:


EN BOOL FB execution control.
The operations defined in the function
body are performed with EN = TRUE.
IMMEDIATE BOOL FALSE:
The new sequence is started following
the end of the current sequence.
TRUE:
The new sequence is started
immediately.
INDEX WORD Index of the new sequence

Return value: Data type: Comments:


SET_FLASHING_ BOOL FALSE: Index was not set.
SEQUENCE_INDEX TRUE: Index was set.

Header:

FUNCTION SET_FLASHING_SEQUENCE_INDEX: BOOL


VAR_INPUT
EN: BOOL;
IMMEDIATE: BOOL;
INDEX: WORD;
END_VAR

Graphic display:

A-6 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32


Appendix A – Additional Libraries

Time behaviour:

Function description:

The next index can be set for a sequence to be performed using the
SET_FLASHING_SEQUENCE_INDEX function.

WAGO-I/O-PRO 32 Version 1.1.0 Visual.lib A-7


START_FLASHING_SEQUENCE

START_FLASHING_SEQUENCE

WAGO-I/O-PRO 32 Library elements


Category: User specific visualisation of the USR-LED
Name: START_FLASHING_SEQUENCE
Type: Function X Function block Program
Library name: Visual.lib
Applicable to: All programmable fieldbus controllers except MODBUS

Input parameter: Data type: Comments:


EN BOOL FB execution control.
The operations defined in the function
body are performed with EN = TRUE.

Return value: Data type: Comments:


START_FLASHING_ BOOL FALSE: Sequence was not started.
SEQUENCE TRUE: Sequence was started.

Header:

FUNCTION START_FLASHING_SEQUENCE: BOOL


VAR_INPUT
EN: BOOL;
END_VAR

Graphic display:

Time behaviour:

A-8 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32


Appendix A – Additional Libraries

Function description:

The START_FLASHING_SEQUENCE function starts the sequences which were


previously set with the SET_FLASHING_SEQUENCE function. Start is made with
the first sequence, in as much as no other index is set with the
SET_FLASHING_SEQUENCE_INDEX function.

WAGO-I/O-PRO 32 Version 1.1.0 Visual.lib A-9


STOP_FLASHING_SEQUENCE

STOP_FLASHING_SEQUENCE

WAGO-I/O-PRO 32 Library elements


Category: User specific visualisation of the USR-LED
Name: STOP_FLASHING_SEQUENCE
Type: Function X Function block Program
Library name: Visual.lib
Applicable to: All programmable fieldbus controllers except MODBUS

Input parameter: Data type: Comments:


EN BOOL FB execution control.
The operations defined in the function
body are performed with EN = TRUE.

Return value: Data type: Comments:


STOP_FLASHING_ BOOL FALSE: Sequence was not stopped.
SEQUENCE TRUE: Sequence was stopped.

Header:

FUNCTION STOP_FLASHING_SEQUENCE: BOOL


VAR_INPUT
EN: BOOL;
END_VAR

Graphic display:

Time behaviour:

A-10 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32


Appendix A – Additional Libraries

Function description:

The STOP_FLASHING_SEQUENCE function stops the sequences which were


previously started with the START_FLASHING_SEQUENCE function. Following a
new start with the START_FLASHING_SEQUENCE function the sequence at which
the stop was made, will be restarted unless a new index was set with the
SET_FLASHING_SEQUENCE_INDEX function.

WAGO-I/O-PRO 32 Version 1.1.0 Visual.lib A-11


FLASHING_SEQUENCE (Data type)

FLASHING_SEQUENCE (Data type)

WAGO-I/O-PRO 32 Library elements


Category: User specific visualisation of the USR-LED
Name: FLASHING_SEQUENCE
Type: Data type X
Library name: Visual.lib
Applicable to: SET_FLASHING_SEQUENCE
Structure: Enumeration

Elements: Data type: Comments:


Colour LED_ Enumeration for LED colours
COLOURS
Frequency BYTE Flashing frequency of the LED.
If the value zero is set here the,
Relation is decive:
Relation >= 128: LED lit
Relation < 128: LED not lit
Relation BYTE 128*T_ON/T_OFF
Duration TIME Time interval for this sequence.
If the value zero is set here, the time
interval is unlimited.
If the 'Frequency' > 0, the 'Duration' is
rounded off internally to an integer
multiple of the period duration.
With the 'Frequency' > 0 and 'Duration'
<1/Frequency, the Duration is
interpreted as zero!
NextIndex WORD Index of the next sequence.
'NextIndex' may also refer to itself. The
indexes always start with zero.

Header:

TYPE FLASHING_SEQUENCE:
STRUCT
Colour: LED-COLOURS;
Frequency: BYTE;
Relation: BYTE;
Duration: TIME;
NextIndex: WORD;
END_STRUCT
END_TYPE

A-12 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32


Appendix A – Additional Libraries

Data type description:

This data type describes a flashing sequence. To describe several sequences an


array of any size must be created of this data type. Using the structure variable
'NextIndex' the next sequence in the array is referred to. The address of a pointer to
this structure is passed the SET_FLASHING_SEQUENCE function.

WAGO-I/O-PRO 32 Version 1.1.0 Visual.lib A-13


LED_COLOURS (Data type)

LED_COLOURS (Data type)

WAGO-I/O-PRO 32 Library elements


Category: User specific visualisation of the USR-LED
Name: LED_COLOURS
Type: Data type X
Library name: Visual.lib
Applicable to: FLASHING_SEQUENCE
Structure: Enumeration

Elements: Value: Comments:


GREEN 0 The color ’Green’ is used for the
corresponding sequence.

RED 1 The color ‘Red’ is used for the


corresponding sequence.

ORANGE 2 The color ’Orange’ is used for the


corresponding sequence.

Header:

TYPE LED_COLOURS:
(
GREEN: =0,
RED: =1,
ORANGE: =2
);
END_TYPE

Data type description:

This data type is a structure variable of the FLASHING_SEQUENCE data type.

A-14 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32


Appendix A – Additional Libraries

WAGO-I/O-PRO 32 Version 1.1.0 Visual.lib A-15


A-16 Visual.lib Version 1.1.0 WAGO-I/O-PRO 32

You might also like