Omega Vehicle Security 1400 manual Print #1, Enter 07 Line Input #2, A$ Print A$, Else, END if

Models: 1400

1 273
Download 273 pages 33.71 Kb
Page 244
Image 244

Appendix D

ChartScan Program Examples

 

 

After the C command is issued, the ChartScan is now completely armed for alarming. In our example, levels above 18 or below 1 will cause a system alarm.

If the intent of the application was to use alarm levels to trigger an acquisition, only the following line would be required to arm the alarms to satisfy the trigger and/or stop events.

PRINT #1, “OUTPUT 07;C1-16,3,1,18,0X”

In addition to causing an internal system alarm state, the alarm conditions can also be attached to any one of the 16 digital output lines. The A command is used to assign the input channels to the digital alarm bit. The following line attaches channels 1 and 2 to digital output line number 1 in an OR’d fashion.

PRINT #1, “OUTPUT 07;A1-2,1X” ‘Assign channels 1 & 2 to alarm 1

S% = 0

WHILE (S% AND 4) = 0

PRINT #1, “SPOLL 07"

INPUT #2, S%

WEND

Using the string returned by the O? query, which gets the status of the digital output lines, the alarm state can be detected since bit 1 of the digital output was mapped into alarm channel 1 and 2. This example shows alarm detection handling when 2 or more channels have to be muxed into one single digital output bit. The “U11X” command shows each individual channel alarm status.

WHILE INKEY$ = “”

PRINT #1, “OUTPUT 07;O?X” PRINT #1, “ENTER 07" LINE INPUT #2, O$

IF MID$(O$, 2, 3) = “001" THEN

PRINT “Channel 1 OR 2 is in Alarm condition.” PRINT #1, “OUTPUT 07;U11X”

PRINT #1, “ENTER 07" LINE INPUT #2, A$

PRINT A$

IF MID$(A$, 5, 1) = “1" THEN

PRINT “The ChartScan’s CH 1 is now in an Alarm condition..”:

ELSE

PRINT “The ChartScan’s CH 1 is not in an Alarm condition..”

END IF

IF MID$(A$, 11, 1) = “1" THEN

PRINT “The ChartScan’s CH 2 is now in an Alarm condition..”:

ELSE

PRINT “The ChartScan’s CH 2 is not in an Alarm condition..”

END IF

END IF

WEND

ChartScan User’s Manual

D-7

Page 244
Image 244
Omega Vehicle Security 1400 manual Print #1, Enter 07 Line Input #2, A$ Print A$, Else, END if Wend