User guide

54
6000 Series Programmer's Guide
DLL Functions for
Visual Basic
(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: Declare Function request_status% Lib "______.dll" (ByVal address%)
“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 page 56 for fast status structure.
Syntax: Declare Sub set_pointer Lib "______.dll" (ByVal address%, ByVal status_offset%)
“address”............ Board address of the 6000 controller (must be evenly divisible by 8).
“status_offset”..... Offset into fast status area.
Return Value: NONE
DLL Function: read_status
Description: Fetch a fast status data item (4 bytes) pointed to by set_pointer. See set_pointer.
Syntax: Declare Sub read_status Lib "______.dll" (ByVal address%, status_high%, status_low%,
status&)
“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: Declare Function IsAT6400Ready% Lib "______.dll" (ByVal address%)
“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: Declare Sub SetTimeout Lib "______.dll" (ByVal timeout&)
“timeout”...... Timeout value in milliseconds. A value of zero sets the timeout to infinity.
Return Value: NONE
DLL Function: Delay
Description: Time delay in milliseconds.
Syntax: For WN956000.DLL and NT6000.DLL:
Declare Sub Delay Lib "______.dll" (ByVal timedelay%)
For WIN6400.DLL:
Declare Sub Delay Lib "______.dll" (ByVal timedelay&)
“timedelay”..... Time delay in milliseconds.
Return Value: NONE