Channel.Target

説明

チャンネルを通じて実行されるアクションのターゲットを表すString値を戻したり、設定したりします。ターゲットは、siChannelActionタイプに応じて多数の意味を持つことができます。たとえばDrive タイプ(siChannelActionDrive)では、ターゲットはこのチャンネルによって制御されるパラメータですが、Commandタイプ(siChannelActionCommand)では、ターゲットは実行するコマンドの名前です。

VBScript の例

Application.Devices.enable = true
' first add the device if it is not there yet
set oDevice = Application.Devices.Item("PC1600")
If TypeName (oDevice) = "Nothing" Then
set oDevice = Application.Devices.AddDevice( "PC1600" )
End If
set oChannel = oDevice.Channel(1)
oChannel.Action = siChannelActionDrive
oChannel.Target = "current.kine.local.posx"
logmessage "The channel 1 target is? " & oChannel.Target