GX5296
Allocates system memory with the specified vector size for the board’s 32 channels, and fill it with predefine opcode values or data from the GX5296 board.
GtDio6xMultiSiteSetSiteArray (nHandle, nMode, lVectorSize, lBoardVectorStart, cFillOpCode, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Session identifier:Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization. |
nMode |
SHORT |
Site number can be 0 (GTDIO6X_MULTI_SITE_FIRST_SITE_NUM) to 31 (GTDIO6X_MULTI_SITE_MAX_SITE_NUM).0. GTDIO6X_MULTI_SITE_MEMORY_FILL_USER_OPCODE: the function initializes the allocated memory with cFillOpCode1. GTDIO6X_MULTI_SITE_MEMORY_FILL_FROM_DIO: the function copies lVectorSize data from the DIO board memory to the Driver Memory stating at the specified lBoardVectorStart value. |
lVectorSize |
LONG |
Specifies the required allocated system memory length to hold all 32 channels’ data. |
lBoardVectorStart |
LONG |
If nMode = GTDIO6X_MULTI_SITE_MEMORY_FILL_FROM_DIO, it specifies the GX5296 dio BOARD stating memory address to read form and copy to the system memory. Otherwise ignored. |
cFillOpCode |
CHAR |
If nMode = GTDIO6X_MULTI_SITE_MEMORY_FILL_USER_OPCODE, it specifies the opcode that the allocated system memory will be filled with. Otherwise ignored. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
The function allocates system memory with the specified vector size for the board’s 32 channels, and fill it with predefine opcode values or data from the GX5296 board.
By allocating a system memory, writing all the required memory data to it, and write back to the DIO physical memory instead of writing directly to the DIO memory, we achieve a much faster execution time.
Note: The GtDio6xMultiSiteXXX() APIs provides the functionality required for efficient multi-site testing. By enabling parallel testing of multiple Devices Under Test (DUTs) simultaneously.
The following example sets steps 0 vector length and initialize System Memory with GTDIO6X_OPCODE_DISABLE_CHANNEL and 4096 vectors length:
Note: see GtDio6xMultiSiteGetRealTimeCompareFailures() API for a complete example.
SHORT nStatus;
LONG lVectorOffset , lVectorLength;
// Step 0: assign 4096 Vectors to Step 0, start from offset 0
lVectorLength = 4096;
lVectorOffset = 0;
GtDio6xStepSetVectorCount(nHandle, 0, lVectorOffset, lVectorLength, &nStatus);
CheckStatus(nStatus);
GtDio6xStepSetLast(nHandle, 0, TRUE, &nStatus);
CheckStatus(nStatus);
// Initialize System Memory with GTDIO6X_OPCODE_DISABLE_CHANNEL and 4096 vectors length
GtDio6xMultiSiteSetSiteArray(nHandle, GTDIO6X_MULTI_SITE_MEMORY_FILL_USER_OPCODE, lVectorLength, 0, GTDIO6X_OPCODE_DISABLE_CHANNEL, &nStatus);
CheckStatus(nStatus);
GtDio6xMultiSiteDeleteAllSites, GtDio6xMultiSiteGetChannelList, GtDio6xMultiSiteGetRealTimeCompareFailures, GtDio6xMultiSiteGetSiteChannelCount , GtDio6xMultiSiteGetSiteList, GtDio6xMultiSiteGetSiteCount , GtDio6xMultiSiteSetChannelList , GtDio6xMultiSiteWriteSystemMemoryToBoard , GtDio6xMultiSiteWriteVectorMemoryToSystemMemory, GtDio6xGetErrorString