11-13-2012 01:55 PM
Dear Forum Members,
I am very new to the LabVIEW and have been working (mainly through help of Google) to modify one of the sample programmes included in LabVIEW 2010 to fit my purpose.
Essentially, the "Getting Started" programme that ships with the LabVIEW 2008 works in the following fashion
I have modified it in the following fashion
The problem that I'm facing is that the frequency is not being updated in the programme. For example, if the last frequency used on the Analyser was 20 Hz, the programme will take repeatedly take measurements against the same 20 Hz rather than against the correct frequencies.
So, in the spreadsheet that I am creating, I get 1 kHz, 2 kHz, ... 10 kHz but the values Impedance values recorded against them were in effect all taken against 20 Hz (or whatever frequency I last used using the un-modified programme).
I suspect that the frequency gets updated whenever the user presses "Trigger" button but since I have taken that out, for purposes of automation and replaced it with a static constant of "True", it might be causing problems. I'm not sure if this is definitely the problem but even if it is, I am unable to figure out a way around it.
Any help would be greatly appreciated since this is providing a bottleneck in my project.
Thank You
Attachments:
VI for Original Programme
VI for Modified Programme
Zipped Files (for Dependency Support)
Solved! Go to Solution.
11-19-2012 07:44 AM
Dear Zainykhas,
Thank you for posting this to the discussion forums and for uploading some sample code. I took a lok at the issue you have been having, and it is unclear to me as to why you have placed two for loops around the original while loop. My understanding is that you want to use the original Sample.vi and want to execute this N times where N is the Max Freq divided by Interval so that you can scan for a range of frequencies.
Why not just put Sample.vi around one for loop and use the increment counter scaled by the interval to count up towards Max Freq and insert the desired Frequency into the cluster using Bundle By Name?
Kind Regards,
11-22-2012 06:48 AM
Dear Zainykhas,
Have you been able to resolve the issue now?
Kind Regards,
11-24-2012 11:44 AM
Dear Robert,
I am using LabVIEW 2010 so wasn't able to run the code that you provided. However, I have managed to get one of my friends to write me the code which I have attached, to help anyone who has the same problem in the future.
Thanks for your time and effort.