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: 

adding multiple channels

Hi there,

I'm trying to add a number of channels together in Diadem 2015 using the following command :

 

Call ChnAdd("[4]/SA4_14 N","'[4]/SA2_16 N' - '[4]/SB5_3'","[4]/COMFORT totalled")

 

There a a total of 46 channels within the group, on some logs the script runs ok, but on others I receive the warning:

Error in <T24STEP4_TOTALLEDFUSES.VBS> (Line: 10, Column: 1):

Values in line 135-4, are too high.

 

The values do not appear to be noticeably different, so do not know why it's in error..

 

Perhaps I need to consider an alternative method for totalling channels within a group.

 

Any help would be appreciated.

 

Thanks

AdeK

 

 

 

0 Kudos
Message 1 of 3
(5,327 Views)

Hi AdeK,

 

I need an example to reproduce the problem.

I tested the general behavior with this script:

 

dim oFirstChn, oChnList

set oChnList  = Data.GetChannels("MyChnGroup/*")
set oFirstChn = oChnList(1)
call oChnList.Remove(1)

call chnadd(oFirstChn, oChnList, "Result")

This works fine, even if channels don't have the same length.

I tested it in DIAdem 2015

 

Greetings

Walter

 

 

 

0 Kudos
Message 2 of 3
(5,320 Views)

Hi WalteR,

Thank you !

This seems to works fine !

I will add all new channel groups to the script as below :

 

dim oFirstChn, oChnList

setoChnList = Data.GetChannels("[2]/*")

setoFirstChn = oChnList(1)

calloChnList.Remove(1)

callchnadd(oFirstChn, oChnList, "[2]/CHASSIS totalled")

 

setoChnList = Data.GetChannels("[4]/*")

setoFirstChn = oChnList(1)

calloChnList.Remove(1)

callchnadd(oFirstChn, oChnList, "[4]/COMFORT totalled")

0 Kudos
Message 3 of 3
(5,312 Views)