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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the fastest way to convert from a character string (no particular format assumed) to a spreadsheet string?

I need the fastest way because time is crutial in this application. Thanks in advance.
0 Kudos
Message 1 of 4
(2,364 Views)
There is no fastest way to convert a character string to a spreadsheet string. The difference between the two is just a little parsing. For instance, if you put a comma between every entry and an carrage return at the end of rows, you can save your file with a .csv extension and open it up in Excel. The point to be made is that there is that there is nothing surprising going on behind the scenes.

What will affect your speed though is writing to the hard drive and sometimes moving large strings around in memory. It sometimes takes a little experimenting to find the configuration that works the fastest on your computer.

Perhaps you can explain your application better so that non-vague suggestions could be made.

Jeremy
0 Kudos
Message 2 of 4
(2,364 Views)
Thanks for your reply Jeremy.

I have a 250+ LabVIEW VI that was created for PC. It is for a Fourier Transform Spectrometer (communicating to a step and scan mirror through serial port, and to a lock in amplifier through GPIB), and my branch wants to run it on a Mac. The only 2 VIs left to fix use CINs. One of them converts a character string to a spreadsheet string, and the other one I haven't quite figured out yet, because it uses 2 clusters and does calculations that I'm still determining the pattern for.

I think the CINs were called because timing is crutial in this application, and I am not able to get the source code for those CINs. If there is a way of seeing the code on the PC, I would be grateful to who ever points me in that direction.


I'm going from the 'read characters from file' function to the 'spreadsheet string to array' function.

Thanks in advance for your help.

Julie
0 Kudos
Message 3 of 4
(2,364 Views)
Sorry for the delay--I wanted to research some ideas. There is a constant time penalty for calling the CIN but they tend to run faster than LabVIEW code. The big problem (as you discovered) is that the CIN is not portable to other systems. I am not aware of any program that can create code humans can read from machine code.

In the long run, converting the CINs to LabVIEW will be the easiest way to maintain the code.

Jeremy
0 Kudos
Message 4 of 4
(2,364 Views)