User guide
Chapter 2. Communication
61
DLL Functions for
Visual C++
(continued)
DLL Function: Delay
Description: Time delay in milliseconds.
Syntax: wn956000.dll &
nt6400.dll........... void WINAPI Delay (int delay)
win6400.dll........ void FAR PASCAL Delay (DWORD delay)
Variable: “timedelay”....... Time delay in milliseconds.
Return Value: NONE
DLL Function: SendAT6400File
Description: Downloads a file of 6000 Series commands to a 6000 series product (one line at a time). Before
downloading the file, ERRDEF and ERROK are set to zero. After downloading the file, ERRDEF
and ERROK are set to their default values.
Syntax: wn956000.dll &
nt6400.dll........... short WINAPI SendAT6400File(HWND handle, short address, short
irqnum, LPSTR filename, LPSTR options)
win6400.dll........ int FAR PASCAL SendAT6400File(HWND handle, WORD address, int
irqnum, LPSTR filename, LPSTR options)
Variables: “handle”............. Parent window handle for SendAT6400File's message boxes.
For no parent, set to zero.
“address”.......... Board address of the 6000 controller card (must be evenly divisible by 8).
“irqnum”
............
Set to zero (used internally by Motion Architect for interrupt support).
“filename”......... Pointer to filename of file that is to be sent to the 6000 product.
“options”............ Pointer to options string. Set to null string ("") to get the message boxes.
Set to “/quiet” to keep SendAT6400File from displaying the hour glass cursor and
message boxes.
Return Value: “-1” indicates that the operating system is not loaded.
“-2” indicates that the function has timed out (see SetTimeout).
“-3” indicates that the file (“filename”) could not be opened.
SendAT6400File also returns the number of bytes sent to the 6000 product.
DLL Function: GetFastStatus
Description: Programs and fetches Blocks 1 through 6 of the 6000 fast status area.
See header file (WN956000.H, NT6400.H, or WIN6400.H) for fast status structure.
Syntax: wn956000.dll &
nt6400.dll........... short WINAPI GetFastStatus(WORD address, LPAT6400INFO
lpAT6400Info)
win6400.dll........ int FAR PASCAL GetFastStatus(WORD address, LPAT6400INFO
lpAT6400Info)
Variables: “address”.............. Board address of the 6000 controller card (must be evenly divisible by 8).
“lpAT6400Info”...... Fast status structure. See header file (WN956000.H, NT6400.H, or
WIN6400.H) for fast status structure – defined as “AT6400INFO”.
Return Value: “1” indicates no errors.
“-1” indicates that the operating system is not loaded.
“-2” indicates that the function has timed out (see SetTimeout).
GetFastStatus also returns the number of bytes sent to the 6000 product.
DLL Function: GetExFastStatus
Description: SERVOS ONLY: Programs and fetches Block 7 and Block 8 of the 6000 fast status area.
Syntax: wn956000.dll &
nt6400.dll........... short WINAPI GetExFastStatus(WORD address, short block7, short
block8, LPAT6400INFO lpAT6400Info)
win6400.dll........ int FAR PASCAL GetExFastStatus(WORD address, int block7, int block8,
LPAT6400INFO lpAT6400Info)
Variables: “address”.............. Board address of the 6000 controller card (must be evenly divisible by 8).
“block7”................. Integer code representing data type in Block 7 of the fast status area (see enum
exfaststatus in header file).
“block8”................. Integer code representing data type in Block 8 of the fast status area (see enum
exfaststatus in header file).
“lpAT6400Info”...... Fast status structure. See header file (WN956000.H, NT6400.H, or
WIN6400.H) for fast status structure – defined as “AT6400INFO”.
Return Value: “1” indicates no errors.
“-1” indicates that the operating system is not loaded.
“-2” indicates that the function has timed out (see SetTimeout).
GetExFastStatus also returns the number of bytes sent to the 6000 product.










