User guide
Chapter 2. Communication
59
DLL Functions for
Visual C++
(continued)
DLL Function: SendAT6400Block
Description: Send a block of up to 256 characters to a 6000 bus-based product. SendAT6400Block will wait
until the 6000 controller is ready before sending. By default SendAT6400 will wait forever until the
6000 controller is ready. SetTimeout allows control over this waiting period.
Syntax: wn956000.dll..... short WINAPI SendAT6400Block(short address, LPSTR cmd)
nt6400.dll........... short WINAPI SendAT6400Block(short address, LPSTR cmd, short
irqnum)
win6400.dll........ int FAR PASCAL SendAT6400Block(WORD address, LPSTR cmd, int
irqnum)
Variables: “address”.......... Board address of the 6000 controller card (must be evenly divisible by 8). The
default address on the 6000 controller (selected with DIP switches) is 768; to
change the address, refer to the product's
Installation Guide
.
“cmd”
................
Pointer to a null-terminated string that contains one or more 6000 series
commands. Commands must be separated with a carriage return or colon. The
buffer that
cmd
points to should be 258 bytes in size.
“irqnum”............ Set to zero (used internally by Motion Architect for interrupt support).
Return Value: “-1” indicates that the operating system is not loaded.
“-2” indicates that the function has timed out (see SetTimeout).
SendAT6400Block also returns the number of bytes sent to the 6000 product.
DLL Function: RecvAT6400Block
Description: Poll the controller for any response it may have in its output buffer. Fetches a block of up to 256
characters (block is terminated with a null).
Syntax: wn956000.dll..... short WINAPI RecvAT6400Block(short address, LPSTR resp)
nt6400.dll........... short WINAPI RecvAT6400Block(short address, LPSTR resp, short
irqnum)
win6400.dll........ int FAR PASCAL RecvAT6400Block(WORD address, LPSTR resp, int
irqnum)
Variables: “address”.......... Board address of the 6000 controller card (must be evenly divisible by 8).
“resp”................ Pointer to a 258 byte response buffer.
“irqnum”............ Set to zero (used internally by Motion Architect for interrupt support).
Return Value: “-1” indicates that the operating system is not loaded.
“-2” indicates that the function has timed out (see SetTimeout).
RecvAT6400Block also returns the number of bytes received from the 6000 product.
DLL Function: osload
Description: Download the operating system to the controller.
Syntax: wn956000.dll &
nt6400.dll........... short WINAPI osload(unsigned short address, LPSTR options, HWND
handle)
win6400.dll........ int FAR PASCAL osload(WORD address, LPSTR options, HWND handle)
Variables: “address”.......... Board address of the 6000 controller card (must be evenly divisible by 8).
“options”............ Pointer to a string of operating system loader options:
• “at6400.ops” downloads AT6n00 operating system (same operating system
for the AT6200, AT6400, OEM-AT6200, and OEM-AT6400)
• “at6250.ops” downloads AT6250 operating system
• “at6450.ops” downloads AT6450 operating system
• “/port=768” allows operating system to be sent to a particular address
• “/quiet” keeps osload form displaying the meter dialog and error messages
“handle”............. Parent window handle for osload's meter dialog and message boxes. For no
parent, set to zero.
Return Value: “0” indicates that the operating system downloaded successfully.
Value greater than 0 for error conditions (see enum osload_errors in WIN6400.H).
DLL Function: IsOSLoaded
Description: Determine if the operating system has been loaded to the 6000 controller.
Syntax: wn956000.dll &
nt6400.dll........... short WINAPI IsOSLoaded(short address)
win6400.dll........ int FAR PASCAL IsOSLoaded(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 the 6000 operating system has been loaded. Otherwise,
returns FALSE (“0”).










