B&B Electronics VFG3000 - Manual User Manual
Page 132

P
RIMITIVE
D
ESCRIPTIONS
V
LINX
F
IELDBUS
G
ATEWAY
M
ANAGER
U
SER
M
ANUAL
P
AGE
116
The last step is then to write the program so the proper information is displayed depending on
the alarm selected. The code sample below illustrates an example with 2 tags and different
alarm numbers.
// When the program is called, Data is transferred in Arg1
int Alarm = Arg1 >> 16;
// Local integer assigned
// with alarm number
int Tag = Arg1 & 0xFFFF;
// Local integer assigned
// with tag index number
switch( Tag )
// Look a the tag index
{
case 0:
// Tag index is 0
if( Alarm == 1 )
// Alarm number is 1
{
GotoPage(Help1);
}
break;
case 9:
// Tag index is 9
if( Alarm == 2 )
// Alarm number is 2
{
GotoPage(Help2);
}
break;
default:
// Tag index not found
GotoPage(NoHelp);
}
In this sample, if alarm 1 of the tag with index 0 is selected in the alarm viewer and the
operator presses the Help button, the display will go to the page with name Help1. If alarm 2
of the tag with index 9 is selected in the alarm viewer and the operator presses the Help
button, the display will go to the page with name Help2.
In the event another alarm is selected and the Help button is pressed, the display will go to the
page with name NoHelp.
Note: GotoPage() functions can be replaced by ShowPopup() functions to display a popup
window instead of a page.
Note: The index number of a tag can be found in the status bar in the Data Tags when a tag is
selected.
T
HE
A
LARM
T
ICKER
P
RIMITIVE
The Alarm Ticker primitive scrolls through the active alarms in the system. It
takes up a single line, and is typically placed at the bottom of the display, perhaps
on every page. It does not allow the operator to accept the alarms.