rolfn / node-vxi11

A nodejs module for VXI-11 communication.
MIT License
6 stars 1 forks source link

working devices (an unissue) #1

Closed wactbprot closed 9 years ago

wactbprot commented 10 years ago

I successfully tested the driver over a E5810 from Agilent Tecnologies with an

var vxi = require('vxi11').vxiTransceiver,
    resfn = function(result) {
      console.log('result: »' + result + '«')
    },
    ipadr = 'xx.xx.xx.xx';

vxi(ipadr, 'gpib0,5', '*IDN?', resfn);
//»HEWLETT-PACKARD,34970A,0,13-2-2
//«

// Temperature init with pt100
var es = 'CONF:TEMP FRTD,91,1,MAX,(@101,102,103,104,105,106,107,108,109,110,)\nUNIT:TEMP C\nCONF?';
vxi(ipadr, 'gpib0,5',es , resfn);

// periotic temperature read out with pt100
setInterval(function(){
  vxi(ipadr, 'gpib0,5', 'READ?', resfn);
},1000)
//result: »+2.37710000E+01,+2.23950000E+01, ...
//«
//result: »+2.37710000E+01,+2.24360000E+01, ...
//«
//...
var o = {
  host: ipadr,
  device: 'gpib0,2',
  readTimeout: 100,
  ioTimeout: 0,
  lockTimeout: 0,
  lockDevice: true,
  termChar: 0
};
o.command = 'T\n';
vxi(o, resfn);
//result: »A  22.45C
//«
o.command = '?_\n';
vxi(o, resfn);
//result: »A  22.46CF3H0L0M@P0R0U0Z0
//«
wactbprot commented 10 years ago

... furthermore

vxi(ipadr, 'gpib0,9', '*IDN?', resfn);
//result: »MKS INSTRUMENTS INC, MODEL 670, 0, SW Version 1.1«
vxi(ipadr, 'gpib0,8', '*IDN?', resfn);
//result: »MKS Instruments MKS670BD81 0 1.2«
var es = ":digit 5.5\n:sens:scan(@1):puni mbar\n:sens:scan(@1):aver 1\n:sens:func pres\n:meas:func\n"
vxi(ipadr, 'gpib0,8', es, resfn);
//result: »MEASURING  10.02E-3«
setInterval(function(){
  vxi(ipadr, 'gpib0,8', ':meas:func\n', resfn);
},1000)
//result: »MEASURING  10.03E-3«
//result: »MEASURING  10.02E-3«
//...