Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

MATLAB with GPIB-ENET/100 and R&S CMU-200 instrument

Hi,
 
I have been trying to get a Rohde & Schwarz CMU-200 Universal Radio Communication Tester over GPIB with the NI GPIB-ENT. The Rohde & Schwarz device is a little unique in that it has multiple secondary addresses and requires you to specify one for it to work. I can succesfully execute the following commands in MATLAB:
>> g = gpib('ni',0,21,'SecondaryAddress',96);
>> fopen(g)
>> query(g,'*IDN?')
ans =
Rohde&Schwarz,CMU 200-1100.0008.02,104806,V4.30
>> fclose(g)
 
This would be find if I wanted to write my own driver. However, Rohde & Schwarz has a VXIplug&play driver available for use. The MATLAB Instrument Control Toolbox can generate a MATLAB driver from this VXIplug&play driver, but I am required to connect in a different way using a VISA resource string. When I try the following, it fails:
>> d = icdevice('rohdeschwarz_cmu200', 'GPIB0::21::0::INSTR');
Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness. Warning text can be viewed using:
[notfound,warnings]=loadlibrary(...)
>> connect(d)
??? The VXIplug&play driver could not connect to the instrument using the specified resource.
If this error is not an instrument error, use MIDEDIT to inspect the driver.

For further investigation, I tried opening a connection to the device using the visa() function in MATLAB, I am unable to query the instrument. Here are the commands I type:
>> g = visa('ni','GPIB0::21::0::INSTR');
fopen(g);
>> query(g,'*IDN?')
??? Error using ==> icinterface.query
VISA: No listeners condition is detected (both NRFD and NDAC are deasserted).

I am not sure what that error message means. However, I tried using the NI Spy tool. A ton of messages were returned, but one in particular stuck out at me:
11. viOpen (0x0007CD78, "GPIB0::21::INSTR", 0, 0, 0x0007CDC0)
Process ID: 0x00000858 Thread ID: 0x00000A68
Start Time: 09:23:07.882 Call Duration: 00:00:00.281
Status: 0x3FFF007D (VI_SUCCESS_DEV_NPRESENT)

It seems as though the secondarry address information has been stripped out of the VISA string. I have a feeling this has to do with a bug in MATLAB. I have been in contact with the MathWorks. However, if anyone on this board could offer their opinions on what the problem may be or any other insights, it would be appreciated!

Thanks.

0 Kudos
Message 1 of 2
(4,802 Views)

Hello. 

Thank you for posting to the NI Discussion Forums. 

I agree with you that this may be an issue with either the 3rd party driver or with MATLAB's IC Toolbox.  However, just to cover all angles of the troubleshooting process, are you able to communicate with this instrument via Measurement and Automation Explorer (MAX) using the NI-488.2 Communicator?  If this is working fine, then we have certainly proven that our driver and our hardware are acting as expected.  Please reference the following knowledge base article for full installation and configuration instructions for this device:

Setting Up the GPIB-ENET/100
http://digital.ni.com/public.nsf/allkb/0AB7B2327671DB2C86256F23005BAEA4

Please let us know if you make any progress on this either through my recommended steps or through advice you receive from The Mathworks. 

Good luck on your application!

Brian F
Applications Engineer
National Instruments

0 Kudos
Message 2 of 2
(4,766 Views)