Device.SetValue

説明

デバイス内のチャンネルの値を設定します。

スクリプト 構文

Device.SetValue( ChannelID );

パラメータ

パラメータ タイプ 詳細
ChannelID String 値を設定するチャンネルを指定する識別子

VBScript の例

Application.Devices.enable = true
set oDevice = Application.Devices.Item("PC1600")
If TypeName (oDevice) = "Nothing" Then
set oDevice = Application.Devices.AddDevice( "PC1600" )
End If
' This will set the value of the channel 1 to 10.
' Note that if the channel is not connected, this will have no effect.
If oDevice.Channel(1).IsConnected Then
oDevice.SetValue 1, 10
End If