DioTrig

Applies To

GC5050, GX5050, GX5055, GX5150, GX5280, GX5290, GX5290e, GX5295

Purpose

Triggers the specified Master board and change its state from PAUSE to RUN.

Syntax

DioTrig (nMasterHandle, pnStatus)

Parameters

Name

Type

Comments

nMasterHandle

SHORT

Master board handle.

pnStatus

PSHORT

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

Comments

DioTrig overrides all other trigger conditions previously set. The external trigger control line or the external event lines can also change the board state to RUN.

When the board is in the RUN state, the external pause control line or the P register can be used to switch the state to PAUSE. If a trigger mode is set and the trigger condition is met, calling this function will immediately cause the board to switch to the RUN state.

The board must be in PAUSE mode prior calling this function; otherwise, the function returns an error.

Example

The following example, for a GX5050 board, arms and triggers the board, and waits until the board is in a HALT state:

 

SHORT nStatus;

WORD wData;

DioArm (nMasterHandle, &nStatus);

DioTrig (nMasterHandle, &nStatus);

do

DioReadStatusRegister (nMasterHandle, &wData, &nStatus);

while (wData & 0x1C ==0); // Mask the STATE bits

 

See Also

DioArm, DioHalt, DioReadStatusRegister