08-08-2018 05:43 AM
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
Solved! Go to Solution.
08-08-2018 06:50 AM - edited 08-08-2018 06:50 AM
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
08-09-2018 04:45 AM - edited 08-09-2018 04:45 AM
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
08-09-2018 05:07 AM - edited 08-09-2018 05:12 AM
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…
08-09-2018 10:11 AM - edited 08-09-2018 10:13 AM
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,
08-10-2018 07:13 AM - edited 08-10-2018 07:14 AM
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
08-10-2018 07:19 AM - edited 08-10-2018 07:26 AM
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.)
08-10-2018 07:27 AM
Hi GerdW,
Yes the same error occur,in VISA write.
what do you mean VISA Reference ??
regards,
08-10-2018 07:36 AM
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?
08-10-2018 08:12 AM - edited 08-10-2018 08:12 AM
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