Sensoray 2600 User Manual

Page 43

Advertising
background image

Sensoray 2600 Programming Guide

39

Gateway Action Scheduling

Benchmark: 0.8 ms.

Notes:

This function, as well as

S26_Sched2612_SetVoltages()

, should be called before calibrating or acquiring

digitized data from an analog input channel. Digitized data may be fetched from the 2612 immediately after calling
this function; no delay is required.

Example:

// Set measurement mode on the 2612 at MM number 0, IOM port 10, channel 2.

// Set the OSR to 32768 and enable the speed multiplier.

void *x = S26_SchedOpen( 0, 1 );

S26_Sched2612_SetMode( x, 10, 2, OSR_32768 | MODE_2X );

S26_SchedExecute( x, 1000, 0 );

7.6.4 S26_Sched2612_SetVoltages()

Schedules the programming of all power output channels on a model 2612 IOM.

Prototype:

u32 S26_Sched2612_SetVoltages( XACT x, IOMPORT IomPort, u8 volts );

Returns:

Error code as described in section 5.5. Zero is returned if the operation was successful.

Benchmark: 0.3 ms.

Notes:

This function establishes the power output voltages on all channels. These output voltages are typically used to
supply excitation to sensors such as strain gauges.

This function, as well as

S26_Sched2612_SetMode()

, should be called before calibrating or acquiring digitized

data from an analog input channel. Since a change in the output voltage will cause a step change in the associated
input channel’s applied voltage, there will be a delay of one conversion time before valid digitized data becomes
available.

Example:

// Set reference voltage on the 2612 at MM number 0, IOM port 10:

// channel 0 to 2V, channel 1 to 1.25V, channel 2 to 5V and channel 3 to 3V.

void *x = S26_SchedOpen( 0, 1 );

S26_Sched2612_SetVoltages( x, 10,

REF_OUT_2V |

( REF_OUT_1V << 2 ) |

( REF_OUT_5V << 4 ) |

( REF_OUT_3V << 6 )

);

S26_SchedExecute( x, 1000, 0 );

7.6.5 S26_Sched2612_GetValues()

Schedules the fetching of the digitized values of all analog input channels on model 2612 IOM.

Parameter

Type

Description

x

void *

Transaction handle obtained from S26_SchedOpen().

IomPort

u8

The IOM port number (on the MM) to which the target IOM is connected.

volts

u8

A collection of four, two-bit fields. Each field specifies the output voltage for a power output
channel.

Two-bit field for each channel has to be set to one of the REF_OUT_xV values. Bits 0,1 are
responsible for channel 0, bits 2,3 - for channel 1, bits 4,5 - for channel 2 and bits 6,7 - for
channel 3.

Advertising