Property: Values for Channel <DataPlugin>
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Properties > Property: Values for Channel <DataPlugin>
Property: Values for Channel <DataPlugin>
Contains the single value of a channel at a specific channel position.
Object.Values(iIndex)
| Object | Channel <DataPlugin> Object with this property |
| iIndex | LongInteger Specifies the channel position. |
| Object.Values | Variant with read and write access |
| Note The Size property contains the current number of values of a channel. |
| Note Channel values that are not set receive the NoValue value. The NoValue value is Null in VBS. Use the IsNull function to carry out comparisons with the Null value. |
The following example generates the real data type channel MyChannel in the MyChnGroup channel group. The example then saves 100 values between 0.001 and 0.1 in the channel.
Dim oGrp : Set oGrp = Root.ChannelGroups.Add("MyChnGroup") Dim oMyChn : Set oMyChn = oGrp.Channels.Add("MyChannel", eR32) Dim i For i = 1 to 100 oMyChn.Values(i) = CDbl(i/100000) Next