1 type-specific errors, 2 analog input types – Sensoray 2600 User Manual

Page 30

Advertising
background image

Sensoray 2600 Programming Guide

26

Gateway Action Scheduling

{

if ( flags & mask )

printf( "Module detected at IOM port %d\n", i );

}

7.3.4 S26_Sched2601_SetWatchdog()

Function:

Schedules the programming of the gateway’s communication watchdog interval.

Prototype:

u32 S26_Sched2601_SetWatchdog( XACT x, u8 NumTenthSeconds );

Returns:

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

Benchmark: 0.1 ms.

Notes:

The MM employs a timer to detect the absence of communications between the Ethernet client and the gateway. If
no communications are received from the client within the specified time-out interval, the communication timer
will time-out and the MM will execute a hardware reset. This behavior ensures that all I/O will be turned off in the
event the client shuts down abnormally.

The watchdog interval defaults to 10 seconds (

NumTenthSeconds

= 100) in response to a MM reset. If the default

interval is suitable for the application, no SetWatchdog action need be issued to the MM.

Upon receipt of a SetWatchdog action, the new watchdog interval is effective immediately and the watchdog
timer is reset so that it will time out when the new interval elapses.

Example:

// Set the communication watchdog interval on MM number 0 to 3.5 seconds.

void *x = S26_SchedOpen( 0, 1 );

S26_Sched2601_SetWatchdog( x, 35 );

S26_SchedExecute( x, 1000, 0 );

7.4 Model 2608 Analog IOM

The functions in this section are used to schedule IOM actions for Model 2608 Analog IOMs. These functions are applicable only
to Model 2608 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.4.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 flag. If this flag is asserted, a transaction error of type

GWERR_IOMSPECIFIC

will be generated:

7.4.2 Analog Input Types

Several analog input types are supported by the middleware. Depending on the input type declared for an analog input channel, the
middleware will automatically configure the channel’s gain as required. For example, declaring any of thermocouple input types

Parameter

Type

Description

x

void *

Transaction handle obtained from S26_SchedOpen().

NumTenthSeconds

u8

MM communication watchdog interval, expressed in 100 millisecond
increments. For example, the value 25 specifies a 2.5 second watchdog
interval. Specify zero to disable the communication watchdog.

Symbolic Name

Description

STATUS_2608_CALERR

A problem was encountered when this IOM was initialized and, as a result, the calibration values stored in
the module’s EEPROM are not being used. Instead, default values are being used which may affect the
accuracy of analog inputs and outputs. This can be caused by any of the following:

* A communication fault occurred when fetching values from the IOM’s EEPROM.
* The EEPROM checksum is invalid.
* One or more calibration values stored in the EEPROM exceed tolerance limits.

Advertising