필터 지우기
필터 지우기

Real-time Data Acquisition Using NI-USB 6009

조회 수: 36 (최근 30일)
Muhammad Hadyan Utoro
Muhammad Hadyan Utoro 2022년 10월 4일
답변: Anshuman 2023년 8월 31일
Hello everyone!
I have a project using NI USB-6009 and an Incremental Rotary Encoder (Megatron SPNT Series). I would like to do a real-time masurement (e.g., calculating angular velocity) and have seen few examples through MathWorks video. The problems are, first, another type of NI device was used during the examples. I was just wondering if it is possible to do the real-time masurement using NI USB-6009? Second, if it is possible, can I plot the square waveform to do further calculation?
I really appreciate your help
Regards
Muhammad

답변 (1개)

Anshuman
Anshuman 2023년 8월 31일
Hi Muhammad,
To perform real-time measurements with the NI USB-6009 and an Incremental Rotary Encoder, you can use MATLAB's Data Acquisition Toolbox. You can follow the following steps:
  1. Use the 'daq.createSession' function in MATLAB to create a data acquisition session object. Configure the session to specify the input channels, sampling rate, and other relevant settings.
  2. Use the session object to define the measurement task. This involves specifying the type of measurement you want to perform, such as measuring the voltage or frequency from the Incremental Rotary Encoder.
  3. Use the 'startForeground' function to start the data acquisition and acquire the data in real-time. You can then process the acquired data, calculate the angular velocity, and perform any further calculations or analysis as needed.
Regarding plotting the square waveform, once you have acquired the data from the Incremental Rotary Encoder, you can use MATLAB's plotting functions, such as 'plot', to visualize the waveform.
Hope it helps!

카테고리

Help CenterFile Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by