DNR-X-1G Series RACKtangle and HalfRACK Systems
Chapter 4 61
Installation and Configuration
October 2018 www.ueidaq.com
508.921.4600
© Copyright 2018
United Electronic Industries, Inc.
DQCMD_RDCFG
This command returns the current configuration of the specified board(s):
int DAQLIB DqCmdReadCfg(int Iom, DQRDCFG pDQRdCfg[], uint32 maxsize, uint32*
entries)
int Iom // a pointer to the DQIOME structure
DQRDCFG pDQRdCfg[] // structure that contains board configuration
uint32 maxsize // number of DQRDCFG structures passed
uint32* entries // number of DQRDCFG structures returned
typedef struct (
uint8 DEV; // device (host fills this field)
uint8 ss; // subsystem (host)
uint32 status; // device status (device returns following fields)
uine32 cfg; // configuration, including clocks
uint32 rate; // clock divider in 15.5ns intervals
uint32 clsize; // size of the channel list
uint32 cl[]; // channel list - variable size
) DQRDCFG, *pDQRDCFG;
Note: Use device!=0x80 to indicate that this is the last device in the list.
DQCMD_RDSTS
This command returns the status of the IOM and each and every board in the
stack (upon request):
int DAQLIB DqCmdReadStatus (int Iom, uint8 *DeviceNum, uint32 *Entries,
uint32 *Status, uint32 *StatusSize)
Parameters:
int Iom // A pointer to the DQIOME structure
unit8 *DeviceNum // Array of board numbers to retrieve status
uint32 *Entries // Number of entries in DeviceNum array
uint32 *Status // Buffer to store values received from device
uint32 *StatusSize // Size of buffer, 32-bit chunks.
// Returns number of 32-bit values
// copied into Status
There are special device numbers to access status of various boards:
OxFE – returns IOM status and status of all boards (note that each board status
is expressed as four 32-bit words. Thus, the maximum size of status packets is
(4 + 14*4)*sizeof(uint32) = 240 bytes.
0x7F – returns IOM status only (four bytes)
0x0 . . .0xE – returns status of one of the boards
The status for each board consists of four 32-bit words, as follows:
/* status offsets into devob].status array */
#define STS_STATE(0) // state of the board
#define STS_POST(1) // post status
#define STS_FW(2) // firmware status
#define STS_LOGIC(3) // logic status
The first word is the state of the board – what mode of operation it is in, and the
lower 8-bits of the timestamp. If the 10 us timestamp does not change after each
call, the logic is in the inoperative state, as: