LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview를 통해 스펙트럼 측정을 하려는데 너무 어려워요..

안녕하세요. 제가 하려는 건 다음과 같습니다.

 

Labview를 통해 스펙트럼 측정

1. VISA resource name으로 USB를 통해 측정된 spectrum 가져오기

2. baseline 값 만들기
-측정 횟수 지정
-array 공간에 VISA로 측정된 spectrum을 측정 횟수만큼 누적 더하기
-누적 더하기된 데이터를 측정 횟수로 나누기
-baseline 값 저장하기

3. 측정 값 만들기
-array 공간에 VISA로 측정된 spectrum을 측정 횟수만큼 누적 더하기
-누적 더하기된 데이터를 측정 횟수로 나누기
-측정한 spectrum에서 앞서 저장한 baseline값을 빼기
-측정 결과 값 저장하기

4. 측정 결과 값 csv로 저장하기
-파일 저장 위치, 파일 저장명을 사용자가 지정할 수 있도록 하기

 

Kim_Hyun_0-1724053162872.png

계획한 과정에서 해결된 건 2번의 측정 횟수 지정까지 뿐입니다..

VISA resource name으로 USB를 통해 측정된 spectrum 가져와서 array 공간에 spectrum을 측정 횟수만큼 누적 더하기가 하고 싶은데, 빈 array를 만든 뒤에 어떻게 해야지 누적 더하기가 되는지를 모르겠습니다
labview를 완전 처음 써보는거라 아직 미숙해 자세한 설명 부탁드립니다..!!

0 Kudos
Message 1 of 3
(270 Views)

According to ChatGPT:
"

Hello. Here is what I am trying to do:

### Spectrum Measurement through LabVIEW

1. **Retrieve the Spectrum using VISA Resource Name via USB**
- Obtain the measured spectrum via USB using the VISA resource name.

2. **Create a Baseline Value**
- Specify the number of measurements.
- Accumulate the spectrum measured with VISA in an array for the specified number of measurements.
- Divide the accumulated data by the number of measurements.
- Save the baseline value.

3. **Create the Measured Value**
- Accumulate the spectrum measured with VISA in an array for the specified number of measurements.
- Divide the accumulated data by the number of measurements.
- Subtract the previously saved baseline value from the measured spectrum.
- Save the measurement result.

4. **Save the Measurement Result as a CSV File**
- Allow the user to specify the file save location and file name.

---

So far, I have only managed to complete up to step 2, where I specify the number of measurements.

I want to retrieve the spectrum measured via USB using the VISA resource name and accumulate the spectrum in an array for the specified number of measurements. However, I'm not sure how to perform the accumulation after creating an empty array. Since I am completely new to LabVIEW, I'm still unfamiliar with it, so I would appreciate a detailed explanation. Thank you!"

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(250 Views)

Hi Kim,

 


@Kim_Hyun wrote:

 

Kim_Hyun_0-1724053162872.png

In the planned process, only the number of measurements specified was resolved twice..

I want to bring the spectrum measured via USB as a VISA resource name and add the spectrum to the array space as many times as the number of measurements, but I don't know how to add the cumulative number after creating an empty array.
I'm completely new to Labview, so I'm still inexperienced, so please explain in detail..!!


You REALLY should do some LabVIEW training first (as offered at the top of the LabVIEW board)!

 

  • You didn't create an "empty array", but an "empty undefined array constant". You need to define the datatype of the array!
  • You cannot "add a VISA resource name". You should read measurement values from your device using that read function inside the inner loop and APPEND (not ADD) this value to your array!
  • To append elements to your array you cannot use the ADD function. Use BuildArray to build arrays…
  • Learn LabVIEW basics and use autoindexing tunnels to create an array from elements!!!
  • Why is "Measurement count" an orange datatype (aka float)? Loop iterations should be integers!
  • Why don't you do any error handling at all?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 3
(246 Views)