Gtld recorder

Материал из GTL-wiki
Версия от 04:20, 12 января 2024; Andrey.v.shatokhin (обсуждение | вклад) (Новая страница: « let recorder = gtl.add_recorder( { "src":[ gtl.analog_inputs[0], gtl.analog_inputs[1] ], "time" : 1, "prehistory" : 0.5, "comment" : "no comments", "dir" : "d:/", "file_name" : "record from script" } ); if(!recorder.is_success()) gtl.diagnostic.stop(); recorder.finished.connect( function() { gtl.log.info("file", "finished"); gtl.free(recorder); gtl.diagnostic.stop(); } ); gtl.diagnostic.interval = .1; fun...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)
Перейти к навигации Перейти к поиску

let recorder = gtl.add_recorder( {

 "src":[
   gtl.analog_inputs[0],
   gtl.analog_inputs[1]
 ],
 "time" : 1,
 "prehistory" : 0.5,
 "comment" : "no comments",
 "dir" : "d:/",
 "file_name" : "record from script"

} );

if(!recorder.is_success())

 gtl.diagnostic.stop();

recorder.finished.connect(

 function()
 {
   gtl.log.info("file", "finished");
   gtl.free(recorder);
   gtl.diagnostic.stop();
 }

);



gtl.diagnostic.interval = .1;

function diagnose() {

 if(gtl.diagnostic.time > 2)
   recorder.start();
 else if(gtl.diagnostic.time > 5)
 {
   gtl.log.info("diagnostic", "stop");
   gtl.diagnostic.stop();
 }


}