ICP DAS USA ET-M8194H Quick Start Manual page 29

Motion control module
Table of Contents

Advertisement

In the following discussion, only code lines for Step 1: "Connect to the
ET-M8194H" and Step 2: "Download macro program to MP94" are shown below.
For the remaining parts of program, please refer to the VB_MP. Vbp.
Step1: Connect to the ET-M8194H
Option Explicit
Public
handle
As Long
Private Sub
cmdConnect_Click()
If
cmdConnect.Caption = "Connect"
lbl_Msg.Caption = "Connecting..."
DoEvents
cmdConnect.Enabled =
handle = ETM_CONNECT(txtIP.Text, 1000)
handle
If
handle > 0
0.
cmdConnect.Caption = "Disconnect"
cmdConnect.BackColor = vbRed
lbl_Msg.Caption = "Successful connection!"
cmdDownloadMP.Enabled =
cmdRun.Enabled =
cmd_EStop.Enabled =
ETM_CLEAR_STOP handle, 1, AXIS_XYZU
cmd_EStop.Caption = " EMG stop"
Else
' Connection failed
lbl_Msg.Caption = "Disconnect..."
End If
cmdConnect.Enabled =
txt_X_axis = "": txt_Y_axis = "": txt_Z_axis = ""
Else
ETM_DisConnect handle
ICP DAS
'Declare handle variable
False
Then
'Successful connection to ET-M8194H if handle >
True
True
True
True
'Disconnect ET-M8194H
'step 1: connect to ET-M8194H
Then
'connect to ET-M8194H and record
28
ET-M8194H 快速入門指南
Version 2.0, 2012/10/12

Advertisement

Table of Contents
loading

Table of Contents