Sensoray 2600 User Manual
Page 65

Sensoray 2600 Programming Guide
61
Gateway Action Scheduling
Prototype:
u32 S26_Sched2653_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.9 ms.
Example:
// Get all programmed SSR driver states from the 2653 at MM number 0, IOM port 9.
u8 states[2];
void *x = S26_SchedOpen( 0, 1 );
S26_Sched2653_GetOutputs( x, 9, states );
S26_SchedExecute( x, 1000, 0 );
7.10.5 S26_Sched2653_GetPwmRatio()
Function:
Schedules the fetching of the PWM ratio for one SSR channel on a model 2653 IOM.
Prototype:
u32 S26_Sched2653_GetPwmRatio( XACT x, IOMPORT IomPort, u8 chan, u8 *OnTime, u8 *OffTime );
Returns:
Error code as described in section 5.5. Zero is returned if the operation was successful.
Benchmark: 0.9 ms.
Example:
// Fetch the PWM ratio for SSR channel 5 on the 2653 at MM number 0, IOM port 2.
u8 ontime;
u8 offtime;
void *x = S26_SchedOpen( 0, 1 );
S26_Sched2653_GetPwmRatio( x, 2, 5, &ontime, &offtime );
S26_SchedExecute( x, 1000, 0 );
7.10.6 S26_Sched2653_SetModes()
Function:
Schedules the programming of the operating modes for all SSR channels on a model 2653 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.
states
u8 *
Pointer to a 2-byte application buffer that is to receive the programmed states of the
SSR output drivers. The first byte corresponds to channels 0 (lsb) to 7 (msb), and the
second byte to channels 8 (lsb) to 15 (msb). Any bit set to one indicates the associated
channel is programmed to the active state; zero indicates 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.
chan
u8
The SSR channel number that is to be queried. Legal values range from 0 to 7.
OnTime
u8 *
Pointer to a 1-byte application buffer that is to receive the programmed PWM on time
expressed in 2 msec increments.
OffTime
u8 *
Pointer to a 1-byte application buffer that is to receive the programmed PWM off time
expressed in 2 msec increments.