Jump to content

Jhow88

Members
  • Posts

    8
  • Joined

  • Last visited

LabVIEW Information

  • Version
    LabVIEW 8.6
  • Since
    2009

Jhow88's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hey Jim, I'm trying to figure out how to append data to an already existing file. I tried the different settings on on the"file open/create/replace" but I have not had any luck. It seems that they way it stores the data overwrites the existing data from before. I have tried to fix this using suggestions posted on the web that implement "set file at position" but this has not worked for me. Currently the way I have my VI set up is that the data is stored in a cluster array that increases in size with every iteration and only after the program stops is all of the data saved. While this works sometimes, I have encountered times where an error has occurred in stopping the program (time out issue, etc) and all of the data was lost. Does your MatIO library have anything to allow for appending or have you not worked that in yet. Thanks, -Jon
  2. Once again, incredible instructions and help. You are a scholar and a gentleman, thanks again. -Jon
  3. Hey Jim, Thanks again for you're help. I'm trying to create an array of clusters that dynamically changes size as data is collected. Unfortunately, I've been having difficulty doing this because in order to have the variables named for Matlab, I need to use the "insert into array" block which means that I need an array to insert the blocks into (otherwise the program won't run). The only way I have been able to do this is by using an Array constant. In doing so, I am required to initialize every element in the array, which can be very tedious for large sets of data. I attached a sample VI that might give you some idea of what I'm trying to do. As a simplified model I basically want to create an array of clusters, where each cluster contains a string and a value. In the VI, I don't bother changing the string value (its just there to lend to the cluster) but I would like the element in each cluster to reflect the value of iteration. I have some background in programming ( a semester in C and two in Java, with the Java being more recent) so if you need to get a little technical i should be able to understand. Additionally, I realize that clusters are meant to reflect C's structures, and in C you can't dynamically change the size of an array, but I've seen that it can be done in LabVIEW. Clearly an array constant will have a constant size, so I guess if you can figure a way around this I would love to know. Thanks again for all of your help, I would not have been able to get this far without you. Regards, -Jon
  4. Jim, With the help you provided me I was able to build most of the VI that I need to structure my data as I gather it. However I am having an issue creating arrays of clusters. When I try to do this, I get an error message "Error 1026 occurred at Close Reference in level5.lvlib:Append Data Element (Anything).vi:3->level5.lvlib:Append Data Element (Anything).vi:2->data_struct.vi." That is, the error occurs not with opening the file in Matlab, but in writing it to the file. I noticed someone else (Dominik) mentioned also that he was unable to create arrays of clusters, but from the forum discussion it seemed like the issue was resolved by naming the variables (also his issue seemed more on the end of opening the file in Matlab). I made sure my variables are named, and I even ran the program on a newer version of LabVIEW that has the MatIO library installed to make sure it wasnt the computer, but as long as I had an array of structures in my VI i got the error ( when I deleted this section of code from the block diagram I had no issues). I read from the National Instruments web page that creating an array of clusters is allowed in LabVIEW, so I know I'm not breaking any rules on that front. The error message causes me to suspect that the issue might have something to do with the library and not so much my code, but it would be great if you could take a look at it (see attached VI). Thank you for your time, and I apologize if the error stems from something trivial. -Jon data_struct.vi
  5. Jim, Thanks again for your speedy replies and all of the help you provided. -Jon
  6. Jim, The VI is working well, I just had one last question. I am having difficultly figuring out how to name the elements of my clusters. When I sent you the VI I had labeled them, but looking at the difference (names seem to have black borders around them) between my version and yours I noticed that there is a qualitative difference between naming a field and labeling it. If you could tell me how to access that property of a field I would appreciate it. As always thank you very much for your help. Regards, -Jon
  7. Jim, Thanks for getting back to me so quickly, and I apologize for the confusion. I had read that Jim Kring was very active in the open G community so when I saw the MatIO library and how well it was working my mind immediately made an association. That being said, this library is still fantastic and exactly what I am looking for, and I thank you for your work and development of it. I look forward to hearing feedback from you when you get the chance. -Jon
  8. Hey Jim, I've been using your book (LabVIEW For Everyone) and your openG software for a few weeks now, and I recently discovered the MatIO library you created and it looks exactly like what I need to store my data using clusters. I am currently running LabVIEW 8.6, and I was able to successfully install the VI manager on my computer and recreate an example VI posted on this forum (the VI was called test_matio.vi) just to see if my system was storing the data correctly .I ran into a few problems,mainly when I open the generated file, the elements of the clusters don't have names, so I end up with an error when I try to access them in Matlab. I noticed someone else had a similar error so I made sure to use "insert into array" function instead of "append data element' , but I am still having issues. I am pretty confident that the installation on my computer is correct, because I followed the same process on a different computer (a macintosh running v9.0, whereas this computer uses windows and runs v8.6) and I got everything to work.Unfortunately the computer which is not currently working is the one that needs to be setup to the DAQ, so I need to resolve this issue on the machine. If you could take a quick look at my VI to let me know if you see anything obvious I would really appreciate it..test_cluster_structure.vi All the best, -Jon
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.