주요 콘텐츠

이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.

daq.getDevices

(권장하지 않음) 사용 가능한 데이터 수집 장치 표시

session 객체 함수는 권장되지 않습니다. 대신 DataAcquisition 객체 함수를 사용하십시오. 버전 내역 항목을 참조하십시오.

설명

daq.getDevices는 시스템에서 사용할 수 있는 장치를 나열합니다.

  • 이 툴박스에서 지원하지 않는 장치는 출력 목록에서 별표(*)로 표시됩니다. 지원되는 장치의 전체 목록을 보려면 https://www.mathworks.com/hardware-support/data-acquistion-software.html을 참조하십시오.

  • daq.getDevices에서 작동하지 않는 공급업체에 대한 진단 정보를 숨기려면 disableVendorDiagnostics 함수를 실행하십시오. 이 진단 기능을 다시 켜려면 enableVendorDiagnostics를 실행하십시오.

device = daq.getDevices는 장치 목록을 변수 device에 할당합니다.

예제

예제

모두 축소

시스템에서 사용할 수 있는 모든 장치의 목록을 가져와 d 변수에 저장하십시오.

 d = daq.getDevices
d = 

index   Vendor    Device ID                            Description                           
----- ----------- --------- -----------------------------------------------------------------
1     directsound Audio0    DirectSound Primary Sound Capture Driver
2     directsound Audio1    DirectSound Digital Audio (S/PDIF) (High Definition Audio Device)
3     directsound Audio3    DirectSound HP 4120 (2- HP 4120)
4     ni          cDAQ1Mod1 National Instruments NI 9205
5     ni          cDAQ1Mod2 National Instruments NI 9263
6     ni          cDAQ1Mod3 National Instruments NI 9234
7     ni          cDAQ2Mod1 National Instruments NI 9402
8     ni          cDAQ2Mod2 National Instruments NI 9205
9     ni          cDAQ2Mod3 National Instruments NI 9375
10    ni          Dev1      National Instruments USB-6211
11    ni          Dev2      National Instruments USB-6218
12    ni          Dev3      National Instruments PCI-6255
13    ni          PXI1Slot2 National Instruments PXI-4461
14    ni          PXI1Slot3 National Instruments PXI-4461

섀시 내의 특정 장치나 모듈에 대한 자세한 정보를 확인하려면 d(index)를 입력하십시오. 예를 들어, 인덱스가 7인 NI 9402에 대한 정보를 얻으려면 다음을 입력하십시오:

 d(7)
ans = 

ni: National Instruments NI 9402 (Device ID: 'cDAQ2Mod1')
   Counter input subsystem supports:
      Rates from 0.1 to 80000000.0 scans/sec
      4 channels ('ctr0','ctr1','ctr2','ctr3')
      'EdgeCount','PulseWidth','Frequency','Position' measurement types
   
   Counter output subsystem supports:
      Rates from 0.1 to 80000000.0 scans/sec
      4 channels ('ctr0','ctr1','ctr2','ctr3')
      'PulseGeneration' measurement type
   
This module is in slot 1 of the 'cDAQ-9178' chassis with the name 'cDAQ2'.

또한 목록에서 장치 이름을 클릭하면 다음과 같은 자세한 장치 정보를 액세스할 수 있습니다:

  • 서브시스템 유형

  • 레이트

  • 사용 가능한 채널 수

  • 측정 유형

장치 객체의 속성을 확인하여 장치에 대한 정보를 살펴보십시오.

사용 가능한 장치를 확인하십시오.

d = daq.getDevices
d = 

Data acquisition devices:

index Vendor Device ID          Description         
----- ------ --------- -----------------------------
1     ni     cDAQ1Mod1 National Instruments NI 9201
2     ni     cDAQ2Mod1 National Instruments NI 9201
3     ni     Dev1      National Instruments USB-6211
4     ni     Dev2      National Instruments USB-6218
5     ni     Dev3      National Instruments USB-6255
6     ni     Dev4      National Instruments USB-6363
7     ni     PXI1Slot2 National Instruments PXI-4461
8     ni     PXI1Slot3 National Instruments PXI-4461 

인덱스 1에 있는 장치 ID cDAQ1Mod1의 NI 9201 속성을 확인하십시오.

d(1)
ans = 

ni: National Instruments NI 9201 (Device ID: 'cDAQ1Mod1')
   Analog input subsystem supports:
      -10 to +10 Volts range
      Rates from 0.1 to 800000.0 scans/sec
      8 channels ('ai0','ai1','ai2','ai3','ai4','ai5','ai6','ai7')
      'Voltage' measurement type
   
This module is in slot 4 of the 'cDAQ-9178' chassis with the name 'cDAQ1'.

Properties, Methods, Events

Properties 링크를 클릭하면 장치 객체의 속성을 확인할 수 있습니다.

  ChassisName: 'cDAQ1'
    ChassisModel: 'cDAQ-9178'
      SlotNumber: 4
     IsSimulated: true
       Terminals: [48x1 cell]
          Vendor: National Instruments
              ID: 'cDAQ1Mod1'
           Model: 'NI 9201'
      Subsystems: [1x1 daq.ni.AnalogInputInfo]
     Description: 'National Instruments NI 9201'
RecognizedDevice: true

IsSimulated 값이 true임을 유의하십시오. 이는 해당 장치가 시뮬레이션된 것임을 나타냅니다.

사용 가능한 장치를 확인하십시오.

d = daq.getDevices
d = 

Data acquisition devices:

index Vendor Device ID          Description          
----- ------ --------- ------------------------------
1     ni     cDAQ1Mod1 National Instruments NI 9205
2     ni     cDAQ1Mod2 National Instruments NI 9263
3     ni     cDAQ1Mod3 National Instruments NI 9234
4     ni     cDAQ1Mod4 National Instruments NI 9201
5     ni     cDAQ1Mod5 National Instruments NI 9402
6     ni     cDAQ1Mod6 National Instruments NI 9213
7     ni     cDAQ1Mod7 National Instruments NI 9219
8     ni     cDAQ1Mod8 National Instruments NI 9265

인덱스 1에서 NI 9205의 Terminals 속성에 액세스합니다.

d(1).Terminals
ans = 

    'cDAQ1/PFI0'
    'cDAQ1/PFI1'
    'cDAQ1/20MHzTimebase'
    'cDAQ1/80MHzTimebase'
    'cDAQ1/ChangeDetectionEvent'
    'cDAQ1/AnalogComparisonEvent'
    'cDAQ1/100kHzTimebase'
    'cDAQ1/SyncPulse0'
    'cDAQ1/SyncPulse1'
        ⋮

출력 인수

모두 축소

DeviceInfo 객체 배열로 반환되는 장치 목록.

버전 내역

R2010b에 개발됨

모두 축소

참고 항목

함수