DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Dieser Kanal wurde mit dem Typ DataTypeString erzeugt. Die Werte, die Sie zum Füllen verwenden, dürfen nicht vom Typ unknown type sein.

Hello,

 

I have a question in order to save information in the channel.

 

My script is:

 

for i = 0 to Gesamtanzahl-1


Call Data.Root.ChannelGroups.Add("Sport").Activate()

Call Data.Root.ChannelGroups("Sport").Channels.Add("Gerät",DataTypeChnString)


Data.Root.ChannelGroups("Sport").Channels("Gerät").Values(i+1) = split (Data.Root.ChannelGroups(i+1).Properties("Delimiters").Value, "_")

next

 

 

The program says that the DataType is unknown. I think it is the Datatype of the delimiters. How is it possible that the Datatype is unknown, there is a number with letters behind the "Delimiters"

 

 

Thank you very much in advance. 

 

Mosquito

0 Kudos
Message 1 of 2
(5,375 Views)

Hello Mosquito,

 

The command SPLIT creates an array. Data.Root.ChannelGroups("Sport").Channels("Gerät").Values(x) is a single value. An allocation doesn't match.

You need an array variable for the result of split and afterwards a loop to allocat it with the channel values. Alternativly you can use the command ArrayToChannel for this.

 

Greetings

Walter

 

0 Kudos
Message 2 of 2
(5,369 Views)