forked from 7m4mon/visa32test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (39 loc) · 1.27 KB
/
index.html
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
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>NODE.JS INTERACTIVE IO</title>
</head>
<body>
<h1>NODE.JS INTERACTIVE IO</h1>
<input type="text" id="visaaddress" value="GPIB0::12::INSTR" />
<input type="text" id="command" value="*IDN?" />
<button>SEND</button>
<h3>Receive Message</h3>
<script src="/socket.io/socket.io.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script>
var socket = io();
$('button').click(function(){
var addr = $("#visaaddress").val();
var cmd = $("#command").val();
var msg = {
addr : addr,
cmd : cmd
}
socket.emit('sendmsg',msg);
});
socket.on('recvmsg',function(data){
$('h3').text(data);
});
</script>
<p>Common commands for HP 662xA</p>
<ul>
<li>ID?</li>
<li>VOUT? 1</li>
<li>output 2 to 450mA: ISET 2,.450</li>
<li>To turn off output 1: OUT 1,0</li>
<li>common: VSET, ISET, VOUT?, IOUT?, OUT, OVSET, and OCP</li>
</ul>
</body>
</html>