VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   3  '固定ﾀﾞｲｱﾛｸﾞ
   Caption         =   "Form1"
   ClientHeight    =   4125
   ClientLeft      =   45
   ClientTop       =   375
   ClientWidth     =   4275
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4125
   ScaleWidth      =   4275
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows の既定値
   Begin VB.TextBox Text3 
      Height          =   285
      Left            =   1680
      TabIndex        =   21
      Top             =   600
      Width           =   2325
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   1680
      TabIndex        =   20
      Top             =   150
      Width           =   2325
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1
      Left            =   3030
      Top             =   2610
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   8
      Left            =   1110
      TabIndex        =   10
      Top             =   3690
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   7
      Left            =   1110
      TabIndex        =   9
      Top             =   3360
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   6
      Left            =   1110
      TabIndex        =   8
      Top             =   3030
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   5
      Left            =   1110
      TabIndex        =   7
      Top             =   2700
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   4
      Left            =   1110
      TabIndex        =   6
      Top             =   2370
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   3
      Left            =   1110
      TabIndex        =   5
      Top             =   2040
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   2
      Left            =   1110
      TabIndex        =   4
      Top             =   1710
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   1
      Left            =   1110
      TabIndex        =   3
      Top             =   1380
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  '右揃え
      Height          =   270
      Index           =   0
      Left            =   1110
      TabIndex        =   2
      Top             =   1050
      Width           =   1815
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Stop"
      Height          =   315
      Index           =   1
      Left            =   180
      TabIndex        =   1
      Top             =   600
      Width           =   1185
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Start"
      Height          =   315
      Index           =   0
      Left            =   180
      TabIndex        =   0
      Top             =   180
      Width           =   1185
   End
   Begin VB.Label Label1 
      Caption         =   "Rz"
      Height          =   225
      Index           =   8
      Left            =   180
      TabIndex        =   19
      Top             =   3720
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Ry"
      Height          =   225
      Index           =   7
      Left            =   180
      TabIndex        =   18
      Top             =   3390
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Rx"
      Height          =   225
      Index           =   6
      Left            =   180
      TabIndex        =   17
      Top             =   3060
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Fz"
      Height          =   225
      Index           =   5
      Left            =   180
      TabIndex        =   16
      Top             =   2730
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Fy"
      Height          =   225
      Index           =   4
      Left            =   180
      TabIndex        =   15
      Top             =   2400
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Fx"
      Height          =   225
      Index           =   3
      Left            =   180
      TabIndex        =   14
      Top             =   2070
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Status"
      Height          =   225
      Index           =   2
      Left            =   180
      TabIndex        =   13
      Top             =   1740
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "F/T Seq."
      Height          =   225
      Index           =   1
      Left            =   180
      TabIndex        =   12
      Top             =   1410
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "RDT Seq."
      Height          =   225
      Index           =   0
      Left            =   180
      TabIndex        =   11
      Top             =   1080
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private m_eng As CaoEngine
Private m_ctrl As CaoController
Private m_var As CaoVariable


Private Sub Form_Load()
    Set m_eng = New CaoEngine
    Set m_ctrl = m_eng.Workspaces(0).AddController("Test", "CaoProv.ATI.NetFT", "", "Server=192.168.1.1, Timeout=8")
    Set m_var = m_ctrl.AddVariable("@Data")
End Sub


Private Sub Command1_Click(Index As Integer)
    If Index = 0 Then
        Timer1.Enabled = True
        Text2.Text = Now
    Else
        Timer1.Enabled = False
    End If
    
End Sub


Private Sub Timer1_Timer()
    On Error GoTo ErrProc

    Dim vntVal As Variant
    
    vntVal = m_var.Value
    
    For i = 0 To 8
        Text1(i).Text = vntVal(i)
    Next
    
    Text3.Text = Now
    
    Exit Sub
    
ErrProc:
    MsgBox Err.Number & vbCrLf & Err.Description
    Timer1.Enabled = False
End Sub
