ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Channel type and function value mismatch

While using  the 'Add' function to create a channel with type "DataTypeFloat64" like below:

set oMyChannel = Data.Root.ChannelGroups(n).Channels.Add("New",DataTypeFloat64)

Then using the Descriptive Statistics function to get the value for the dot in channel

 oMyChannel.value(i) = ChnStatisticsChannelCalc("'[n]/Pdc' ",32,0,0,0,1,0,"NameName")

 

DIAdem will alarm like this" This channel was created with the type DataTypeFloat64.  The filling values that you use must not be type vbObject.'

0 Kudos
Message 1 of 2
(3,837 Views)

 oMyChannel.value(i) = ChnStatisticsChannelCalc("'[n]/Pdc' ",32,0,0,0,1,0,"NameName").Item(1).Values(1)

0 Kudos
Message 2 of 2
(2,638 Views)