version IC 6.1.7-64b.500.23
I had a skill script created some time ago and it works, but starting with this version above, i find the ade-xl windows doesn't show the value any more.
After some debugging, I find the root cause is floating-point value. %g doesn't show the floating point value anymore, but something like an address is returend. When I try to compare the address with 0 in the if statement, the if statement will give me an error.
Below is the test script defined. The line of printf will shows the returned value if proper x waveforms are given, I expect to have a floating point number returned as the average of the waveform, however, an address of
"avg_x=srrWave:0x3bb0a780" was returned to the CIW windows. Un-comment the three lines I mentioned will results in an error for the if statement.
expression evaluation failed: val is not legal.expression evaluation failed: MYrms(IT("/R10/PLUS") )("greaterp" 0 t nil ("*Error* greaterp: can't handle (srrWave:0x3bb0a7a0 > 0)"))
skill script is defined below
procedure(MYrms(x) poport=stdout printf("enter procedure\n") printf("avg_x=%g \n",average(x));;un-comment the below three lines to re-run and have the error; if((average(x) > 0) then; printf("%g \n",average(x)); ) rms(x - average(x)) )
Case Number: Case 46360242
Since you've created this as a case, I won't duplicate effort and answer it here, other than to say that it would appear that the input waveform is a family rather than a single waveform, and your function has not been designed to cope with that.
I'll leave it to my colleagues in customer support to follow up with you.