Error when creating form with my than 8 entries

I am creating a form with 19 entries (8 for setting DAC value and 11 for displaying ADC value). The code compiles correctly but when I run the web page is not displayed. If I comment out the last 11 entries in the form then it displays fine. On the 9th entry I get a good return value sspec_addfv() but still no web page. On 10th entry I always get a return value of -1.

Code snippets below…

#define FORM_ERROR_BUF 1024

auto FormVar myform[19];
auto int var;
auto int form;

form = sspec_addform("ucla.html", myform, 19, SERVER_HTTP);

// Set the title of the form.
sspec_setformtitle(form, "TAE Reflectometer");

// Add the DAC channel variables and set it up on the form.
var = sspec_addvariable( "dac0value", &dac0value, FLOAT32, "%.2f", SERVER_HTTP );
var = sspec_addfv( form, var );
sspec_setfvname( form, var, "DAC Channel 0" );
sspec_setfvdesc( form, var, "Range 0 ... 5 V" );
sspec_setfvlen( form, var, 5 );
sspec_setfvfloatrange( form, var, 0.0, 5.0 );
sspec_setfvcheck( form, var, CheckDac0 );

The above entry is duplicated for DAC1 through DAC7 and always works.

This code below is duplicated for ADC0 through ADC10 and causes an error such that web page is never served. This code immediately follows the creation of DAC entries.

var = sspec_addvariable( "adc0value", &adc0value, FLOAT32, "%.2f", SERVER_HTTP );
var = sspec_addfv( form, var );
sspec_setfvname( form, var, "ADC Channel 0" );
sspec_setfvdesc( form, var, "Feedback" );
sspec_setfvlen( form, var, 5 );
sspec_setfvreadonly( form, var, 1 );

Thanks.

Randy

I’m having the same issue. Have you been able to resolve this???

Hi,

have you been able solved this problem? I have the same problem here…

Rabbit is not of much use either!

Hi !

Try defining the MAXSPEC

#define SSPEC_MAXSPEC 256

Hopefully it will help you !

I had to use the following code to get 8 or more form variables to work.

#ifdef SSPEC_MAXSPEC
#undef SSPEC_MAXSPEC
#endif
#define SSPEC_MAXSPEC 256 // number of dynamic (RAM) resource table entries to allocate