08-07-2015 12:45 PM
I am adding picture image and the labview program vi I am trying to make workable. I am trying to save two array in 1 text file but actually it is coming in single column .1st row current 2nd row voltage. How can I get them on seperate column. Second thing I was trying is to get summation of all the current (i, j=i+1,K=j+1....) and plot the charge count. I have been trying lots of things but unable to find the write way. Any suggestion and help is highly appreciated.
Solved! Go to Solution.
08-07-2015 01:02 PM
1. There are usually End Of Line characters in instrument communications. You need to remove those using Trime Whitespace.
2. You need to use a delimiter of some kind. If you are just saving to a text file, use a tab.
3. You should open your file before your loop and close it after the loop. This will eliminate a lot of overhead.
08-07-2015 01:55 PM
What's the point of the inner FOR loop? The final result, including the math after the loop, could be calculated from first principles from the scalar value and the value wired to N.
Why would you add 1 to the same value over and over more than 600 times in a row. Wouldn't once be sufficient? (True, the compiler will recognize loop invariant code and ignore the rube goldberg construct, but still.... Don't confuse the next programmer that has to work on this. :D)
08-08-2015 12:44 PM
Could you please tell me how can I add up each incoming current value recorded contuinuously, without defining any sampling no?
08-08-2015 12:50 PM - edited 08-08-2015 12:51 PM
@560092 wrote:
Could you please tell me how can I add up each incoming current value recorded contuinuously, without defining any sampling no?
Just use a shift register to store your total.
08-08-2015 01:28 PM
@560092 wrote:
Could you please tell me how can I add up each incoming current value recorded contuinuously, without defining any sampling no?
Do you want to sum them, average them, or append them to an evergrowing array? What is a "sampling no"?
08-12-2015 09:22 AM
HelloCRossRulz,
Thanks for the picture image. I have tried to modify my vi. Please have a look. I am using seperate vi for sourcing pulse voltage. This vi I am using for measuring current data also for checking volatge fluctuation from the actual set value. But as of now only able to save current data over time. I also want to modify this for recording voltage fluctuation simultaneously in a text file.
I have some rough estimation how much charge transfer I need for my process to stop the process. That is the reason I wanted to convert the current collected every 100 ms into no of charge and keep on adding incoming charges. The moment it will reach nearby value i.e. in the order of E+19 or E+20. I want to stop the process. (it usually takes 3 to 6 hour, based on sample size).
Please have a look at the present version. Now because of the 2nd while loop, only charge data is showing loop is not going back for collecting Current value. How do I correct?
Thanks
08-12-2015 10:08 AM - edited 08-12-2015 10:08 AM
Why the extra loop that will just run forever? Put the shift register on your outter loop and get rid of that inner loop.