AnsweredAssumed Answered

Help needed: Bad IEEE 488.2 binary block header

Question asked by Dotmatrix on Jun 21, 2010
Latest reply on Jun 30, 2010 by tabbott
Hi Folks,

i am a small technican and i have made additions to the web control website for our E4440 Analyzer.
The Addition s a drop down field where i can select and load states form the e4440.
For This i am using php. See Code below:

<body onload="javascript&#058; window.focus()">
<?php

set_time_limit(0);

$verbindung =  fsockopen("xxx.xxx.xxx.xxx", 5025); // connect to instrument ip is xxxed out
if(!$verbindung) {
    echo "Connection failed!";
}
else {
   echo "<font color='green'><center>State loaded !</center></font><br><br>";
  
   fputs($verbindung, ':MMEM:LOAD:STAT 1,\'C:\\Test.STA\''."\n");
  
}

?>
<script type='text/javascript'>
var homepage = 'navigation.html';
var sekunden = 3;

document.write('<div style="font-size: 12px; font-weight: bold; text-align: center;">Navigation will come back in <span id="counter_span">' + sekunden + '</span> seconds.</div>');

function countdownWeiterleitung()
{
     sekunden--;
     document.getElementById('counter_span').innerHTML = sekunden;
     if ( !sekunden ) {
          document.location.href = homepage;
     }
}

window.setInterval('countdownWeiterleitung()', 1000);
</script>


My problem s that everytime i want to load a state or do something else with this script the instrument sometimes does it or not.
I can't figure out why it does it or why it doesn't do it.
But everytime i do a command i get this Error on the serverwindow:

Jun 21 07:21:12:640 GMT+02:00 : #9 : Error getting new trace: Bad IEEE 488.2 binary block header.


Has this something to do with the problem that it sometimes does it and sometimes not?

I hope that you can help me with this. Perhaps somewone knows a better way how to send commands via a website to the instrument.

Thanks in advance !!!!!  

Outcomes