DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Classification error. The class begin is higher than the class end.

Solved!
Go to solution

Hello,

 

I'm searching for a solution to an error that does not make much sense to me:

 

Error in <NoName(2).VBS> (Line: 75, Column: 3):

Classification error. The class begin is higher than the class end.

 

It appears when I call the attached VBS on the also attached TDMS. Diadem 2012. The index file did not make it thru the upload system here.

 

It seems to be triggered by funtion ChnHistogram() and the help page says something about ClassBegin/End being "Global Parameters". What are these? Where does one set them.

 

Thanks in advance for clues.

 

Download All
0 Kudos
Message 1 of 5
(4,578 Views)
Solution
Accepted by cubz

Hey cubz,

 

you script is to big to debug it quickly.

 

The issue is caused by the ChnHistogram in line 75. It happens in the 3rd iteration of the surounding for-loop.

 

The issue seems to be the parameter ClassBegin and/or ClassEnd. I think the error message should tell you, that ClassBegin > ClassEnd, but this needs further debugging.

 

Regards, Stephan

0 Kudos
Message 2 of 5
(4,516 Views)

Oh, stupid me. The function couldn't compute on a channel that does not contain any values (or contains only NOVALUE). Sry guys.

0 Kudos
Message 3 of 5
(4,515 Views)

Hi Stephan,

 

thx, yes, you are right, the third iteration passes an empty channel to the function, therefore error

 

Call ChnHistogram(Y, R, R, ClassMeth1, FrequencyType)

Input Parameters

Y Specifies the data channel that contains the y-values.
R Specifies the result channel that receives the class means.
R Specifies the result channel that receives the samples.
ClassMeth1 Specifies how DIAdem specifies the class limits.
FrequencyType Specifies whether DIAdem calculates the class frequency absolutely or relatively.

 

Thanks for reply. Well, just what did you use to find out it is 3rd iteration? I use function logfilewrite that outputs text below the code.

 

I'll keep the topic here, so that it is searchable.

0 Kudos
Message 4 of 5
(4,504 Views)

Hey cubz,

 

I did not use the logfilewrite function.

 

I set an breakpoint on line 75 and added two lines after this line to the script to display the content of ClassBegin and ClassEnd with an msgBox.

I recognized that the code executed well untill the 3rd call of my added msgBox commands.

 

Stephan

0 Kudos
Message 5 of 5
(4,493 Views)