DioGetCounterOverflowMode

Applies To

GX5150, GX5280, GX5290, GX5290e, GX5295

Purpose

Returns the program counter overflow mode.

Syntax

DioGetCounterOverflowMode (nMasterHandle, pnOverflowMode, pnStatus)

Parameters

Name

Type

Comments

nMasterHandle

SHORT

Master board or File board handle.

pnOverflowMode

PSHORT

Program counter over flow modes are:

  0       Overflow disabled.

  1       Overflow enabled.

pnStatus

PSHORT

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

Comments

If the overflow mode is enabled, then the sequencer will not stop at the last step, but instead wrap around to step zero. If the overflow mode is disabled, then the sequencer will go to HALT state at the last step of the memory.

Example

The following example enables the counter to over flow mode and returns the overflow mode setting:

 

SHORT nStatus, nOverflowMode;

DioSetupCounterOverflowMode (nMasterHandle, 1, &nStatus);

DioGetCounterOverflowMode (nMasterHandle, &nMode, &nStatus);

 

See Also

DioSetupCounterOverflowMode, DioSetupSequencerMode, DioGetSequencerMode, DioGetErrorString