Page 1 of 1

SCPI server will not go into HIGH gain

Posted: Wed Aug 21, 2019 8:01 pm
by JimMartz

I am having some issues getting the SCPI server to use the HV gain.
Looking at the api/src/acq_handler.c file.
gain_ch_a and gain_ch_b are used to store the gain, and it is set
to "RP_LOW" by default.
The function acq_SetGain is used to set the new gain.
In this function, first the current value is stored in case the new value fails.
And the current threshold is stored also.
Then the new gain is put into the "gain" variable.
Then the threshold is set using the new gain(maybe).
I am not sure the threshold is updated as it looks like this
function gets the gain from gain_ch_a or gain_ch_b that have not
been updated.
Then if there was an error the threshold is back using the old gain(maybe, see above).
If there was no error then the "setEqFilters" function is run and the new gain values
should be passed to the fpga. But like the threshold function the gain is pulled from
gain_ch_a or gain_ch_b, and they was never updated. In fact I do not see any place
in the code that sets gain_ch_a or gain_ch_b other then the default value that is
set when the variable is defined.

Can some one verify this bug?
Or am I missing something something in the code.
I guess for now I can just change the default to RP_HIGH when gain_ch_a or gain_ch_b
is defined. But then I would have to recompile each time the lv/hv jumper is changed.

Thanks for any help.
Jim Martz

Re: SCPI server will not go into HIGH gain

Posted: Tue Oct 08, 2019 7:18 am
by redpitaya
Hi Jim, please try to update the image OS on your Red Pitaya.

Re: SCPI server will not go into HIGH gain

Posted: Fri Oct 18, 2019 2:31 pm
by JimMartz
Thanks for the reply.
Sorry I just noticed there was a reply.
Anyway, I have made many changes from the original software,
so I can't just install an original RP image anymore or I will lose me changes.

Has anyone looked at this?
The api/src/acq_handler.c file on the github has
not changed in two years, and that is where the bug
seems to be.