Hi all,
I am writing some code for an application which checks several test conditions of a device, and if it has passed, it gets added to a data table with all of its data.
My last column is Vd_V, and there are values in each row from 50-650 in 10 V steps. If the device has passed, I would like to append a column of data to the same data table. Therefore, my number of columns in changing. It looks something like this.
Vd_V Device_1 Device_4
50 1 1
60 2 2
70 3 3
80 4 4
... ... ...
... ... ...
I have written some code which is not quite working the way I thought it would. In the data table dtSummary I search for the number of columns. In the data table with all the device's data (dt1), I am copying the data to some variable and I would like to add it to dtSummary.
However, it is not adding it to the right columns. I have copied the piece of my code which is giving me some trouble.
dtSummary << New Column ("Device_" || char(deviceName)) ;
col = column("Device_" || char(deviceName));
col << Data Type ("Numeric");
cc = dtSummary << Get Column Names ("Continuous");
ncols = N Items(cc);
for(i=1, i<=60, i++,
Current Data Table(dt1);
col = Column(i+16);
colValue = col;
Current Data Table(dtSummary);
col2 = Column(ncols);
col2=colValue;
);