abuch06 Posted July 28, 2007 Report Share Posted July 28, 2007 I'm having issues all over the place... I think my company put up a block on posting things on the internet, which means I have to somehow find the answer to this problem by explaining it rather than showing you. It's not difficult and I feel retarded about it but I can't figure it out: i can easily explain whats on the vi. its a simple nested for loop with two array feeding into it. one is a time array the other is an array with values for 26 channels at each of those times. inside the for loops the array is indexed and there is a inequality sign checking to see if the value goes over 2. if it does... i want the program to create a seperate 3D array: channel, value, and time. if it doesnt go over 2 then i want the program to disregard the value and continue. simple enough? i tried creating the array inside the case structure after it checks the value... but when the case is false, the tunnel still requires an output. biggest issue: array coming out of the for loop has a different size than the one going in and it needs to be based completely on the values in the array going in and they change everytime on every channel. thanks Quote Link to comment
orko Posted July 28, 2007 Report Share Posted July 28, 2007 What you're missing is a shift register to pass the results array through the case structure if it hasn't changed. Shift registers will hold values and pass them into the next iteration of the loop, so if you initialize it with an empty results array of the type you want out of the loop, you can add/delete/sort it as you please through each iteration. If I understood your explanation, Something like this would work (TRUE and FALSE case shown seperately for clarity, there would just be one loop on your BD): http://forums.lavag.org/index.php?act=attach&type=post&id=6482 Quote Link to comment
Aristos Queue Posted July 30, 2007 Report Share Posted July 30, 2007 QUOTE(abuch06 @ Jul 27 2007, 10:07 AM) I'm having issues all over the place... I think my company put up a block on posting things on the internet, which means I have to somehow find the answer to this problem by explaining it rather than showing you. It's not difficult and I feel retarded about it but I can't figure it out: Try a different browser. I can't upload images when I'm using Firefox, but I can using MSIE and Safari. I believe Michael is aware of the issue. Quote Link to comment
Michael Aivaliotis Posted July 31, 2007 Report Share Posted July 31, 2007 QUOTE(Aristos Queue @ Jul 28 2007, 04:12 PM) I can't upload images when I'm using Firefox... I'm not aware of this. You must have meant Mozilla... Uploading works fine in Firefox. Quote Link to comment
TG Posted July 31, 2007 Report Share Posted July 31, 2007 QUOTE(abuch06 @ Jul 27 2007, 03:07 PM) I'm having issues all over the place... I think my company put up a block on posting things on the internet, which means I have to somehow find the answer to this problem by explaining it rather than showing you. It's not difficult and I feel retarded about it but I can't figure it out:i can easily explain whats on the vi. its a simple nested for loop with two array feeding into it. one is a time array the other is an array with values for 26 channels at each of those times. inside the for loops the array is indexed and there is a inequality sign checking to see if the value goes over 2. if it does... i want the program to create a seperate 3D array: channel, value, and time. if it doesnt go over 2 then i want the program to disregard the value and continue. simple enough? i tried creating the array inside the case structure after it checks the value... but when the case is false, the tunnel still requires an output. biggest issue: array coming out of the for loop has a different size than the one going in and it needs to be based completely on the values in the array going in and they change everytime on every channel. thanks Based on what u say the indexing of a forloop or while loop will not work for you. Instead you must create (or input) the arrays from outside the loop into a shift register then inside the loop do the comparison. Use index array to get at the element you want to compare. If its >2 add an element to your 3D array then cycle it back through the shift register. If its <=2 simply pass the array through it to the shift register unchanged. That way the array will not grow until your condition is met, regardless of how many checks are made based on the other arrays being input to the loop. It is not efficient but it will work, Duh Orko beat me to iit. Quote Link to comment
Aristos Queue Posted August 1, 2007 Report Share Posted August 1, 2007 QUOTE(Michael_Aivaliotis @ Jul 30 2007, 01:42 AM) I'm not aware of this. You must have meant Mozilla... Uploading works fine in Firefox. Mozilla on my PC has the bug. But Firefox on my Mac-Intex laptop also can't upload. I flip over to Safari when I want to post a file. Quote Link to comment
torekp Posted August 1, 2007 Report Share Posted August 1, 2007 QUOTE(abuch06 @ Jul 27 2007, 03:07 PM) checking to see if the value goes over 2. if it does... i want the program to create a seperate 3D array: channel, value, and time. if it doesnt go over 2 then i want the program to disregard the value and continue. I'd like to suggest two alternate ideas instead of your 3D array: (A) a 1D array of clusters, each cluster containing {channel, value, time} (B) a second 2D array containing zeros or NaNs (Not A Number's) wherever value < 2, elsewhere the original values. Idea (B) lends itself to display on an Intensity Graph: http://forums.lavag.org/index.php?act=attach&type=post&id=6504http://forums.lavag.org/index.php?act=attach&type=post&id=6505 Quote Link to comment
Yair Posted August 1, 2007 Report Share Posted August 1, 2007 QUOTE(torekp @ Jul 31 2007, 04:14 PM) http://forums.lavag.org/index.php?act=attach&type=post&id=6504http://forums.lavag.org/index.php?act=attach&type=post&id=6505 Paul, you might be interested in the Code Capture Tool. Just place the LLB in your LabVIEW\Project folder and you will have the CCT option in the Tools menu after you restart LV and it will capture the VI you open it from. Quote Link to comment
orko Posted August 2, 2007 Report Share Posted August 2, 2007 QUOTE(yen @ Jul 31 2007, 12:04 PM) Paul, you might be interested in the http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2839#M2839' target="_blank">Code Capture Tool. Hey, Thanks for the link! I've been doing this manually!!! The file path option to save it to a temporary directory and load the path into the clipboard is perfect for LAVA. :thumbup: Quote Link to comment
Yair Posted August 2, 2007 Report Share Posted August 2, 2007 QUOTE(orko @ Aug 1 2007, 06:51 PM) The file path option to save it to a temporary directory and load the path into the clipboard is perfect for LAVA. :thumbup: Yes, that was a very good idea by Chilly Charly. Anyway, there's supposed to be a new and improved version http://forums.lavag.org/blog/tonsplans/index.php?showentry=138' target="_blank">soon. 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.