Specifications
22/201
-----------------------------------------------------------------------------------
② Use the definition file attached to the Motocom32 package.
-----------------------------------------------------------------------------------
The “Motocom32.DLL” package includes a “Motocom32.BAS” file that defines the DLL I/F
functions. Add this file to the Visual Basic project.
(1) Copy the “Motocom32.BAS” file to the source directory of the application to be
created.
(2) Click “Project” and specify the “Motocom 32.BAS” from the “File” menu to add it
to the project.
Create a sub-module to open/close the following ports.
Function Ms_BscOpenComm(mode%)
Function Ms_BscCloseComm()
Select “Creation procedure in Visual Basic,” “Create code module,” and then “Function
Ms_BscOpencomm()” to select the data part (program list) of the above function. The selected
section will be highlighted. Use “Partial Copy” to copy this section to Ms_BscOpenComm ()
function. Repeat for Ms_BscCloseComm. and CmExit.
6.2.2.2 Creation of Form Module
Create the following module.
1) Form to be program display
On this form, create the following controls.
2) Text Box to input the job name (control name: “TxtJobName”, text name: 0.JBI”)
3) Send button (control name:”CmdDownLoad”, caption name: “Send”)
4) Receive button (control name: “CmUpLoad”, caption name: “Receive”)
5) Exit button (control name: “CmdExit”, caption name: “Exit”)
When the control is created, describe the event procedure for each button.
Sub CmdDownload_Click ()
Sub CmdUpLoad_Click ()
Sub CmdExit_Click ()
Select “Creation procedure in Visual Basic,” “Create from module,” and then “Sub
CmdDownload_Click()” to select the data part (program list) of the above function. The selected
section will be highlighted. Use “Partial Copy” to copy this section to Ms_BscOpenComm () function.
Repeat for CmdUpLoad and CmExit.
6.2.2.3 Creation and Execution of EXE File
Select “EXE file creation” from the Visual Basic file menu to create an execution enabled module. By
putting this module in the same directory as the job to be sent or received and executing it, the job can
be sent or received.
Note: The MOTOCOM installation directory contains data transmission functions (Windows DLL file
type, file name: Motocom32.DLL and Motolk.DLL, Motolkr.Dll
). When executing an application,
copy the functions to the directory where the module to be executed is created. For transmission via
Ethernet, copy Vrp32.DLL, HxlSrv32.exe
to the same directory as Motocom32.DLL.