LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control HAMEG (HM8118)

Solved!
Go to solution

Hello all,

 

I'm build a VI using Labview that measure the impedance and phase in difrente range of freq,and write all date in excel sheet.

 

I have problems need to solve:

 

1. I don't know how can I sketch Impedance Vs Freq

2. every iteration of in the while loop the program create new excel file and this is too much if I have 96 iteration so i got 96 excel file.

 

I attached the (VI) below.
your help would be highly appreciated

0 Kudos
Message 1 of 10
(4,586 Views)

Hi Saed123,

 

1. You must wire your 2D array to a XY graph, not Waveform Graph

2 . You should create your measurement file outside and before  the loop so you won't create file at each iteration.

 

Try this and if you don't manage I will help you fix your program.

 

Regards

0 Kudos
Message 2 of 10
(4,570 Views)

 Hello Jean.L,

 

I'm really trying to make what you wrote but nothing work and i need the measurment inside the loop if i put outside the loop i can't get the complete excel sheet with all data.

 

any help plz !!

 

regards   

 

 

0 Kudos
Message 3 of 10
(4,544 Views)

Hi Saed,

 

I'm really trying to make what you wrote but nothing work

What have you tried so far? Where is your updated VI?

 

and i need the measurment inside the loop

Nobody suggested to take the measurement outside of the loop!

 

if i put outside the loop i can't get the complete excel sheet with all data.

Surely you can!

In the loop you do the measurement. The resulting data array can be written to Excel file AFTER the loop - only once! No need to put any Excel-related code inside the loop!

 

I have 96 iteration so i got 96 excel file.

Your loop is set to stop at i=94 so you should only get 95 files…

 

You still convert those floats in a curious way…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(4,540 Views)
Solution
Accepted by topic author SAED123

Hi,

 

Here is an example of how you can do it.

This code create a file and write the measurements at each iteration of the loop. Once the measurement finished it generates a graph in the file you selected.

 

I know you are new in LabVIEW but I advise you to work on some tutorials or National instruments courses before getting into your project. You will save a lot of time learning the basics and it will help you code more efficiently.

 

Good luck!

 

Regards,

0 Kudos
Message 5 of 10
(4,524 Views)

Hallo Jean.L

 

Yes you are right ,but the problem was I got the project from my Supervisor and i don't have any experience with LABVIEW i must submit the project by the end of this month, so two months it's not enough.

 

The program work now, but still I have some problems, after i Finished the program and connect all VI together still I have error in the VISA READ and still a can't solve it and i search on NI Community  but i did't find any solution.

 

I attached the complete program with all VI's 

 

Regards

0 Kudos
Message 6 of 10
(4,508 Views)

Hi Saed,

 

error -1073807346 says "VISA session invalid"…

 

Does the error already occur at the VISAWrite function before?

Which VISA reference do you use?

 

Hint: when attaching more than 2 files you could make us (and yourself) a favor in creating a ZIP before attaching the files… (Additionally you forgot to attach your project file.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(4,503 Views)

Hi GerdW,

 

Yes the same error occur,in VISA write.

what do you mean VISA Reference ??  

 

regards,

 

0 Kudos
Message 8 of 10
(4,498 Views)

Hi Saed,

 

what do you mean VISA Reference ??

Those controls named "VISA reference"…

 

I had problems to find your "main VI" as you didn't use a project nor do you use "good" filenames: you use a constant "COM5" in your main routine. Is COM5 available at all?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(4,490 Views)

Hallo,

 

I used the attachment photo to connect the CTS and The HAMEG together in the same port is it right way or not?? 

 

sometimes I change the COM port so COM5 not fixed

 

81HXl1Iyz7L._SX355_.jpg

0 Kudos
Message 10 of 10
(4,485 Views)