From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-25-2015 03:34 PM
I switched format to %d and it worked only twice. For some reason, it is back to putting 0's on the spreadsheet. This is going to make me an old man quick!
06-25-2015 03:35 PM
06-26-2015 09:50 AM
Yes Sir, attached is my test Vi. Putting a probe on it in Highlight Execution mode, the problem lies in the Fract/Exp String To Number, because the numbers from the VISA read are correct, yet on my spreadsheet it keeps coming up 0. I thought I had it fixed with the %d but it isn't.
Thank you
06-26-2015 09:55 AM
Oh, I didn't realize what I sent you was after I deleted the Write To Spreadsheet Vi. That is where the problem lies, not in the Fract/Exp String to number. Sorry about that. The Write to spreadsheet goes to the far right and the output of that Build Array. Once you do so and run the Vi, it will produce only 0's. Thanks again.
06-29-2015 04:28 PM
It sounds like your VIs work fine. If you are able to get the code to work when you use a simulated instrument, then the problem is with the data from your instrument, not with the code.
What kind of data is the instrument producing that you are trying to write to the spreadsheet? It's likely some data type / formatting / etc issue with the data and with your code.
06-29-2015 04:52 PM
07-11-2015 03:38 PM
@Bob_Schor wrote:
I'm sorry my attempt to write clearly failed so badly. Here is a Snippet that writes a Spreadsheet (and reads it back to show you what has been written). The Data are 5 rows of 3 columns of random numbers. The Spreadsheet has a Header Row with Column 1, Column 2, and Column 3, and the data are written a row at a time to the same Spreadsheet. There is a For Loop with an index of 5 that is the "Generate and Save the Data" loop -- it could be a While loop controlled by a Stop Control. The 3-indexed For loop before entering the Acquisition Loop is to generate and write the three-column Header Row. When we exit the Acquisition Loop, we read the Spreadsheet to be sure it did what we wanted it to do.
So my question is, did you try to get this to work? You should have been able to whip up this little demo program yourself. If you are having trouble with something in LabVIEW (like figuring out how Write to Spreadsheet works), it is much easier (not to mention faster, and more fun) to not try to debug it inside a much larger routine where lots of other things are going on. Write a tiny demo program (such as shown below) that just tests what you are trying to understand. If it doesn't work, read the LabVIEW Help, experiment with settings, and if you need to go to the Forum, post the little Demo routine.
When I went to post this Snippet, I forgot that I'd answered a similar question in the Forums about two weeks ago. There I included how to do this to an Excel Workbook, as well as a LabVIEW "Spreadsheet". Here it is (very similar, of course ...).
Hmm -- looks like I forgot to put the File Specification in the Write-to-Spreadsheet part of this example ...
Bob Schor
YES!!!! Thank you SIr. It took me a while but I got it now. There really is no substitute for just playing with the software. Thank you