App. - 29 App. - 29
MELSEC-Q
APPENDICES
(2) Sample
program
The following sample program reads D0 to D4 (five points) of the target
programmable controller using the logical station number.
(a) When Visual Basic is used
1) Screen example (Form1)
(b) Program
example
For each development software, the program examples are described
below.
1) Visual Basic .NET 2003
2) Visual C++ .NET 2003
3) Visual
Basic 6.0
4) Visual
C++ 6.0
1) When Visual Basic .NET 2003 is used
Private Sub Command1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Command1.Click
'***********************************
' Connection
'***********************************
Dim rtn As Integer
'Get
LogicalstationNumber
AxActEasyIF1.ActLogicalStationNumber = Val(Text1.Text)
'Connection
rtn
=
AxActEasyIF1.Open()
If rtn = 0 Then
MsgBox("The connection was successful")
Else
MsgBox("Connection
Error :" & Hex(rtn))
End
If
End Sub
R
Command1 or Button1
' Connect to the communication line.
Command2 or Button2
' Read the device data.
Command3 or Button3
' Cut the communication line.
Text1
' Enter the logical station number.
ACT control (ActEasy IF)
' ACT control for utility setting type
R
R
R
R
R
Summary of Contents for GX Configurator-SC
Page 2: ......
Page 103: ...3 42 3 42 MELSEC Q 3 SPECIFICATIONS MEMO ...
Page 138: ...4 35 4 35 MELSEC Q 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MEMO ...
Page 397: ...App 24 App 24 MELSEC Q APPENDICES Connection example 3 Connection example 4 ...
Page 439: ...WARRANTY ...
Page 441: ......