Take control of Agilent
That's a code to communicate with agilent 34410A by Ethernet (LAN connector) by Web Interface, with PHP and AJAX. I write code only to do measurements, but you can change the code to modify configuration of Agilent, etc... All commands of 34410A_Quick_Reference
To connect
On Agilent : Connect LAN with your network (cable Ethernet)
Shift:Utility->Remote I/O -> LAN -> YES -> View Wait a minute to configuration and read IP address.
With your server
if local server is used, install apache server (with XAMPP for exemple) and start apache service. Configure card network of your PC with Agilent IP (example 169.254.102.50 if Agilent IP is 169.254.102.195) And let's go.
Measure
Each second, one mesure, graphic is refresh with AJAX, and data is save on file TXT. You can used data for Exel file. Alert when data is = v42) You can add another entries on the form for easy configurations.
If you don't have alert, comment on index.php
/*if(yVal<=0.001) {
console.log("yVal<=0.001");
push_noty();
$.ajax({
method : 'POST',
url : 'push.php', // La ressource ciblée
data: { message : "Ceci est un test" },
dataType: "html"
});
}*/
Soft not working ? Check on your browser with IP Agilent, if you see error 404, you misconfigured.
If you want only source code PHP to communicate Agilent, go to ajax.php This file contains connection by socket, save data in text file.