12-08-2009 02:40 PM
Hello all,
I'm trying to build a circular array by incrementing the value y and run the check if the numerical value falls in the range and change the color. I attached a code I'm working with, I used it two numerical values ( right and left), however I have 8( right 2 thru right 6 and left2 thru left7) more numerical values I need to do the same thing. I was wondering if there is any other better way to do it. Please show some insight on it.
thanks.
Solved! Go to Solution.
12-09-2009 02:47 AM
12-09-2009 10:02 AM
I don't understand, in concept, what you're trying to do or how the VI is supposed to work. Can you elaborate on how the VI is supposed to be used?
Also, don't create a Greedy Loop. You should also have a front panel Stop button rather than relying on the Abort button in the toolbar, as that is the only way to stop your VI right now.
12-09-2009 10:50 AM
I'm trying to group my left(4) and right(4) readings of a part in a circular array. So that when the part is inspected counter ( which is y numeric control) increments I should be able to group all my left/right readings so that it appears as a whole data and should be able to run some tolerance check to do text color change to red. I have attached my code I'm working with. The code has the first left and right readings in a circular array. As shown in the front panel of the code, I was wondering if there is any other easier way to do rather than doing it on very left and right reading 1 thru 4 and use my tolerances for my check which is very cumbersome.
please provide me with some inputs
thanks.
12-09-2009 02:26 PM
I still don't understand this circular thing that you're trying to do. I don't see any kind of circular operation in your code. You're simply taking the value of a counter modulus 6 and then incrementing the counter by 1. I never see it go down. For that matter, why not just set the range of "Y" to be between 0 and 5 in the first place?
As for the architecture, if I were doing this I'd use an array of clusters internally for data storage and a cluster on the front panel. This makes the code WAY more scalable, as you can see from the attached VI (which eliminates the counter increment and simply sets the data range for "Y").
12-09-2009 03:02 PM
Smercurio_fc,
In the sample code I provided you earlier, when you increment the Y value and changing the values of right and left- you should see the display wrap around ( just like a scope chart). I did take a look at your code, which is pretty close to want I'm trying to achieve with out the wrap around. However it introduced me to new ideas.
thanks a lot for all your time and effort.