From OpenSCADAWiki
VArchObj object
Functions:
- bool isNull() — object is not initiated.
- int begin( int usec = 0, string archiver = "" ) — start time of the archive, through the return of seconds and microseconds usec for the archiver.
- int end( int usec = 0, string archiver = "" ) — end time of the archive, through the return of seconds and microseconds usec for the archiver.
- int period( int usec = 0, string archiver = "" ) — period of the archive, through the return of seconds and microseconds usec for the archiver.
- ValObj get( int sec, int usec, bool upOrd = false, string archiver = "" ) — value from the archive at the time sec:usec linked to the top upOrd for the archiver. Real time of the obtained value is set in sec:usec.
- bool set( ValObj val, int sec, int usec, string archiver = "" ) [access to the Archive-History subsystem for archive operations] — writes of the value val to the archive for the time sec:usec for the archiver.
- bool copy( VArchObj src, int begSec, int begUSec, int endSec, int endUSec, string archiver = "" ) [access to the Archive-History subsystem for archive operations] — copies of the part of the source archive src, or its buffer, in the current one beginning from begSec:begUSec and ending with endSec:endUSec for the archiver.
- ArrayObj FFT( int tm, real size, string archiver = "", int tm_usec = 0 ) — performs the Fast Fourier Transformation using the FFT algorithm. Returns an array of amplitudes of the frequencies for archive's values window for begin time tm:tm_usec (seconds:microseconds), depth to history size (seconds) and for archiver.
Example:
using Special.FLibSYS;
val = vArh(strPath2Sep(addr)).get(time,uTime,0,archtor);
return val.isEval() ? "Empty" : real2str(val,prec);