DioArm

Applies To

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

Purpose

Switches the state from HALT to PAUSE of the specified Master board and enables trigger events.

Syntax

DioArm (nMasterHandle, pnStatus)

Parameters

Name

Type

Comments

nMasterHandle

SHORT

Master board handle.

pnStatus

PSHORT

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

Comments

DioArm must be called in order to switch state from HALT to PAUSE.

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

GX5150/GT5150:

GC5050, GX5050, GX5050, GX5150, GX5280, GX5290< GX5290e, GX5295:

All can be armed and trigger from any step (boundaries of 32-bit), in order to do so the user just needs to set the program counter before issuing the ARM command. The default starting step is zero.

Example

In the following example, the board will switch state from HALT to PAUSE, then RUN immediately when DioArm is called:

 

DioWriteXRegister (nMasterHandle, 0x000A, &nStatus);

DioSetupTriggerXEventSource (nMasterHandle, 1, &nStatus);

DioSetupTriggerMode (nMasterHandle, 1, &nStatus);

DioSetupTriggerDEvent (nMasterHandle, 0xFFFF, 0x000A, &nStatus);

DioArm (nMasterHandle, &nStatus);

 

See Also

DioTrig, DioHalt, DioReadStatusRegister, DioSetupTriggerMode, DioGetErrorString