05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

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.

CONFIGURING THE COLOR VIRTUAL HMI<br />

PRIMITIVE DESCRIPTIONS<br />

The last step is then to write the program so the proper information is displayed depending on<br />

the alarm selected. The code sample below illustrates an example with 2 tags and different<br />

alarm numbers.<br />

// When the program is called, Data is transferred in Arg1<br />

int Alarm = Arg1 >> 16;<br />

int Tag = Arg1 & 0xFFFF;<br />

// Local integer assigned<br />

// with alarm number<br />

// Local integer assigned<br />

// with tag index number<br />

switch( Tag )<br />

// Look a the tag index<br />

{<br />

case 0: // Tag index is 0<br />

if( Alarm == 1 ) // Alarm number is 1<br />

{<br />

GotoPage(Help1);<br />

}<br />

break;<br />

case 9: // Tag index is 9<br />

if( Alarm == 2 ) // Alarm number is 2<br />

{<br />

GotoPage(Help2);<br />

}<br />

break;<br />

}<br />

default:<br />

GotoPage(NoHelp);<br />

// Tag index not found<br />

In this sample, if alarm 1 of the tag with index 0 is selected in the alarm viewer and the<br />

operator presses the Help button, the display will go to the page with name Help1. If alarm 2<br />

of the tag with index 9 is selected in the alarm viewer and the operator presses the Help<br />

button, the display will go to the page with name Help2.<br />

In the event another alarm is selected and the Help button is pressed, the display will go to the<br />

page with name NoHelp.<br />

Note: GotoPage() functions can be replaced by ShowPopup() functions to display a popup<br />

window instead of a page.<br />

Note: The index number of a tag can be found in the status bar in the Data Tags when a tag is<br />

selected.<br />

THE ALARM TICKER PRIMITIVE<br />

The Alarm Ticker primitive scrolls through the active alarms in the system. It<br />

takes up a single line, and is typically placed at the bottom of the display, perhaps<br />

on every page. It does not allow the operator to accept the alarms.<br />

REVISION 6 PAGE 195

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

Saved successfully!

Ooh no, something went wrong!