Agilent Technologies FS2010 Uživatelská příručka Strana 92

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 160
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 91
92 Agilent VISA User’s Guide
3 Programming with VISA
/* Make sure no other process or thread does
anything to this resource between the
viPrintf() and the viScanf()calls Note: this
also locks out the processes with which we
shared our 'shared lock' key. */
viLock (vi, VI_EXCLUSIVE_LOCK, 2000,
VI_NULL,VI_NULL);
/* Send an *IDN? string to the device */
viPrintf (vi, "*IDN?\n");
/* Read results */
viScanf (vi, "%t", &buf);
/* unlock this session so other processes and
threads can use it */
viUnlock (vi);
/* Print results */
printf ("Instrument identification string:
%s\n", buf);
/* release the shared lock also*/
viUnlock (vi);
/* Close session */
viClose (vi);
viClose (defaultRM);
}
Zobrazit stránku 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 159 160

Komentáře k této Příručce

Žádné komentáře