Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-GPIB and legacy Newport Orion-CM motion controller--timeout in MAX but not MATLAB

Solved!
Go to solution

I've got a bit of a bizarre GPIB issue that seems to be related to legacy GPIB implementation quirks.  The system I am using is a Newport Orion-CM, which has an electrostrictive actuator controller in it as well as a power monitor on separate GPIB addresses but one physical port.  I have this connected via a <= 2m cable to an NI PCI-GPIB board.  I've tried both the 2.6 and 2.2 NI-488.2 drivers and both act the same.

 

I've found that when I try to query the device via MAX, I can see in NI SPY that the first FindLstn finds 2 devices but times out (presumably trying an *IDN? command, since it reports no response).  After that, if I try any other commands via MAX or MATLAB, all the GPIB commands time out, so I must power cycle the Newport before it will be responsive again.  I've tried every permutation of settings for the GPIB driver set in MAX to no avail--always the same behavior.

 

Oddly enough, though, when I only use the device in MATLAB (using the Instrument Control toolbox), I am able to have some success, albeit with some timeouts every now and then which are not crippling in the same way the MAX one was.  I am able to open the device with:

 

mcobj = gpib('ni',0,1);

fopen(mcobj);

 

and query with:

 

fprintf(mcobj,'*IDN?');

data = fscanf(mcobj);

 

and get the correct *IDN? response.

 

Additionally, I can do writes and reads to the device (with intermittent time outs...I have found I need to leave at least 0.3 s between commands, which leads to some slow operation).

 

This has me stumped.  Obviously it appears the GPIB interface is functioning, perhaps slowly, but if I'm correct, the same driver should be operating the communication for both MAX and MATLAB, so why is MAX timing out while I'm able to have functioning in MATLAB?  Is there some low level setting that might be different that I can't change in MAX or the GPIB setup but is being set by MATLAB?

 

Any thoughts appreciated.  Newport as usual is mum about obsolete parts, and their manual is not much help aside from detailing the GPIB commands (nothing on bus specifications).

 

Thanks,

Scott

0 Kudos
Message 1 of 4
(3,930 Views)

Hello Scott,

 

I am unfamiliar with the MATLAB environment or the Instrument Control Toolbox that you are referring to.  Could you give an over view of how you would configure it and what drivers you have to point it to? Thanks.

ColeR
Field Engineer
0 Kudos
Message 2 of 4
(3,908 Views)

Hello Scott,

 

Found out a little more for you.  I asked the first question to make sure that we were using the NI-VISA driver and since then I have learned that yes, yes we do.  With that being the case, grab a Spy capture of your queries so that we can get a better idea of what is being passed across the bus.  

 

Not sure how to do this? Good news! We have just the KB for you.

ColeR
Field Engineer
0 Kudos
Message 3 of 4
(3,875 Views)
Solution
Accepted by topic author scotbrad1

Thanks for the tips.  It looks like the old Newport is just simply really, really slow (must be mid-1990s hardware), so it needs a good break between send it GPIB commands.  I installed the legacy 1.7 drivers, and those at least will correctly get the *IDN? response from the device.  The MATLAB gpib interface is simple enough that you can give sufficient pauses between send commands to the Newport, so in it I'm able to control how long to wait between commands.

 

It seems this is just a matter of a slow device.  I'm not sure what the internals of FindLstn look like and therefore why the new version of MAX times out while the old ones does not, but for really old hardware there might be GPIB write/reads in the new driver that are too fast to actually allow really old hardware enough time to respond.  Thanks again for the input.

0 Kudos
Message 4 of 4
(3,863 Views)