Help request: using Instrument Control toolbox with Ni-Scope and PXI-5122

4 views (last 30 days)
Hi Everyone,
I'm trying to use Matlab (2011a) with the Instrument Control toolbox (2.12) to control a NI PXI-5122 Digitizer (which should be supported: http://www.mathworks.com/products/instrument/hardware/national-instruments.html).
The PXI-5122 and a NI-PXI 8106 embedded controller (with winXP and Matlab) are mounted in a PXI-1042Q chassis .
Now I'm trying to follow the demo "Using the NI-SCOPE driver with National Instruments Devices" ( http://www.mathworks.com/products/instrument/demos.html?file=/products/demos/shipping/instrument/demo_niscope.html )
First I had installed the NI-SCOPE driver version 3.7 and I got error after the " makemid('niscope') " command... then I noticed in the documentation that the Instrument Control toolbox supports NI-SCOPE 3.4 so I downgraded my NI-SCOPE drivers. (hey 3.4 is from 2007 !! the last version is 3.8 ...)
Now the
makemid('niscope')
command seems successful and the
niScopeObj = icdevice('niscope.mdd', 'DAQ::1')
also with:
Instrument Device Object Using Driver : niScope
Instrument Information
Type: IVIInstrument
Manufacturer: National Instruments Corp.
Model: NI Digitizers
Driver Information
DriverType: MATLAB IVI
DriverName: niScope
DriverVersion: 1.0
Communication State
Status: closed
but when I do
connect(niScopeObj);
I get the error:
??? Error using ==> icdevice.connect at 117
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.
I think the resource name could be wrong but where I am supposed to find the correct resource name?
I tried with 'DAQ::1', with 'pxi5122' (which is the name that I see in NI Measurement & automation Explorer), 'PXI11::15::INSTR' (which should be the address of slot 2 in my chassis according to http://digital.ni.com/public.nsf/allkb/2D18F70FD412A28286256B66005414FE )
I've also tried with and without " 'optionstring','simulate=true' " but nothing...
I noticed also that in MIDEDIT under "Initialization and cleanup" the Create, Connect and Disconnect functions are empty apart a comment...is this correct?
Please help me! :-)
Thank you, Best Regards
D.

Answers (3)

Ankit Desai
Ankit Desai on 15 Apr 2011
You can get the correct resource string from either the NISCOPE front panel application that comes with the NISCOPE driver or from NI Measurement & Automation Explorer.
Once you open the NISCOPE front panel, the application will bring a pop up dialog asking you to select a device. You can get the resource string from that dialog box.
Another way to get the resource string is to look at NI Measurement & Automation Explorer.
  1. If the device is a traditional NI-DAQ (Legacy) device that shows up as "Device 2" - the resource string will be DAQ::2
  2. If the device however is a NI-DAQmx that shows up as "PXI1Slot6" the resource string will be DAQ::PXI1Slot6
-Ankit
  5 Comments
Ankit Desai
Ankit Desai on 5 May 2011
I am not able to reproduce the issue with NI PXI-5102, NISCOPE version 3.4.
Make sure you have NI front panel closed before you try to connect from MATLAB command line.
Also you can try installed version 4.1 of the NI IVI Compliance Package (NICP) from http://joule.ni.com/nidu/cds/view/p/id/1420/lang/en.
If none of those work, it would be best to call MathWorks Technical Support - support@mathworks.com
Daniel
Daniel on 11 May 2011
When I try to install this package I get:
Cannot install
IVI Compliance Package 4.1 (higher version already installed)
IVI Class Drivers (higher version already installed)
LabVIEW 2009 (32-bit) Support (incompatible with products already installed)
LabVIEW 8.6 Support (higher version already installed)
LabVIEW 8.5 Support (incompatible with products already installed)
LabVIEW 8.2 Support (incompatible with products already installed)
LabWindows/CVI Support (incompatible with products already installed)
Measurement Studio for Visual C++ 2003 Support (incompatible with products already installed)
Measurement Studio 6.0 Visual C++ Support (incompatible with products already installed)
IVI Class Simulation Drivers (higher version already installed)
IVI-COM Adapters (incompatible with products already installed)
Online Help (higher version already installed)
So I'll try to reinstall everything and eventually to contact support.
Where I can find EXACTLY which driver/software AND version is required and guaranteed to work with NI-SCOPE based instruments? NI-SCOPE 3.4 drivers are exactly and all what I need from NI?

Sign in to comment.


Martijn
Martijn on 11 May 2011
To add to Ankit's instructions, there is also a third option:
3. The device can be NI-DAQmx and show up as "Dev1" or "Dev2", etc. in that case use 'Dev1' or 'Dev2', etc as resource string.
  3 Comments
Martijn
Martijn on 12 May 2011
Based on your screenshots, I would say you need 'DAQ::PXI1Slot2' instead of 'PXI1Slot2'.
Daniel
Daniel on 12 May 2011
Already tried as you can see in my first (hidden) comment to Ankit answer.

Sign in to comment.


FENGYUN WANG
FENGYUN WANG on 22 Feb 2020
Hi Have you solved this issue?

Categories

Find more on Instrument Connection and Communication in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!