Note: The scalcout record is part of the calc module of the synApps package. Device support for scalcout records is only available for calc module release 2-4 or higher. You also need the synApps modules genSub and sscan to build calc.
Up to release 2-6 (synApps release 5.1), the scalcout record needs a fix.
In sCalcout.c at the end of init_record add
before the final return(0):
if(pscalcoutDSET->init_record ) {
return (*pscalcoutDSET->init_record)(pcalc);
}
Different record fields are used for output and input. The variable
x stands for the written or read value.
%f):x=OVALVAL=xOVAL from CALC
or OCAL depending on DOPT.
%i):x=int(OVAL)VAL=x%{):x=int(OVAL)VAL=x%s):x=OSVSVAL=x
For scalcout records, it is probably more useful to access fields
A to L and AA to LL
directly (e.g. "%(A)f" or "%(BB)s").
However, even if OVAL is not used, it is calculated by the
record. Thus, CALC must always contain a valid expression
(e.g. "0").
During initialization, the @init handler is executed, if
present. All format converters work like in normal operation.
aai aao ai ao bi bo mbbi mbbo mbbiDirect mbboDirect longin longout stringin stringout waveform calcout
Dirk Zimoch, 2005