User guide
60
6000 Series Programmer's Guide
DLL Functions for
Visual C++
(continued)
DLL Function: request_status
Description: Tell the controller to update the information in its fast status area. This function will wait until the
fast status area has been updated. See set_pointer.
Syntax: wn956000.dll & nt6400.dll......... short WINAPI request_status(short address)
win6400.dll................................ int FAR PASCAL request_status(WORD address)
Variable: “address”.......... Board address of the 6000 controller card (must be evenly divisible by 8).
Return Value: “-1” indicates that the operating system is not loaded.
“-2” indicates that the function has timed out (see SetTimeout).
DLL Function: set_pointer
Description: Set a pointer to the data to be retrieved from the fast status area.
See header file (WN956000.H, NT6400.H, or WIN6400.H) for fast status structure.
Syntax: wn956000.dll &
nt6400.dll .......... void WINAPI set_pointer(short address, short status_offset)
win6400.dll....... void FAR PASCAL set_pointer(WORD address, WORD status_offset)
Variables: “address”.......... Board address of the 6000 controller (must be evenly divisible by 8).
“status_offset”.. Offset into fast status area. See header file for fast status structure.
Return Value: NONE
Example // request fast status update
request_status(address)
// point to block 5 of fast status area
set_pointer(address, INPUT_STATUS);
// fetch TIN status
read_status(address, &word_high, &word_low, &fast_status);
dwProgIn = fast_status;
// fetch TOUT status
read_status(address, &word_high, &word_low, &fast_status);
dwProgOut = fast_status;
// fetch TLIM and TINO status
read_status(address, &word_high, &word_low, &fast_status);
wLimits = word_high;
wOther = word_low;
// fetch TANV status
read_status(address, &word_high, &word_low, &fast_status);
dwAnalog = fast_status;
DLL Function: read_status
Description: Fetch a fast status data item (4 bytes) pointed to by set_pointer. See set_pointer.
Syntax: wn956000.dll &
nt6400.dll .......... void WINAPI read_status (short address, LPWORD status_high, LPWORD
status_low, LPDWORD status)
win6400.dll....... void FAR PASCAL read_status (WORD address, LPWORD status_high,
LPWORD status_low, LPDWORD status)
Variables: “address”.......... Board address of the 6000 controller card (must be evenly divisible by 8).
“status_high”.... Pointer to word that will contain the high word of the retrieved fast status data.
“status_low”..... Pointer to word that will contain the low word of the retrieved fast status data.
“status”............. Pointer to a double word that will contain the retrieved fast status data item.
Return Value: NONE
DLL Function: IsAT6400Ready
Description: Check to see if the controller's input buffer (256 bytes) is empty, thereby being ready to receive
another command.
Syntax: wn956000.dll & nt6400.dll....... BOOL WINAPI IsAT6400Ready(short address)
win6400.dll.............................. BOOL FAR PASCAL IsAT6400Ready(WORD address)
Variable: “address”.......... Board address of the 6000 controller card (must be evenly divisible by 8).
Return Value: Returns TRUE (non-zero value) if 6000 input buffer is empty. Otherwise, returns FALSE (“0”).
DLL Function: SetTimeout
Description: Set the timeout value for SendAT6400Block, GetFastStatus, and GetExFastStatus, and
Request_Status.
Syntax: wn956000.dll & nt6400.dll....... void WINAPI SetTimeout (DWORD timeout)
win6400.dll.............................. void FAR PASCAL SetTimeout (DWORD timeout)
Variable: “timeout”........... Timeout value in milliseconds. A value of zero sets the timeout to infinity.
Return Value: NONE










