DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto efficiently Copy array into data portal

Solved!
Go to solution

I have an array in VBS memory and would like to create an channel in the data-portal based on that data-set, I currently use this code construct to copy the data:

 


' intChannelCount is the number of samples

'MaxHold is the data array to be copied

'oFFTMaxHold is the data channel that is the target of the data

for counter = 1 to intChannelCount
      oFFTMaxHold.Values(counter)=MaxHold(counter)
next


 It is rather slow (and if the data preview is open in the data portal) even much slower.

Is there a method to copy the whole array in one operation to a channel?

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 1 of 2
(3,510 Views)
Solution
Accepted by topic author TCPlomp

Hi Ton,

 

If you have DIAdem 10.2 or later you can use the following command to do this with one command-- passing the array of values as one of the command's parameters-- this is a common situation when querying records from a data base that you want to load into the Data Portal as channels.

 

ChanRefsArray = ArrayToChannels(ValuesArray, ChanNamesArray)

In the case of your example below, that would be:

 

Call ArrayToChannels(MaxHold, Array(oFFTMaxHold.Name))

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 2
(3,499 Views)