01-15-2011 02:39 PM
One of the problems is the fact that you are using a 2D array for the stored data. This is not appropriate since each set can have a different history lenght
01-15-2011 02:51 PM
I am thinking I should create 2 clusters with 4 1D arrays. One cluster for times one for #s. That would allow me to reset the array history?
01-15-2011 04:06 PM
OK, looked at your code again:
Your reset case never executes. It is sufficient to do the reset in the "read" case, it's just a third case in the case structure there, right?
I don't know who made the multi-enqueue subVI, but since it is not a system VI I would change the color a bit to enforce that distinction.
Here's a quick attempt at a rewrite. See if it makes sense (LV2010).
Personally, I would probably architect it quite differently. How big do the arrays get?
01-15-2011 04:19 PM
I tried a different approach. This way the arrays can be reset. I still cant get the program to actually run. The button will not press for some reason. Is this style easier to understand?
01-15-2011 04:35 PM
Your MOD captured exactly what I was trying to do. Thank you.
I am now trying to understand the code. It encapsulates a lot of stuff that I understand but there a few things that I do not know how it works.
I also still do not understand why it matters that the arrays built up forever.
01-15-2011 04:36 PM
ADrexelDragon wrote:I also still do not understand why it matters that the arrays built up forever.
Because the amount of your RAM is not infinite! 😄
01-21-2011 10:38 PM
Ah. Interesting. I tried to implement the write data to measurement file. It seems to work but I am not sure why the first column comes out as [0,1,2,3,4]. I am not sure what that means.
01-22-2011 01:18 PM
I think I figured out how to sent the data. I just need to figure out how to find the first time where then number is greater than 0.5. I could create an array of all the times where the number is > 0.5 and then search for the first index. I feel like there is a better way because then the array would go on indefinitely.
01-22-2011 02:25 PM
Please use a new file name every time you are attaching a newly modified VI. People sometimes would like to look at several versions at the same time. It also helps identify which VI belongs to which post.
Can you explain the logic behind you file name manipulations? Makes no sense. Why is the browse option of the path control set to files instead of folders?
What should happen when the time is 0.5 for the first time? (You could use "threshold array" to detect this).
01-22-2011 04:21 PM
The file names represent each button. One file is save for each button. Still working on when the button cycles through and has a new test. I am thinking about having the first test for the button be test\[button #][trial #].lvm. Then if the button does more than one cycle, the trial number will increase.
As far as the threshold: I am trying to find the elapsed time to the threshold and that number. And a LED Boolean to go on when this occurs.