Device.SetValue

Description

Sets the value of a channel in the device.

Scripting Syntax

Device.SetValue( ChannelID );

Parameters

Parameter Type Description
ChannelID String The identifer that specifies on which channel to set the value.

Examples

VBScript Example

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