1 type-specific errors – Sensoray 2600 User Manual
Page 63

Sensoray 2600 Programming Guide
59
Gateway Action Scheduling
Returns:
Error code as described in section 5.5. Zero is returned if the operation was successful.
Benchmark: 0.8 ms.
Example:
// Program all SSR driver states on the 2652 at MM number 0, IOM port 9.
u8 states = 0x5A;
// The desired relay states.
void *x = S26_SchedOpen( 0, 1 );
S26_Sched2652_SetOutputs( x, 9, &states );
S26_SchedExecute( x, 1000, 0 );
7.9.8 S26_Sched2652_SetPwmRatio()
Function:
Schedules the programming of the PWM ratio for one SSR channel on a model 2652 IOM.
Prototype:
u32 S26_Sched2652_SetPwmRatio( 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:
// Set the PWM ratio for SSR channel 5 on the 2652 at MM number 0, IOM port 2.
// PWM ratio = on for 20 msec, off for 30 msec.
void *x = S26_SchedOpen( 0, 1 );
S26_Sched2652_SetPwmRatio( x, 2, 5, 10, 15 );
S26_SchedExecute( x, 1000, 0 );
7.10 Model 2653 Solid-State Relay IOM
The functions in this section are used to schedule IOM actions for Model 2653 16-channel Solid-State Relay IOMs. These
functions are applicable only to Model 2653 IOMs. Any attempt to call these functions for other IOM types will result in a
GWERR_IOMTYPE
transaction error. Note that these functions only schedule IOM actions into a transaction; they do not cause the
actions to be immediately executed.
7.10.1 Type-Specific Errors
In addition to the common IOM status bit flags (
STATUS_RST
and
STATUS_CERR
), this IOM type supports the following
type-specific flags. If any of these flags are asserted, a transaction error of type
GWERR_IOMSPECIFIC
will be generated:
7.10.2 S26_Sched2653_GetInputs()
Function:
Schedules the fetching of the physical states of 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.
chan
u8
The SSR channel number that is to be programmed. Legal values range from 0 to 7.
OnTime
u8
PWM on time, expressed in 2 msec increments, to be programmed.
OffTime
u8
PWM off time, expressed in 2 msec increments, to be programmed.
Symbolic Name
Description
STATUS_2653_STRM
An error was detected in the serial data stream that is used to control the SSR
output drivers. This flag can be cleared by invoking a ClearStatus action.