Discussion Forums are temporarily in read only mode. All forums are visible but posting is not possible. Please check back shortly.

Thread: Controlling a Scope (54831D) from Linux using LAN


Permlink Replies: 9 - Pages: 1 - Last Post: May 22, 2012 7:20 AM Last Post By: algoss
rayad

Posts: 12
Registered: 04/04/12
Controlling a Scope (54831D) from Linux using LAN
Posted: Apr 6, 2012 6:57 AM
Click to report abuse...   Click to reply to this thread Reply
Dear All, I was adviced by Al to open this thread so probably I found someone who worked on controlling An agilent scope (for me is 54831D) from a Linux box. The LAN I/O library in Agilent website exists in windows only. The solution is to use sockets TCP/IP communication that I worked on before but if someone has ready code it will be faster. The other alternative is to have the windows C libray code so that I can migrate it to Linux.

Thank you, Rachid
rayad

Posts: 12
Registered: 04/04/12
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: Apr 6, 2012 7:07 AM   in response to: rayad in response to: rayad
Click to report abuse...   Click to reply to this thread Reply
Al, I found the following website http://optics.eee.nottingham.ac.uk/agilent_scope/ and it seems it houses a code to control agilent scopes from linux using LAN. I will work on it and tell you.

Rachid
rayad

Posts: 12
Registered: 04/04/12
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: Apr 7, 2012 5:50 AM   in response to: rayad in response to: rayad
Click to report abuse...   Click to reply to this thread Reply
Al, Everything works with VXI11 communication libray (using RPC) in Linux. The O-scope is fully controlled through ethernet.

Thank you Al for your effort.

Rachid
algoss


Posts: 583
Registered: 11/03/06
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: Apr 9, 2012 8:24 AM   in response to: rayad in response to: rayad
Click to report abuse...   Click to reply to this thread Reply
Rachid,

I'm glad it worked out.

Al
rayad

Posts: 12
Registered: 04/04/12
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: Apr 10, 2012 1:25 AM   in response to: algoss in response to: algoss
Click to report abuse...   Click to reply to this thread Reply
Al, Sorry just read you message. Really thank you for all your effort and advices. Now I am programming an online task to take Lab data (waveforms) with the O-scope.

Also, I have a small question: can we measure current on the channel with this O-scope and how small we can measure it? probably you have a quick answer before I look into the Doc.

Rachid

algoss


Posts: 583
Registered: 11/03/06
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: Apr 10, 2012 4:56 AM   in response to: rayad in response to: rayad
Click to report abuse...   Click to reply to this thread Reply
Oscilloscopes measure voltage. The input at the front panel only reponds to voltage values.

It is possible to measure current, if you can turn it into a voltage. There are 2 ways to do that.

  • You can put a small sense resistor into the circuit and measure the voltage across it. Using the e=ir equation, you can calculate the current.

  • You can buy a current probe. These generally clamp onto a wire, and using either induction or Hall efect, they turn the current into voltage.

Al
rayad

Posts: 12
Registered: 04/04/12
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: May 19, 2012 3:08 AM   in response to: algoss in response to: algoss
Click to report abuse...   Click to reply to this thread Reply
Dear Al, We wrote a lot of code for our Lab DAQ to take data with the agilent O-Scope including a trigger scan utility to compute frequency versus trigger level. But it seems the scope hangs when there is no any trigger even after the vxi timeout and the hanging only disapears when we change the signal amplitude or reboot the scope, else the scope will not answer to any vxi command during hanging.

Thank you, Rachid
algoss


Posts: 583
Registered: 11/03/06
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: May 22, 2012 6:17 AM   in response to: rayad in response to: rayad
Click to report abuse...   Click to reply to this thread Reply
I've run into the before and I'm trying to remember the complete issue.

Scopes have a minimum trigger voltage that they will respond to. That voltage is dependent on the scope and the V/div setting. Many people use 'Auto' trigger. In that case, if the scope doesn't see a trigger, that it forces a trigger at a 'random' time, just so the user will see something on the screen. In some programming modes, the SW will hang because the scope never sees a real trigger, just the forced one.

Try running the scope manually, with the signals and settings you'll need to capture your signal. Make sure that Auto trigger is turned off. Does the scope trigger? Try adjusting the trigger level and/or the V/div setting. Can you make it trigger reliably in manual mode? If so, change your program so that it uses the same settings that worked manually.

If you can't get the scope to trigger manually, then it will never trigger programmatically. In that case you need to change the way you communicate with the scope. Look at the manual section on synchronization. "Blocking Synchronization" which you are using, will cause a timeout. "Polling Synchronization" will not.

Al

Edited by: algoss on May 22, 2012 8:23 AM
rayad

Posts: 12
Registered: 04/04/12
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: May 22, 2012 7:17 AM   in response to: algoss in response to: algoss
Click to report abuse...   Click to reply to this thread Reply
Hello Al, We found a different way to look at the pulse frequency by counting the trigger bit in the status register for a fixed time. This way is really matching what we need for the moment.

Thank you, Rachid
algoss


Posts: 583
Registered: 11/03/06
Re: Controlling a Scope (54831D) from Linux using LAN
Posted: May 22, 2012 7:20 AM   in response to: rayad in response to: rayad
Click to report abuse...   Click to reply to this thread Reply
OK, so you're using Polling.

I'm glad it's working for you.

Al

Point your RSS reader here for a feed of the latest messages in all forums