Sensoray 2600 User Manual

Page 61

Advertising
background image

Sensoray 2600 Programming Guide

57

Gateway Action Scheduling

Prototype:

u32 S26_Sched2652_GetModes( XACT x, IOMPORT IomPort, u8 *modes );

Returns:

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

Benchmark: 0.8 ms.

Example:

// Get all SSR channel operating modes from the 2652 at MM number 0, IOM port 2.

u8 modes;

void *x = S26_SchedOpen( 0, 1 );

S26_Sched2652_GetModes( x, 2, &modes );

S26_SchedExecute( x, 1000, 0 );

7.9.4 S26_Sched2652_GetOutputs()

Function:

Schedules the fetching of the programmed states of all eight SSR drivers on a model 2652 IOM.

Prototype:

u32 S26_Sched2652_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 SSR driver states from the 2652 at MM number 0, IOM port 9.

u8 states;

void *x = S26_SchedOpen( 0, 1 );

S26_Sched2652_GetOutputs( x, 9, &states );

S26_SchedExecute( x, 1000, 0 );

7.9.5 S26_Sched2652_GetPwmRatio()

Function:

Schedules the fetching of the PWM ratio for one SSR channel from a model 2652 IOM.

Prototype:

u32 S26_Sched2652_GetPwmRatio( XACT x, IOMPORT IomPort, u8 chan, u8 *OnTime, u8 *OffTime );

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.

modes

u8 *

Pointer to a 1-byte application buffer that is to receive the channel mode info. The
byte indicates the operating modes for SSR channels 0 to 7. Each bit is associated
with a channel number. For example, bit 4 is associated with channel 4. A bit is set to
one when operating in the PWM mode, or to zero in the Standard mode.

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
SSR output drivers. Each bit is associated with one SSR channel. For example, bit 7
is associated with channel 7. Any bit set to one indicates the associated channel is
programmed to the active state; any bit set to zero indicates the channel is programmed
to the inactive state.

Parameter

Type

Description

x

void *

Transaction handle obtained from S26_SchedOpen().

Advertising