I can not use functions for NI device

6 vues (au cours des 30 derniers jours)
mado
mado le 31 Juil 2013
I found I can not use some functions when I tried to acquire data with ni product usb-6008.
for example,
s = daq.createSession('ni'),daq.getDevices,addAnalogInputChannel.
I can not use them, the error is: Undefined variable "daq" or class "daq.createSession". Undefined function or variable 'daq'.and so on. what's the matter?

Réponses (3)

Walter Roberson
Walter Roberson le 31 Juil 2013
You do not have the DAT installed, or not licensed, or you are using a version of MATLAB that does not support session based acquisition.
Which MATLAB release are you using?
Does
which -all daq
show any result?
  2 commentaires
Walter Roberson
Walter Roberson le 31 Juil 2013
The first support for session-based interfaces was R2010b, the release after the one you had. With your software you will need to use the legacy interface.
Note: not all NI devices were supported in R2010b; more devices were added with each release from R2010b.
mado
mado le 1 Août 2013
Modifié(e) : mado le 1 Août 2013
my version have daq toolbox however the functions are not existed when calling in command window , how could that be ?till now i didn't use any interface ( legacy or session) i just couldn't recall " daq " .

Connectez-vous pour commenter.


mado
mado le 31 Juil 2013
Modifié(e) : mado le 31 Juil 2013
it shows 'daq' not found. and i am using
% MATLAB Version 7.10.0.499 (R2010a)
%MATLAB License Number: ••••••
%Operating System: Microsoft Windows 7 Version 6.1 (Build 7600)
%Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java %HotSpot(TM) Client VM mixed mode
------------------------------------------------------------------------------
MATLAB Version 7.10 (R2010a)
Simulink Version 7.5 (R2010a)
Aerospace Blockset Version 3.5 (R2010a)
Aerospace Toolbox Version 2.5 (R2010a)
Control System Toolbox Version 8.5 (R2010a)
Curve Fitting Toolbox Version 2.2 (R2010a)
DO Qualification Kit Version 1.2 (R2010a)
Data Acquisition Toolbox Version 2.16 (R2010a)
Database Toolbox Version 3.7 (R2010a)
Datafeed Toolbox Version 3.5 (R2010a)
EDA Simulator Link Version 3.1 (R2010a)
Embedded IDE Link Version 4.1 (R2010a)
Filter Design HDL Coder Version 2.6 (R2010a)
Filter Design Toolbox Version 4.7 (R2010a)
Financial Derivatives Toolbox Version 5.5.1 (R2010a)
Financial Toolbox Version 3.7.1 (R2010a)
Fixed-Income Toolbox Version 1.9 (R2010a)
Fixed-Point Toolbox Version 3.1 (R2010a)
Fuzzy Logic Toolbox Version 2.2.11 (R2010a)
Gauges Blockset Version 2.0.5 (R2010a)
Global Optimization Toolbox Version 3.0 (R2010a)
IEC Certification Kit Version 1.2 (R2010a)
Image Acquisition Toolbox Version 3.5 (R2010a)
Instrument Control Toolbox Version 2.10 (R2010a)
MATLAB Builder EX Version 1.2.15 (R2010a)
MATLAB Builder JA Version 2.1 (R2010a)
MATLAB Builder NE Version 3.1 (R2010a)
MATLAB Compiler Version 4.13 (R2010a)
MATLAB Distributed Computing Server Version 4.3 (R2010a)
MATLAB Report Generator Version 3.8 (R2010a)
Mapping Toolbox Version 3.1 (R2010a)
Mixed-Signal Library Version 2.0 (R2012a)
Model Predictive Control Toolbox Version 3.2 (R2010a)
Model-Based Calibration Toolbox Version 4.0 (R2010a)
Neural Network Toolbox Version 6.0.4 (R2010a)
OPC Toolbox Version 2.1.5 (R2010a)
Optimization Toolbox Version 5.0 (R2010a)
Parallel Computing Toolbox Version 4.3 (R2010a)
Partial Differential Equation Toolbox Version 1.0.16 (R2010a)
RF Blockset Version 2.5.1 (R2010a)
RF Toolbox Version 2.7 (R2010a)
Real-Time Windows Target Version 3.5 (R2010a)
Real-Time Workshop Version 7.5 (R2010a)
Real-Time Workshop Embedded Coder Version 5.5 (R2010a)
Robust Control Toolbox Version 3.4.1 (R2010a)
Signal Processing Blockset Version 7.0 (R2010a)
Signal Processing Toolbox Version 6.13 (R2010a)
SimBiology Version 3.2 (R2010a)
SimDriveline Version 1.5.4 (R2010a)
SimElectronics Version 1.4 (R2010a)
SimEvents Version 3.1 (R2010a)
SimHydraulics Version 1.7 (R2010a)
SimMechanics Version 3.2 (R2010a)
SimPowerSystems Version 5.2.1 (R2010a)
Simscape Version 3.3 (R2010a)
Simulink 3D Animation Version 5.1.1 (R2010a)
Simulink Control Design Version 3.1 (R2010a)
Simulink Design Optimization Version 1.1.1 (R2010a)
Simulink Design Verifier Version 1.6 (R2010a)
Simulink Fixed Point Version 6.3 (R2010a)
Simulink HDL Coder Version 1.7 (R2010a)
Simulink PLC Coder Version 1.0 (R2010a)
Simulink Report Generator Version 3.8 (R2010a)
Simulink Verification and Validation Version 2.7 (R2010a)
Spline Toolbox Version 3.3.8 (R2010a)
Spreadsheet Link EX Version 3.1.1 (R2010a)
Stateflow Version 7.5 (R2010a)
Stateflow Coder Version 7.5 (R2010a)
Statistics Toolbox Version 7.3 (R2010a)
Symbolic Math Toolbox Version 5.4 (R2010a)
System Identification Toolbox Version 7.4 (R2010a)
SystemTest Version 2.5 (R2010a)
Target Support Package Version 4.1 (R2010a)
xPC Target Version 4.3 (R2010a)
xPC Target Embedded Option Version 4.3 (R2010a)
>>
  2 commentaires
mado
mado le 1 Août 2013
any help?
Walter Roberson
Walter Roberson le 1 Août 2013
I already responded above. Your version does not support session-based interface at all.

Connectez-vous pour commenter.


Eric Keller
Eric Keller le 1 Août 2013
if you have a 32 bit system and can't upgrade matlab, use the legacy interface.

Catégories

En savoir plus sur Hardware-in-the-Loop Simulation with Simulink Real-Time dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by