<< Prev        Next >>

ID : 6652

Format Sample 1

In this example, the NetwoRC provider is used to start a PAC program.

Task.pcs

'!TITLE "Task"

Sub Main 

	Dim g_ctrl as Object	' CaoController object
	Dim g_task as Object	' CaoTask object

	' Connection
	g_ctrl = cao.AddController("RC", "CaoProv.DENSO.NetwoRC",
					 "", "conn=eth:10.6.235.60")

	' Task generation
	g_task =  g_ctrl.AddTask("Pro1", "")

	' Task start
	g_task.Start 2


	' Disconnection
	g_ctrl.Tasks.Remove g_task.Index
	g_task = Nothing
	cao.Controllers.Remove g_ctrl.Index
	g_ctrl = Nothing

End Sub

Explanation

The procedure for connection and disconnection is the same as in the case involving RC7M controller variable value acquisition and settings.

First, generate a caoTask object with the CaoController object AddTask method, and then start the Task with the CaoTask object Start method.

In the above example, the program Pro1 Task is started.

Refer to item "4.2.5. CaoController:: AddTask Method" in the "NetwoRC Provider User's Guide" for details on the AddTask method.

Refer to item "4.2.42.CaoTask:: Start Method" in the "NetwoRC Provider User's Guide" for details on the Start method.

ID : 6652

<< Prev        Next >>