DioSetupIOConfiguration

Applies To

GX5150, GX5280, GX5290, GX5290e, GX5295, File

Purpose

Sets the I/O memory width and direction.

Syntax

DioSetupIOConfiguration (nHandle, nWidth, nDirection, pnStatus)

Parameters

Name

Type

Comments

nHandle

SHORT

Master or File board handle.

nWidth

SHORT

GX5150:

0. 32 bits wide

1. 16 bits wide

2. bits wide

GX5283:

0  32 bits wide, maximum number of steps is 128M, channels 0-31

1  16 bits wide, maximum number of steps is 256M, channels 0-15

2  8 bits wide, maximum number of steps is 512M, channels 0-7

3  4 bits wide, maximum number of steps is 1G, channels 0-3

4  2 bits wide, maximum number of steps is 2G, channels 0-1

5  1 bit wide, maximum number of  steps is 4G, channel 0

GX5292/GX5293/GX5292e/GX5293e/GX5295:

0. 32 bits wide, maximum number of steps is 64M, channels 0-31

1. 16 bits wide, maximum number of steps is 128M, channels 0-15

2. bits wide, maximum number of steps is 256M, channels 0-7

3. bits wide, maximum number of steps is 512G, channels 0-3

4. bits wide, maximum number of steps is 1G, channels 0-1

5. bit wide, maximum number of steps is 2G, channel 0

nDirection

SHORT

GX5150:

Selects whether the I/O Memory configured as input or output.

0  Input mode.

1  Output mode.

GX5280:

I/O Group channel direction bits 0-3. Each bit represents the direction of Group of 8 channels.

0  Input mode.

1  Output mode.

GX5290/GX5290e/GX5295:

Not applicable.

pnStatus

PSHORT

Returned status: 0 on success, negative number on failure.

Comments

The board must be in HALT state before calling this function.

The I/O memory width determines the number of I/O pins used for all steps for the specified board.

All not used I/O channels pins will be set to Tri-state.

The last setting of the I/O configuration is saved to the DIO.INI file, to be used whenever calling DioInitialize.

GX5150:

If Frequency Doubler I/O module is installed, then the function will check if the current setting is valid. If width was set to 2, then the function returns an error. Valid setting for the Frequency Doubler I/O module width are 1 (16 channels) and 2-(8 channels).

GX5283/GX5292/GX5293/GX5292e/GX5293e/GX5295:

The I/O memory width determines the number of I/O pins used for all steps for the specified board. If the I/O Memory width was set to Word or Byte, the remaining I/O pins will be set to Tri-state. Calling this function will reset the all the DIO boards in the domain and will clear all the commands.

GX5293/GX5293e: for frequencies above 100MHz the user must set the number of active I/O channels (wide) to be 16 or less, see the DioSetupIOConfiguration function for more details.

The last setting of the I/O configuration is saved to the GTDIO.INI file, to be used whenever calling DioInitialize.

Example

The following example sets the I/O memory width to 32-bit and the direction to input:

 

SHORT nStatus;

DioSetupIOConfiguration (nHandle, 0, 1, pnStatus):

 

See Also

DioGetIOConfiguration, DioGetErrorString