Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'!TITLE "Task"
Sub Main
Dim g_eng As Object
Dim g_ctrl As Object
Dim g_task As Object
'Connect RC: IP Setting depends on your RC setting
g_ctrl = cao.AddController("RC", "CaoProv.DENSO.RC8", "", "Server=192.168.0.1")
'Task Name PRO1
g_task = g_ctrl.AddTask("PRO1","")
Do While 1
Select Case I[0]
'Start Task
Case 1
g_task.start 1
I[0] = 0
'Stop Task
Case 2
g_task.stop 2
I[0] = 0
'Exit Program
Case 3
g_ctrl.tasks.Remove g_task.Index
cao.Controllers.Remove g_ctrl.Index
Exit Do
End Select
Loop
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.