File: hp4194a.php

package info (click to toggle)
linux-gpib-user 4.3.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,760 kB
  • sloc: ansic: 10,381; perl: 1,120; xml: 375; makefile: 335; yacc: 335; tcl: 308; python: 173; php: 157; lex: 144; sh: 134; lisp: 94
file content (34 lines) | stat: -rwxr-xr-x 755 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/php -q
<?
$u = ibfind("dev1");
print "numero d'unite = $u\n";
ibpad($u,23) or die("ibpad");
ibwrt($u,"RST");
ibwrt($u, "FNC2;SWT2;ATR2;ATT2;ZIR1;ZIT1;ITM2");
ibwrt($u, "NOA=4;NOP=41");
ibwrt($u, "START=100HZ;STOP=1MHZ");
ibwrt($u, "OSC=50mV");
ibrsp($u, &$status);
print "le status de rsp est $status\n";
ibwrt($u, "RQS2");
print "debut mesure....\n";
ibwrt($u, "SWTRG");
print "... mesure lancee\n";
ibwait($u,RQS);
print "... mesure finitte\n";
ibwrt($u, "STB?");
$reponse=ibrd($u,&$tampon,30);
$v = 0+$tampon;
print "la reponse STB est $v\n";

ibwrt($u,"A?");
$reponse=ibrd($u,&$tampon,10000);
print "le tableau A = $tampon\n";

// essai d'internalisation
eval ("\$A = array($tampon);");
foreach ($A as $a) {
  print $a . "\n";
}
?>