Channel.Target

説明

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

C#構文

// get accessor

String rtn = Channel.Target;

// set accessor

Channel.Target = String;

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