- 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
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (3개)
Ankit Desai
2011년 4월 15일
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.
-Ankit
댓글 수: 5
Ankit Desai
2011년 5월 5일
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
Martijn
2011년 5월 11일
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
Martijn
2011년 5월 12일
Based on your screenshots, I would say you need 'DAQ::PXI1Slot2' instead of 'PXI1Slot2'.
참고 항목
카테고리
Help Center 및 File Exchange에서 Instrument Connection and Communication에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!