gammalight Posted October 26, 2006 Report Share Posted October 26, 2006 Hey folks! I am trying to figure out how to load a user specified numbr of files, say 1 - 5, so that the user can look at one of the files at a click of a button. I want to load five files at once but only look at the data from one file at a time. I tried using a for loop to load in the files specified, then have a case structure sort the data accordingly depending on how many files were loaded, then I used an event structure to specify which file to display at a click of a button. Of course it doesnt work thats why I am posting but I will load my code if you want to take a look at it. Download File:post-6424-1161888523.vi Quote Link to comment
crelf Posted October 26, 2006 Author Report Share Posted October 26, 2006 Here's a much simplified version of what you're trying to do: Download File:post-181-1161891824.vi Quote Link to comment
gammalight Posted October 26, 2006 Report Share Posted October 26, 2006 Hey Crelf, Thanks for the help, your version is much simpler than mine. I will have to sit down and try it out and learn from what you did! Thank You Kevin Quote Link to comment
crelf Posted October 26, 2006 Author Report Share Posted October 26, 2006 Thanks for the help, your version is much simpler than mine. I will have to sit down and try it out and learn from what you did! No worries - if you've any questions, please feel free to ask. Quote Link to comment
gammalight Posted October 31, 2006 Report Share Posted October 31, 2006 No worries - if you've any questions, please feel free to ask. Hey crelf, I have a question about the code you helped me with. I am trying to pass the array values outside the while loop so I can use them in another while loop. I can not get it to work, I tried a couple of things but I attached the more simple version here. Thanks Kevin Download File:post-6424-1162316575.vi Quote Link to comment
Neville D Posted October 31, 2006 Report Share Posted October 31, 2006 Hey crelf,I have a question about the code you helped me with. I am trying to pass the array values outside the while loop so I can use them in another while loop. I can not get it to work, I tried a couple of things but I attached the more simple version here. Thanks Kevin Use a shift register to pass out the array data.. as shown in the image. Sorry I have only LV 8.20 on my PC, so I am not sure if the attached edited VI will be of help. Neville. Download File:post-2680-1162323074.vi Quote Link to comment
gammalight Posted October 31, 2006 Report Share Posted October 31, 2006 So the only way to get the data out is when I stop the while loop? I don't want to stop the procedure to get the data because I then have to start it back up and select the files again, so that would defeat the whole purpose of me trying to do this. I have been passing other data in and out of while loops with local variables, but it is not working here. I am trying to be able to load multiple files so that I may look at them one at a time and everytime I look at a different file it displays the data . I already have the procedure to display the data and it works fine when I load one file, but I can not seem to read multiple files and display each data set on command. I have tried a couple of things, but I can not get everything to work together. Quote Link to comment
gammalight Posted October 31, 2006 Report Share Posted October 31, 2006 Why doesn't this work, I tried setting it up so when I press the load button it prompts me to load the desired files. I then use the ring to select the file I want to display, but when I go to use the ring again to select another file it crashes? Labview is starting to make my head spin! Download File:post-6424-1162329728.vi Quote Link to comment
Neville D Posted October 31, 2006 Report Share Posted October 31, 2006 So the only way to get the data out is when I stop the while loop? I don't want to stop the procedure to get the data because I then have to start it back up and select the files again, so that would defeat the whole purpose of me trying to do this. I have been passing other data in and out of while loops with local variables, but it is not working here. I am trying to be able to load multiple files so that I may look at them one at a time and everytime I look at a different file it displays the data . I already have the procedure to display the data and it works fine when I load one file, but I can not seem to read multiple files and display each data set on command. I have tried a couple of things, but I can not get everything to work together. I am not sure what exactly you are trying to do, but here is an approach: Add a Process button, link that to a separate value change event on your Event structure, and within the Process state of the event structure feed in the array from the shift reg and do whatever you want to do. The loop is basically stopped waiting for an event.. if none is generated, then it just waits forever; the way you have the event structure set up, it can either stop or read a file. If you want to read the files again, put the whole mess into another While loop that will allow you to get at the next set of files. Neville. Quote Link to comment
gammalight Posted November 1, 2006 Report Share Posted November 1, 2006 AHHHH, I have finally figured it out (about 2 hours ago), I will post the solution for you to see tomorrow! Quote Link to comment
thomas2609 Posted April 5, 2007 Report Share Posted April 5, 2007 my version of multible files select using active x. if you encounter MSComDlg.ICommonDialog "Class is not licensed" see http://forums.ni.com/ni/board/message?boar...ssage.id=214513 you can fix that by installing for example visual basic 2005 express http://msdn.microsoft.com/vstudio/express/ Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.