- If the device is a traditional NI-DAQ (Legacy) device that shows up as "Device 2" - the resource string will be DAQ::2
- If the device however is a NI-DAQmx that shows up as "PXI1Slot6" the resource string will be DAQ::PXI1Slot6
Help request: using Instrument Control toolbox with Ni-Scope and PXI-5122
1 view (last 30 days)
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 ...)
command seems successful and the
niScopeObj = icdevice('niscope.mdd', 'DAQ::1')
Instrument Device Object Using Driver : niScope
Manufacturer: National Instruments Corp.
Model: NI Digitizers
DriverType: MATLAB IVI
but when I do
I get the error:
??? Error using ==> icdevice.connect at 117
The VXIplug&play driver could not connect to the instrument using the
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
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.
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.