LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ/LabVIEW memory (sorry for the repost)

Hey guys,
 
               I'm working on a really complicated project dealing with a FLEX microprocessor, and at this point I'm trying to get the program to read from a spreadsheet, write it LabVIEW memory, then read the LabVIEW memory and write to a new output spreadsheet.  I think the problem lies in these two subVI's.  This was an unfinished project that someone else was working on, and I'm somewhat new to LabVIEW and very new to this particular project, hense my confusion.  I would really appreciate any comments or help of any kind.  Thanks!! 
 
sorry for the repost, I was under the wrong user name
0 Kudos
Message 1 of 25
(2,392 Views)

And what exactly is the problem you are having. It would help for someone to know that if you want it fixed.Smiley Wink

The programs are pretty poorly written in that dataflow is not used, local variables are used for no apparent reason, some wires are hidden, just to name a few issues. 

If you are getting any error messages, post the error code and actual message.

Also, none of your subVIs were included in the zip file. The correct way to post a main and it's subVIs is to a save with options and create a development distribution. This will create an llb with everything in it.

0 Kudos
Message 2 of 25
(2,371 Views)
Hey thanks for the reply, when the program is run, it asks for a spreadsheet file, but when one is selected it will not open it and keeps asking the user to browse for a spreadsheet file.  After three tries the program defaults to a file called default.xls, no useful output file is created and the program ends.  Attached is the true program vi along with the corresponding hierarcy of subVI's.  My computer is acting alittle strange, so I hope I got all the files needed.  Again I would truely appreciate any help.  Thanks again.
0 Kudos
Message 3 of 25
(2,355 Views)

It would have been so much simpler if you had done as I said and created a distribution llb. There are still VIs missing. To repeat what I said, Go to File>Save With Options>Evelopement Distribution. The VI called RTL Test Runner Final V2 is missing the most and I didn't really bother looking at it. Your Initialize Memory sequence doesn't because your while loop starts running at the same time and I'm sure you have race conditions with the overuse of local variables. You really need to make the diagram fit onto one screen so that it is a little more readable. There are numberous other changes needed to make it really readable. There is a style guide that ships with LabVIEW (Help>Sarch the LabVIEW Bookshelf). You need to read that and make a lot of changes.

I see a big problem in your data_write program. You have two Read Lines From File and one Read From Spreadsheet functions. Unless you have entered a path in the front panel string control called "Data File", you will get prompted for a file name every time the functions are called. First, you should just use a path control on the front panel. Second, if you want the same file read each time and don't want to specify a file before the program runs, you should wire the file out of the first function to the file in of the next. Third, you should not wire out of a sequence structure and back in. Fourth, you don't need a sequence structure at all - think dataflow. Fifth, you shouldn't be using any local variables. I don't understand what the point is in doing that Initialize Array, Replace Array, then a Read From Spreadsheet - all on the same variable. Last (at least for now), you mention an .xls file. None of these functions can read a native Excel file and make any sense of the data.

0 Kudos
Message 4 of 25
(2,346 Views)
Here's that .llb file, sorry about all the missing VI's, my home computer was having troubles.  I really appreciate the comments, if there is anything else you can add or any examples you can give I'd be really thankful.  Thanks a lot.
0 Kudos
Message 5 of 25
(2,339 Views)

There are still a whole bunch of missing VIs (PC.vi, On_Chip_Clk.vi, Off_Chip_Clk, I_Data_In. etc.). If you did select Development Distribution, the only way this could happen is if the missing VIs are located in the LabVIEW vi.lib folder. If VIs that you or someone else has developed are in this folder, that is a bad idea. You can choose to include v.lib files in the llb but you should really move them to someplace else.

I don't know what I can add. The main VI you have now is pretty unreadable and next to impossible to debug. There are a lot of resources available for learning LabVIEW. Check out http://www.ni.com/devzone/lvzone/fundamentals.htm.

0 Kudos
Message 6 of 25
(2,336 Views)
I have those files with all the others, I don't understand why the .llb files didn't work, yea most of these VI's are really difficult to follow, so much so that I haven't been able to confidently alter them much, I believe this was someones graduate project, which was very obviously abondoned.  Thanks anyway for the help, I could just attach the whole folder haha but I'll spare you the pain. Smiley Wink 
0 Kudos
Message 7 of 25
(2,333 Views)
I think I got all the files to be included in .llb file, take a look if you get a chance, I'm sure I really have my work cut out for me... Thanks again
0 Kudos
Message 8 of 25
(2,328 Views)

Well, they are finally in one place.

The attached picture shows just one example of sloppy coding. Because there is no data flow between the two different digital writes, LabVIEW will attempt to do things in parallel. What that means is that you do not know which line will be driven first or second. If it doesn't matter, then use a single digital write for both lines.

Message Edited by Dennis Knutson on 05-25-2006 09:47 AM

Message Edited by Dennis Knutson on 05-25-2006 09:48 AM

Message 9 of 25
(2,321 Views)
There are three digital writes though right? data/register/instruction  How should I go about having dataflow between these?
0 Kudos
Message 10 of 25
(2,307 Views)