23.11.2012 Views

2 Visual Components Manuals

2 Visual Components Manuals

2 Visual Components Manuals

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction to <strong>Visual</strong> <strong>Components</strong> 2.3<br />

system controls the monitoring/recording and display of these alarms (appearance and format). Writing to an<br />

alarm history list is also an option.<br />

4.11.1 Notes for <strong>Visual</strong> <strong>Components</strong> Version 2.0 Users<br />

Beginning with Automation Studio 2.2, tags (variables) can now be inserted in alarm texts. See Advanced Text<br />

Group Formatting.<br />

Advancements in the alarm system were made in Automation Software version 2.1. The following sections<br />

provide information about all alarm system innovations.<br />

Support for an alarm printer on the parallel interface is new in <strong>Visual</strong> <strong>Components</strong> 2.1. See Printing Alarms.<br />

In addition, <strong>Visual</strong> <strong>Components</strong> 2.1 supports an alarm history log. The number of stored alarms can be set. See<br />

Configuring the Alarm System.<br />

4.11.2 Preparations<br />

In order to use the <strong>Visual</strong> <strong>Components</strong> alarm system, a few things have to be prepared in the project.<br />

The following steps must be carried out:<br />

• Defining the Alarm Bit Field<br />

• Enabling the Alarm System<br />

These steps are explained in the following.<br />

4.11.2.1 Defining the Alarm Bit Field<br />

Information about which alarms are currently active must first be present for the alarm system (i.e. which states<br />

are occuring at the moment).<br />

The <strong>Visual</strong> <strong>Components</strong> alarm system uses one bit for each individual alarm to indicate if it is active or not. This<br />

bit is defined as a variable of type BOOL in the application task.<br />

All alarms that belong to a group must be arranged one after another in an array. The first alarm must be set<br />

with Index 0 of the array. The rest of the alarms follow directly in order.<br />

Division into groups takes place by the user according to logical groupings within the machine or equipment.<br />

Grouped alarms are constantly checked within <strong>Visual</strong> <strong>Components</strong> using the same attention to modification.<br />

Alarms which should be scanned frequently should be arranged into a single group.<br />

Depending on the programming language used in the project, the array for the alarm information is created as<br />

follows:<br />

4.11.2.1.1 ANSI C<br />

In the ANSI C programming language, the alarm bit array can be defined like every other PV in the C source file.<br />

The corresponding entry in the Automation Studio variable declaration dialog box is made automatically.<br />

The following source code can be used to create an alarm bit array for 50 alarms:<br />

#include <br />

#include <br />

_GLOBAL BOOL alarmbit[50];<br />

The alarm bit array, like every other variable entered in <strong>Visual</strong> <strong>Components</strong>, must be defined as either locally<br />

(_LOCAL) for the application task or globally (_GLOBAL) for the controller project, as shown above. Pure ANSI<br />

C variables cannot be used.<br />

4.11.1 Notes for <strong>Visual</strong> <strong>Components</strong> Version 2.0 Users 397

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!