Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dim g_eng As CaoEngine
Dim g_ctrl As CaoController
Dim g_task As CaoTask
Private Sub Command1_Click()
' Start task
g_task.Start 2
End Sub
Private Sub Command2_Click()
' Stop task
g_task.Stop 3
End Sub
Private Sub Form_Load()
Set g_eng = New CaoEngine
' Connect RC: IP setting depends on your RC setting.
Set g_ctrl = g_eng.Workspaces(0).AddController("RC8", "caoProv.DENSO.RC8", "", "Server=192.168.0.1")
' Task name "PR01"
Set g_task = g_ctrl.AddTask("PRO1", "")
End Sub
Private Sub Form_Unload(Cancel As Integer)
g_ctrl.Tasks.Clear
Set g_task = Nothing
g_eng.Workspaces(0).Controllers.Remove g_ctrl.Index
Set g_ctrl = Nothing
Set g_eng = Nothing
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.