beautypg.com

Getmanybit, Getnumloggedevents, Xcmd's & xfcn's – Det-Tronics Mac - w/Supercard User Manual

Page 68

background image

G

ET

M

ANY

B

IT

G

ET

N

UM

L

OGGED

E

VENTS

XCMD's & XFCN's

4.4

95-8434

Refer to the section on addressing for the correct format of the address. A
string is returned that contains one character for each of the addresses
that have been requested. Each character is a “1” or a “0,” i.e.
011100010101.

GetManyBit(PLCNum,address,address,address,etc)

Example:

on idle

put GetBit(27,”43073/1”,”43120/5”) into temp

if the 1 char of temp= 1 then

do something

else

do something else

if the 2 char of temp= 0 then

do something

else

do something else

end idle

Example:

on openCard

put GetNumLoggedEvents() into theNumber

end openCard

This command and “GetALoggedEvent” can be used in conjunction to
display all or part of the events logged. The following is one example of
scripting.

on startUp

global lastEventCount

put 0 into lastEventCount

end startUp

on openCard

global lastEventCount

if lastEventCount = 0 then

put “” into card field AlarmField

— the “AlarmField” is multi-line

end if

put GetNumLoggedEvents() into theNumber

— how many events are there total

put theNumber - lastEventCount into numberToGet

— how many do we need to get

if numberToGet > 0 then

set the cursor to watch

— show the watch

This manual is related to the following products: