beautypg.com

6 strain/pressure gage functions – Sensoray 618 User Manual

Page 15

background image

Sensoray Model 618/619 Smart A/D

13

Programming

negative with respect to LowLimit, while the channel
alarm is armed.

The HighLimit and LowLimit arguments are
expressed in the same engineering units used by the
sensor that is connected to the target channel. For this
reason, the sensor type must be declared (see Section
5.3.1) before invoking this function.

Suppose, for example, the target channel has been
previously configured for a type K thermocouple. By
specifying LowLimit and HighLimit values of 110.0
and 126.0, respectively, and then arming the channel
alarms (Section 5.5.3), an alarm will sound if the
channel’s thermocouple temperature wanders outside the
range +110 to +126°C.

The HighLimit value should always be positive with
respect to the LowLimit value, otherwise an alarm will
sound immediately when alarms are armed.

Alarm limit values are indeterminate after a board reset.
Channel alarm limit values should be set by this function
before arming the channel alarms.

5.5.3 SetAlarmEnable

Enables or disables limit violation detection for the
specified channel. The ChannelNumber parameter
designates the target channel, and the boolean
LimitEnable

argument specifies whether alarm

sounding is to be permitted (i.e., the channel is to be
armed) on the target channel.

Channel alarm limit values should be set (Section 5.5.2)
before invoking this function.

By default, alarms are disabled on all channels after a
board reset. In addition, individual channel alarms are
disabled in response to any of the following events:

• The client explicitly disables an alarm by calling this

function with LimitEnable set to false.

• An alarm sounds on the channel. This prevents the

alarm from sounding again after the client has
acknowledged the alarm with the GetAlarms function.

• A new sensor type is declared for a channel. This not

only disables the channel alarm, but also renders the
channel’s limit values indeterminate.

5.5.4 GetAlarms

Fills an array with the alarm status of all channels on a
Smart A/D board and restores any sounding channels to
the Disabled alarm state.

The AlarmStatus argument is a pointer to an
application array which is to receive the alarm status.

The returned boolean value, AlarmSounding,
indicates whether any alarms were sounding when this
function was called. It is obviously not necessary to
evaluate the contents of the AlarmStatus array if
AlarmSounding

returns false.

5.6 Strain/Pressure Gage Functions

The strain/pressure gage functions discussed in this
section are applicable only to sensor channels that have
been configured for gages. API gage functions that are
directed to non-gage channels (channels which have not
been declared to be the strain/pressure gage sensor type)
will be ignored.

After a board reset, you must configure any channels that
will be connected to strain or pressure gages. Follow this
procedure to configure a sensor channel for operation
with a gage:

• Call the SetSensorType function to declare that the

sensor channel will be connected to a gage.

• Calibrate the gage. The first time this is done, you

must use the SetGageZero and SetGageSpan functions.
If this is not the first gage calibration for the target
channel, you may optionally use the SetGageCal
function, or you may continue to use the SetGageZero
and SetGageSpan functions.

5.6.1 SetGageZero

Declares a zero-load condition for a strain/pressure gage
channel.

This function tells the Smart A/D that there is presently
no load applied to the target channel’s gage. The Smart
A/D registers this condition and uses it as a normalization
reference for all subsequent measurements on the target
channel.

Arguments:

ChannelNumber

LimitEnable

Returns:

void

Arguments:

*AlarmStatus

Returns:

AlarmSounding

Arguments:

ChannelNumber

Returns:

void

This manual is related to the following products: