LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create an excel file that has the volume output and the time at which it occured?

Hello:
 
I am using Labview to control a New Era Pump Systems automatic syringe pump and to record diameter measurements from a LaserMike optical comparator. My program is fully functional, the code is attached with all auxilliary files in the NE-50X folder. I mostly understand my program, I used drivers for the NE-50X pump found on the NI website to build my code and added to it as needed.
If anyone has ideas about how to do any of these three things, your help is greatly appreciated. I have the output from the syringe pump going into a line graph while I run the test with the time on the x-axis and volume on the y-axis. How would I be able to create an excel file from this information? I would like the excel file to have the time in one column and the volume at that time in the next column. I though that I had wired it correctly, however I feel that the time seems to be a little off and very exact. Attached is the block diagram of what I have done.
Hello:
 
If anyone has ideas about how to do any of these three things, your help is greatly appreciated.
0 Kudos
Message 1 of 8
(3,233 Views)


@SRBB wrote:
 
How would I be able to create an excel file from this information?
I would like the excel file to have the time in one column and the volume at that time in the next column.
I though that I had wired it correctly, however I feel that the time seems to be a little off and very exact.
 
If anyone has ideas about how to do any of these three things, your help is greatly appreciated.


Create your own save to Excel function. Use tab-delimited format. Time<TAB>Volume<CR>, etc.
Look at LV examples for creating text files. "Write to text file.vi"is a good starting point.

The Express VI limits you in a lot of the possibilities you gain when creating the save to file functions yourself, including complete control of the data in the file.

Hint: Excel opens a tab-delimited file with "xls" extension as if it were really an Excel file, except it can only have one worksheet.


André






Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 8
(3,224 Views)
I am currently looking at the write to text file example that you had suggested. If I used this setup where would I wire in my input and the time? It has the number of points/acquisitions and the number of acquisitions wired into it. Would I replace these with the output of the syringe pump and the output of a time keeper or does this already incorporate the time when it goes into an excel file?
 
Thanks.
0 Kudos
Message 3 of 8
(3,221 Views)
See attached picture.

Put this in a subVI.



André

Message Edited by andre.buurman@carya on 08-31-2007 09:24 AM

Regards,
André (CLA, CLED)
0 Kudos
Message 4 of 8
(3,210 Views)
Let me start by answering the specific question, and then I will provide some suggestions on the code.

The function you want is the "Write to Spreadsheet File", which you're already using, albeit in a confusing means (more later). I was not able to find any place in your code where you're actually acquiring time information, so I don't understand your comment about the time not being exact. (I'm assuming you mean "not", even though that word was not in your actual sentence.)

As for the code:
  • As I mentioned, you're using the "Write to Spreadsheet File" twice, as well as the "Write to Measurement File" Express VI. All three seem to be logging the same information, though one of the "Write to Spreadsheet File" functions is logging some sort of volume and diameter information. Please pick one.
  • You're looping around the path for one of the "Write to Spreadsheet File" functions, but not for the other two functions. Why are you looping the path in the first place?
  • You' re continuously accruing data into an array to put onto an XY Graph. Please keep in mind that this means the program will slow down as it progresses as this array gets larger and larger, and LabVIEW needs to shuffle memory around. Depending on how fragmented your memory is, you may find the program will crash since LabVIEW cannot allocate a large enough contiguous block of memory for the array.
  • Your wiring really needs to be cleaned up. Tip: Right-click on a wire and select "Clean Up Wire".
  • In the middle of the diagram you have a case structure in which the True part has a single iteration loop that's adding 1 to the iteration and updating some local variable, and in the False part you're doing something else with it. I have no idea what you're trying to do, but surely there must be a better way to do it.
  • You seem to have two tank indicators on top of each other on the front panel and then flipping the visibility of them based on some value. I would think that it would be easier to simply display both at the same time, no? As a user, I would find it somewhat perturbing to see the tanks appear and disappear.
0 Kudos
Message 5 of 8
(3,204 Views)

Hello, I downloaded your NE-50x.vi , Ballon diameter.vi  for the use of syringe pump project, which is quite useful but i would like to have enquiry that can I still use NE-50x in Ballon Diameter.vi or have to create another vi for using NE-1000 syringe pump

Thanks for ur help

Best Regards

SK 

0 Kudos
Message 6 of 8
(2,637 Views)

hello, 

i am referring your RATEST.VI 220kb from this link: http://forums.ni.com/t5/LabVIEW/How-do-I-create-an-excel-file-that-has-the-volume-output-and-the/m-p...

which was quite useful for my project part that i am doing. If you don't mind, can u please  help me explain in details how u decided to design such kind of very nice block diagrams in labVIEW.

 

I just used one syringe pump NE-1000, and i need to control the three parameters: diameter, volume, and flow rate. 

I just want to enquiry about the big while loop work till to the end. Can u please explain ur useful vi? 

 

Thanks heaps

Looking forward your kindly reply.

SK 

0 Kudos
Message 7 of 8
(2,610 Views)

Hi,

 

The NE-50x.vi is only designed to work with the NE-500 and NE-501. It could possibly work with the NE-1000, but that would depend on how the manufacturer designed it. If you have the manufacturers documentation, you may be able to determine if the two models use the same communication. If they communicate differently, NE-50x.vi will not work.

 

In regards to the ratetest.vi, it was written by someone in the community several years ago. If the manufacturer can provide you with vi's updated for the NE-1000, you may be able to simply replace the NE-500 vi's in ratetest.vi, otherwise you would have to rewrite each of the vi's yourself.

 

 

I hope this answers your question.

 

 

Regards,

 

Luke B.

0 Kudos
Message 8 of 8
(2,574 Views)