Specifications
26/201
6.3.2.5 Creation and Execution of EXE File
Execute “Build” in the Visual C++ Build menu to create a 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.
6.4 Explanation of Auto Job Changer Software Creation
Procedure
Procedure (procedure name: Sub DciOnline) to be called when “automatic operation” button is pressed
will be described as follows.
Since the Auto Job Changer software is created in Visual Basic, the following description is given in
the Visual Basic. However, Visual C++ or any other language can also be used.
Processing is divided into the following 5 major parts.
1) Opening of transmission port [Function name: Ms_BscOpenComm( )]
2) Receiving of job number [Function name: DciGetJobNo( )]
3) Preparation for sending job [Function name: GetJobnameByNo( ), JobCopy( )]
4) Sending of job [Function name: DciLoadSave( )]
5) Closing of transmission port [Function name: Ms_BscCloseComm( )]
The following describes the list of each processing.
Sub DciOnline
Sub DciOnline (ProfileCom As String, CvtName As String, lst As Control, LogFile As String)
'input ProfileCom Communication profile character string ("COM1:96,E,8,1".etc.)
' CvtName Job name to be copied
' Lst List name for message output
' LogFile Log file name
'output None
Dim nCid As Integer
Dim JobNo As Integer
Dim JobName As String
Dim rc As Integer
Dim Cycle As Long
Cycle = 0
'Get of communication handler
nCid = Ms_BscOpenComm() (mode) ’ mode=0 or 1
If nCid <> -1 Then
'Work No. receiving and job sending are repeated until Cancel button is pressed (F_QUIT flag
becomes true).
Do While Not F_QUIT
DispLogMsg
lst, "***** Waiting for work No.*****", ""
'Receiving work No.
If Not DciGetJobNo(nCid, JobNo, lst, LogFile)
Then Exit Do
DispLogMsg
lst, "Work No. (" + Format$(JobNo) + ") reveived", LogFile
'Fetching job name corresponding to work No.
JobName = GetJobNameByNo
(JobNo)
If JobName = "" Then
MsgBox
"No corresponding job is registered."
Exit Do