LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving two 1D array help

Solved!
Go to solution

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.

Download All
0 Kudos
Message 1 of 8
(3,810 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(3,798 Views)

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)

0 Kudos
Message 3 of 8
(3,776 Views)

Could you please tell me how  can I add up each incoming current value recorded contuinuously, without defining any sampling no?

0 Kudos
Message 4 of 8
(3,576 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(3,573 Views)

@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"?

0 Kudos
Message 6 of 8
(3,544 Views)

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

 

 

Download All
0 Kudos
Message 7 of 8
(3,264 Views)
Solution
Accepted by 560092

Why the extra loop that will just run forever?  Put the shift register on your outter loop and get rid of that inner loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 8
(3,251 Views)