for (;;) {
// GPIB -> obrazovka
- if (init)
+ if (init) {
fprintf(stderr,"Inicializuji port... ");
- lptgpib_command(UNL);
- lptgpib_command(MLA+0);
- lptgpib_command(MTA+zdroj_adresa);
- if (init)
+ lptgpib_command(UNL);
+ lptgpib_command(MLA+0);
+ lptgpib_command(MTA+zdroj_adresa);
fprintf(stderr,"hotovo.\n");
- init=0;
+ init=0;
+ }
put_control(TRI | NDAC); /* clear NRFD */
usleep(1000000/10);
if (get_control()&DAV) { /* wait for DAV */
fprintf(stderr,"zapisuji radek: %s\n",str);
lptgpib_write(zdroj_adresa,str);
fprintf(stderr,"zapsan radek.\n");
+ init=1;
}
}