11-06-2016 11:06 PM
Hello, I would like to ask if you could tell me if anything is wrong with my block diagram..
I am trying to save BPM values streaming in (the orange line) in this diagram. I would like to have BPM values to be recorded in my txt file after I have stopped the run. Right now, I have my headers, personal particulars keyed in, and a 0 displayed on my txt. I got a 0 as my only BPM value after the run. I'm not sure how to get all my data values to be displayed in the text file. Would gladly appreciate if you could give me some pointers! I have attached the image in this message. (: Thanks!
11-07-2016 12:20 AM - edited 11-07-2016 12:21 AM
Hi whyywhyy,
if you could tell me if anything is wrong with my block diagram..
Yes, a lot.
Main problem: you don't use the autocleanup tool! (And so you don't follow the StyleGuide found in the LabVIEW help!)
Your block diagram is just awful!
I got a 0 as my only BPM value after the run.
Next problem: with each iteration you create a new file, write the header into and then you write a single value into a table of 4 columns…
I have attached the image in this message.
Another problem: If you would attach your VI instead we would even be able to correct your VI - but images are hard to debug and to edit within LabVIEW!
ALWAYS attach your VI! Thanks!
11-07-2016 01:52 AM
Omg I thought everything was okay except the bpm part, sorry I am a beginner in labview... 😞 I have attached my VI here. Pls help me out, I simply wanna be able to key in particulars on the front panel and then be able to stream the bpm datas in one column on my text file. So my text file will have the keyed in particulars and the bpm values received during the run.
11-07-2016 01:57 AM
11-07-2016 04:23 AM
You have not wired "append to file?" = true in the first of the three "Write Delimited Spreadsheet" blocks. Therefore, your vi replaces the spreadsheet file each iteration.
Besides, there are some issues with your vi.
Always wire the error clusters. Take care of coersions. Wire from left to right. Consider timing your loops instead. The code in the case structure do not seem right, what are you trying to accomplish?
11-07-2016 05:28 AM
Have zipped it up!!!! Hope you can open it!! 😄 Thanks!!!
11-07-2016 05:48 AM - edited 11-07-2016 05:49 AM
Hi whyy,
now I can open the VI - but you didn't think of using AutoCleanup…
Some remarks:
- Why do you use the property "data bits" before VISARead? What's the purpose? (I think it's completely wrong here…)
- You still didn't follow our comments on overwriting the spreadsheet in each iteration. Did you read our messages?
Interesting FP design! 😄
11-07-2016 05:58 AM - edited 11-07-2016 06:02 AM
Oh sorry, have auto cleaned up (had to google how to do so HAHA). I'm not sure about the VISA part, cos it's the other group mate who did it... I would like to ask how do I stream BPM values to my text file. Have changed the whole thing (as seen in the Male loop) so I could write to file in a simpler way.
I want to stream BPM values directly to my text file after I have stopped the run. Any idea if I have linked it correctly?
11-07-2016 07:12 AM - edited 11-07-2016 07:21 AM
Hi whyy,
all you needed to correct was a simple boolean constant missing at the first WriteSpreadsheetFile function - but you made it worse because you removed all those SpreadsheetFile functions and replaced them by simple file functions…
Did you read our messages?
I want to stream BPM values directly to my text file after I have stopped the run.
How do you want to "stream" any data when your VI is stopped?
You want to save/write those data while your VI is running in the loop…