ChartScan Program Examples

Appendix D

 

 

Using the IEEE 488 SRQ with Alarms using ALAR2SRQ.BAS

The following program, ALAR2SRQ.BAS, in the EXAMPLES directory will set up the alarm system of the ChartScan and then use the IEEE 488 Service Request signal to asynchronously service the event. Although not necessary, it is good practice to reset the ChartScan at the beginning of your application by sending it the “*R” command and then waiting a few seconds.

CLS : PRINT “The ChartScan is resetting..”

PRINT #1, “OUTPUT 07;*RX”

SLEEP 4

To be certain that the reset was successful and the device is ready, serial poll the device until the proper status is returned.

WHILE (S% AND 4) = 0

‘Wait for Ready

PRINT #1, “SPOLL 07"

INPUT #2, S%

WEND

The Personal488 IEEE 488 driver and interface card provides a means for QuickBASIC to asynchronously service the IEEE 488 SRQ interrupt through its ON PEN GOSUB command. When an SRQ is detected by the Personal488 interface, program control is automatically vectored to the subroutine named in the ON PEN GOSUB command. To activate this feature in the Personal488 driver, the command ARM SRQ must be sent to the driver.

ON PEN GOSUB AlarmHandler

PEN ON

PRINT #1, “ARM SRQ”

The M1 command instructs the unit to assert the SRQ signal when it is in an alarm state.

PRINT #1, “OUTPUT 07;M1X”

The C command is used twice to configure multiple channels as part of the scan group and to assign them a type. Additionally, the alarm parameters for channels one and two are used to activate the alarms for those channels. Although 16 channels are included in the scan group, only 2 are armed for alarming.

After the C command is issued, the ChartScan is now completely armed for alarming. In our example, levels above 25 or below 1 for channels 1 or 2 will cause a system alarm. Since the M1 command has already been issued, this will also result in an IEEE 488 SRQ assertion.

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

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

PRINT #1, “OUTPUT 07;C1-2,3,1,25,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 temperature input channel to the digital alarm bit.

PRINT #1, “OUTPUT 07;A1,1X” PRINT #1, “OUTPUT 07;A2,2X” PRINT #1, “OUTPUT 07;A3,3X”

‘Assign channel 1 to alarm 1 ‘Assign channel 2 to alarm 2 ‘Assign channel 3 to alarm 3

The example now processes a loop waiting for a key press to exit. If an SRQ is detected by the IEEE 488 driver, program control will be automatically vectored to the AlarmHandler subroutine, then returned to the wait loop again.

PRINT “The program is continuously detecting Alarms ..”

PRINT “Hit a key to Quit..”

WHILE INKEY$ = “”: WEND

END

In the alarm service routine, the unit is first SPOLL’d to clear the SRQ signal. Using the string returned by the O? query, which gets the status of the digital output lines, the channel number that is in the alarm state can be identified.

D-8

ChartScan User’s Manual

Page 245
Image 245
Omega Vehicle Security 1400 manual Using the Ieee 488 SRQ with Alarms using ALAR2SRQ.BAS, On PEN Gosub AlarmHandler

1400 specifications

The Omega Vehicle Security 1400 stands out as a premier solution for vehicle protection, offering a blend of advanced technology and user-friendly features. With the increasing rise of vehicle thefts, incorporating a robust security system has become essential for vehicle owners. The Omega 1400 aims to address these concerns effectively, ensuring peace of mind for users.

One of the key features of the Omega Vehicle Security 1400 is its sophisticated alarm system. The device is equipped with a motion sensor that activates the alarm when unauthorized movement is detected. This feature provides an added layer of protection, alerting owners to potential threats even when they are away from their vehicles. Additionally, the system comes with multiple sensors that monitor doors and trunk openings, fortifying security against tampering.

A standout component of the Omega 1400 is its remote control functionality, which allows users to arm and disarm the alarm with ease. Featuring a user-friendly remote, drivers can secure their vehicles from a distance, ensuring convenience and accessibility. The remote not only operates the alarm system but also integrates a panic button, which can be used in emergency situations to deter potential threats.

The Omega Vehicle Security 1400 is also designed with cutting-edge technology, offering compatibility with smartphone applications. This innovation enables users to monitor their vehicles in real-time, providing alerts directly to their mobile devices. Users can check the status of their vehicle, adjust settings, and receive notifications if the alarm is triggered, ensuring they are always connected to their vehicle's security.

Another remarkable characteristic of the Omega 1400 is its built-in GPS tracking capability. In the unfortunate event of a theft, the GPS feature allows vehicle owners to track the location of their vehicle, increasing the chances of recovery. This technology proves invaluable for users who prioritize the safety of their assets.

Additionally, the Omega Vehicle Security 1400 supports a robust battery backup system. This ensures that the alarm remains functional even if the vehicle's power supply is compromised. The reliability and durability of this security system make it a worthy investment for anyone looking to safeguard their vehicle.

In summary, the Omega Vehicle Security 1400 brings together advanced alarm technologies, remote access, GPS tracking, and reliable power support, creating a comprehensive security solution tailored for modern vehicle owners. Each feature has been designed with user convenience and vehicle protection in mind, making it a top choice in the vehicle security landscape.