Created
May 15, 2020 23:40
-
-
Save clope031/77806223870bc54cf178c8e71dc3eba9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'!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