App. - 81 App. - 81
APPENDIXES
(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
R
is used
1) Screen example (Form1)
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
(b) Program example
For each development software, the program examples are described
below.
1) Visual Basic
R
.NET 2003
2) Visual C++
R
.NET 2003
3) Visual Basic
R
6.0
4) Visual C++
R
6.0
1) When Visual Basic
R
.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
Содержание MELSEC LJ71C24
Страница 1: ......
Страница 2: ......
Страница 18: ...A 16 A 16 INDEX REVISIONS WARRANTY...
Страница 22: ...A 20 A 20 2 LJ71C24 R2 LJ71C24 R2 Before Using the Product...
Страница 23: ...A 21 A 21 MEMO...
Страница 38: ...4 2 4 2 4 PROCEDURES PRIOR TO OPERATION MEMO 4...
Страница 105: ...7 30 7 30 7 SETTINGS FOR THE C24 MEMO...
Страница 391: ...App 62 App 62 APPENDIXES 3 Refresh parameter setting In Refresh Parameter set the following network parameters...
Страница 425: ......
Страница 426: ......
Страница 427: ......