LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

table, matrix or numeric controls ?

Ravens, when you can, give a quick look at my VI pls, i know i have 2 many events and i could avoid that, but i don't have time to change it now. I need help on the part that i told you about, the values should come from the previous clusters, cluster 1 and 2, but i can't repeat events cause i can only make 1 using "cluster:value change". And the other question i got is about the array example you did, cause it's working good, except when i choose more than 1 column, because column 2,3 and 4 will stay clean and i can't edit them.

 

Many thanks for the support so far.

 

 

TN
Currently using LV 8.5
logo
Download All
0 Kudos
Message 11 of 18
(775 Views)

You have a lot of events, but I wouldn't say that you have too many.

 

I'm not sure what you mean by saying you want to "Repeat Events".  Correct, you can only have one event case for any specific event such as a value change of a particular control.  A given event case can be fired based on any number of potential events, which it looks like you are already doing.  If you want to programmatically fire an specific event, such has you programmatically write a 1 to a control and you want that control's value change event case to get fired, you can write the 1 to a Value(Signalling) property node of that control.  That means the programmatic value change will signal the corresponding event case to occur.

 

Thinking back on changing the number of segments, you may want to add some code.  If you have only 1 column, but want to change to 3 (let's say), your event case does now show 3, but the two new array columns are now empty.  Perhaps you want to use a build array function to initialize two new columns and and append them to the existing array.  If you go let's say from 5 to 2, you may want to have a case structure handle that so you can use Array subset to extract the only the first two columns out of the 5 element array.

 

A couple other tips.

1.  You have a lot of wires going to either the right side of the event structure, or to the right side of the while loop, but never use those values again.  You can just delete those extra wires.

2.  You have what appears to be 7 exit buttons, one for each page.  It looks like you have one event case handling all 7 just fine.  But if you want, delete all but one.  Drag that one off the tab control on the front panel.  Use the arrow keys to move it back onto the tab control. It will now look like it has a shadow under it.  Don't worry, that shadow disappears in run mode.  Now that lone stop buttons is not a part of the tab control, but is actually over top the control.  It will show up no matter which page is selected.

Message 12 of 18
(773 Views)

Well Raven, thanks for your tips, some of them i already known and others don't. But, like i told you, i pretty fresh on LV and the arrays are still too complicated to me, so can you please gimme an example, so i can adapt to my VI? Last question i have, is how should i fill cluster 4 and 5 with the values from 1 and 2? And what's wrong with cluster 4 and 5, that when i run the VI, 1 cluster clears from the table(array) the values from the other cluster?

 

Thanks once more. I guess "kudos" are made to use in situations like this. 😃

TN
Currently using LV 8.5
logo
0 Kudos
Message 13 of 18
(767 Views)

Here is the modified "New" VI.  I didn't have a chance to fully test it out.

 

If you want to fill clusters 4 and 5 with the values from 1 and 2, then just create local variables of 4 and 5 and have #1 and #2 write to them.  I'm not sure about your last statement whre you say one cluster clears the values from the other cluster.  Because I don't know exactly how this VI is supposed to work, I can't comment on that.

0 Kudos
Message 14 of 18
(757 Views)

I'm still with the same problem on the array, when i select more than 1 column, all except the 1st column are not able to edit. I only want to have [1 to 4] columns, dunno if this information helps, but i'm not sure how to do it, if you can only check that for me, would be wonderful.

 

Can you check what i did to cluster 4 event?I think it was what you told me so, but it will only update the values if i change cluster 4, i mean, it does not load the values from 1 if i dont click on it. What kind of event should i put in it, instead of "value change"? Or should i put more "event specifiers" on this event?

 

 

TN
Currently using LV 8.5
logo
0 Kudos
Message 15 of 18
(754 Views)

Your Event 7, No of segments value change, doesn't have the code I put into the VI I posted.  (I also got rid of unused wires, and unnecssary case structures.)

  

I thought for cluster 4, you wanted cluster 4 to be updated whenever cluster 1 changed.  (Likewise cluster 5 to be updated whenever cluster 2 changed).  So you should have cluster 1 go to the local variable 4 in the value change event for cluster 1.  Having it in cluster 4 value change won't work.  Actually if your update 4, your cluster 1 will overwrite cluster 4 cancelling any changes you made.

0 Kudos
Message 16 of 18
(744 Views)

Ok, i got your point, and cluster 1 is working well with 4. And likewise, cluster 2 is working well with 5. But i still have that syncronization problem, i mean, at page 3 of the tabs, the table (array) will only show the 1st column with values, no matter how many columns we select, and it will only show the values from cluster 1 (local variable of cluster 4) or the values from cluster 2 (local variable of cluster 5).

 

Did you understand what i'm trying to say?

 

Thanks again Raven.

TN
Currently using LV 8.5
logo
0 Kudos
Message 17 of 18
(741 Views)

Yes, I think I see what you are talking about.

 

I found the problem.  The array is currently set to show index value 3.

 

Right click on the array and show the index display.  I saw it set for 3.  (thus 0, 1, and 2 were not shown off the left hand side.) Make the index 0, then you can hide the index again.

 

Then try running the VI again.

 

Now I'm not sure what you want the cluster 4 to show, you said you wanted it to come from cluster 1.

0 Kudos
Message 18 of 18
(733 Views)