User guide
Chapter 2. Communication
57
VB 3.0
Application
Example
To demonstrate how to use the DLL functions, we've provided all the files for a sample Visual
Basic project using WIN6400.DLL for VB3.0 (see table below for list of files) The files are
located in the MA6000\DRIVER\VB30 directory. The project was designed to be executed
from Visual Basic 3.0 with no modifications.
Project File (*.MAK) Forms (*.FRM) Basic Modules (*.BAS) Icons (*.ICO)
AT6400.MAK ADDRESS.FRM AT6400.BAS ADDRESS.ICO
AT6400.FRM AT6400.ICO
AT_ERROR.FRM BLKLIMIT.ICO
INFO.FRM ERROR.ICO
RECEIVE.FRM NO_LIMIT.ICO
STARTUP.FRM REDLIMIT.ICO
TSTPANEL.ICO
To initiate the application, invoke Visual Basic and open the AT6400.MAK file by choosing
Open Project from the File menu. Then select Start from the Run menu to initiate the
application. The application follows the structure illustrated below.
STARTUP.FRM
ADDRESS.FRM
AT6400.FRM
AT6400.BAS
(Global)
EXIT
START
EXIT
INFO.FRM
ERROR.FRM
RECEIVE.FRM
The global module, AT6400.BAS, contains code necessary to declare the functions and
subroutines contained within WIN6400.DLL. The declarations for those functions and
subroutines are provided earlier in this section.
Subsequent calls to these declared functions and subroutines allow for communication between
the Visual Basic application program and the controller. Examples of each function and
subroutine are provided within the “forms” of the project. Refer to the form next to the
function or subroutine in the table below for specific calling information.
Function or Subroutine Form Object Event Procedure
SendAT6400Block STARTUP.FRM BTN_Yes Click
RecvAT6400Block AT6400.FRM MNU_Rev_Update Click
OSLoad STARTUP.FRM BTN_Yes Click
IsOSLoad STARTUP.FRM BTN_No Click
Request_Status AT6400.FRM TIM_Update Timer
Set_Pointer AT6400.FRM TIM_Update Timer
Read_Status AT6400.FRM TIM_Update Timer
The starting point for the application is the form STARTUP.FRM. This is established by
choosing Select Startup Form under the Run menu.
For a complete listing of the Visual Basic application described above, open the project file
(AT6400.MAK) by choosing Open Project from the File menu. Then select Print from
the File menu, and print out all forms and code.










