Sensoray 2600 User Manual

Page 59

Advertising
background image

Sensoray 2600 Programming Guide

55

Gateway Action Scheduling

Returns:

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

Benchmark: 0.8 ms.

Notes:

Each relay channel includes a monitoring circuit that enables the on-board processor to determine the physical state
of the relay coil driver. This scheduled action will fetch the monitored physical state of each coil driver, even if the
relay is not present or its coil winding has opened.

Coil driver states are acquired periodically at two millisecond intervals. Consequently, states may not
accurately reflect the state of a coil driver that has changed its physical state within the last two milliseconds.

Example:

// Get all relay driver coil states from the 2650 at MM number 0, IOM port 9.

u8 states;

void *x = S26_SchedOpen( 0, 1 );

S26_Sched2650_GetInputs( x, 9, &states );

S26_SchedExecute( x, 1000, 0 );

7.8.3 S26_Sched2650_GetOutputs()

Function:

Schedules the fetching of the programmed states of all eight relays on a model 2650 IOM.

Prototype:

u32 S26_Sched2650_GetOutputs( XACT x, IOMPORT IomPort, u8 *states );

Returns:

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

Benchmark: 0.8 ms.

Example:

// Get all programmed relay driver states from the 2650 at MM number 0, IOM port 9.

u8 states;

void *x = S26_SchedOpen( 0, 1 );

S26_Sched2650_GetOutputs( x, 9, &states );

S26_SchedExecute( x, 1000, 0 );

7.8.4 S26_Sched2650_SetOutputs()

Function:

Schedules the programming of all eight relays on a model 2650 IOM.

Prototype:

u32 S26_Sched2650_SetOutputs( XACT x, IOMPORT IomPort, u8 *states );

Returns:

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

Benchmark: 0.8 ms.

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.

states

u8 *

Pointer to a 1-byte application buffer that is to receive the programmed states of the
relay drivers. Each bit is associated with one relay channel. For example, bit 7 is
associated with relay channel 7. Any bit set to one indicates the associated channel is
set to the active state; any bit set to zero indicates the channel is set to the inactive
state.

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.

states

u8 *

Pointer to a 1-byte application buffer that contains the desired states of the relay
drivers. Each bit is associated with one relay channel. For example, bit 7 is associated
with relay channel 7. Any bit set to one indicates the associated channel is set to the
active state; any bit set to zero indicates the channel is set to the inactive state.

Advertising