Specifications
21/201
6.1 Outline
This on-line Help describes how to create a transmission application using the 32-bit YASNAC
transmission library “MOTOCOM 32 DLL.”
This Help also describes how to create an application with Visual Basic and Visual C++. Other
languages can also be used.
6.2 Using Visual Basic
6.2.1 Preparation
To create a transmission application, the following systems must be installed in the personal computer
in advance.
① Microsoft Windows95/98/NT4.0/2000/XP
*1
② Visual Basic Ver5.0 or more
*2
*1 MS Windows 95/98/NT4.0/2000/XP is a registered trademark of Microsoft Corporation, U.S.A.
*2 Visual Basic is a registered trademark of Microsoft Corporation, U.S.A.
6.2.2 How to Create a transmission application
This paragraph explains a simple program, as an example, which sends/receives a job that was input to
the text box to/from the controller.
6.2.2.1 Creation of Code Module
In order to call up “Motocom32. DLL” from Visual Basic, declaration of the Motocom 32. DLL I/F
functions to be used is needed. The following two methods are available.
① Write the declaration of the DLL functions yourself.
② Use the definition file attached to the Motocom 32 package.
-----------------------------------------------------------------------------------
① Write the declaration of the DLL functions yourself.
-----------------------------------------------------------------------------------
Add the code module and write the following declaration in the declaration area.
Declare Function BscOpen Lib "MotoCom32" Alias "_BscOpen@8" _
(ByVal Path As String, ByVal mode As Integer) As Integer
Declare Function BscClose Lib "MotoCom32" Alias "_BscClose@4" _
(ByVal nCid As Integer) As Integer
Declare Function BscSetCom Lib "MotoCom32" Alias "_BscSetCom@24" _
(ByVal nCid As Integer, ByVal Port As Integer, ByVal Baud As Long, ByVal
Parity As Integer, ByVal clen As Integer, ByVal stp As Integer) As Integer
Declare Function BscConnect Lib "MotoCom32" Alias "_BscConnect@4" _
(ByVal nCid As Integer) As Integer
Declare Function BscDisConnect Lib "MotoCom32" Alias "_BscDisConnect@4" _
(ByVal nCid As Integer) As Integer
Declare Function BscDownLoad Lib "motocom32.dll" Alias "_BscDownLoad@8" _
(ByVal nCid As Integer, ByVal fName As String) As Integer
Declare Function BscUpLoad Lib "motocom32.dll" Alias "_BscUpLoad@8" _
(ByVal nCid As Integer, ByVal fName As String) As Integer
Define the followings as the parameters for BscOpen() to select the type of connection line.
Public Const PACKETCOM = (1)
Public Const PACKETETHERNET = (16)