LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to have dummy for a control

Smiley Very Happy

 

Veeru your first stars....!



Message Edited by Pnt on 07-04-2008 12:55 PM
0 Kudos
Message 21 of 31
(1,517 Views)

I am again,still confusing.

I will explain clearly

I am using case structure,

1.In case1,there is 1 ring control(named C1)  and few options(lets say A,B,C,D)

2.In case2,there is 2 ring controls(named C2,C3) and the same options(A,B,C,D in both)

3.I have an array of indicators(A,B,C,D),which will turn ON as per the selection from the options either in case1 or case2(I assumed different colours for both cases,if i have selected from case1 control C1 the indicator will turn ON as green and if i have selected from case2 control C2 &C3 the indicator will turn ON as Red).Additionally i have an send button to turn ON the indicator(i,e even after selecting the options from the controls i need to press the send button to pass value to indicator),aswell i have used colour box for different colouring.

4.When i come to case2 since i have 2 controls,its mandatory to select options from both the controls so finally the indicator turns Red(two indicators turns Red).

I have solution upto this point,except 1 issue,when i come to case2 since i need to select the options from both the controls and i will press the send button so the indicator turns ON as i said in Point3.But i have a problem,the indicator is not turning on at one press of send button,i need to press twice the send button to turn both the indicators ON(at 1st press one indicator is turning ON and next press the other indicator is turning ON).

Another question which i have posted previously but i made one mistakes in typing.I do really apologize for that.Anyhow i will explain now.

1.For ex if i have choosed case1,from the control C1(options A,B,C,D) i will select  options A,D and making them disabled by property node,these A,D turns Green now as i said in point3.

2.Now in case2, In control C2 all the selected options in case1 are disabled ,now only B,C left to select ,so i select B. Then in control C3 naturally only C will be left to select becoz other options are selected. But i dont want to have it like this( i mean C3 sholud be only related to C1 not to C2,i,e.. If i have selected A,D from C1 then in C3 i need to have them(A,D) enabled instead of disabled and B,C to be disabled(reverse of C1).whatever i do in C2 should not affect C3.

Any help appreciated.

Thanks

0 Kudos
Message 22 of 31
(1,499 Views)


Veeru wrote:
I am again,still confusing.
Yes, very much so!


Veeru wrote:
I will explain clearly
No, it's not any clearer!


Veeru wrote:
I have solution upto this point
Then please post the solution up to this point! 🙂
 
Seeing a VI is much clearer than a reading paragraphs after paragraphs of confusing descriptions. Show us all the controls and indicators and send buttons, for example and the general code layout. Add a description on how to use the VI. Add diagram and front panel comments with arrows to describe what we should do, what currently happens and what should happen instead.


Message Edited by altenbach on 07-04-2008 09:36 AM
Message 23 of 31
(1,479 Views)

Thanks Altenbach..

I had read the entire paragraph twice and didn't know what it meant..  And, me being a very shy person, I didn't dare ask more questions 😉

0 Kudos
Message 24 of 31
(1,473 Views)
Thanks Joe and altenbach
0 Kudos
Message 25 of 31
(1,443 Views)

Hi Veeru,

Is it working?  If not can you post what you have so far?

R

0 Kudos
Message 26 of 31
(1,424 Views)
Hello Joe
 
I have attached the code which we discussed last week.
 
The operation of the program is,once the program is started from the selection button(there are four modes namely Shared,BG big,BG small and BG) we can choose anything from that,then it comes up with other selection list(D1,D2,D3,D4,D5).if we choose anything and clicked the add button the indicator turns on(one indicator turns on per each selection).
 
1.If you look at the shared mode,there will be two selection list(select new drive and select drive to share with) and a boolean buttonThe problem i was explaining last week is here,i need to choose anything from select new drive and addtionally from the select drive to share with,then by pressing the add button once the corresponding indicators should turns on(now i am using the boolean button to change between the select new drive and slect drive to share with becoz it is in the case structure and also only one indicator is turning on.)
 
2.From the selection list(D1 to D5),if u selected any options once, it is greyed (disabled)eventhough the add button is not pressed(but i like to have it like this,the selections from the list(D1 to D5 )needs to be only greyed(disabled) after pressing the add button).
 
3.From the selection list(D1 to D5) in any modes,if we choose the options and press add ,indicator turns on and the corresponding slection(D1 to D5) is disabled.I like to do it like this,it needs to disabled(selections we make) in all the slection list except the selection list in shared mode(Select new drive to share with,i,e for example if u have choosed D1,D3,D5 in any other modes it will disabled but i need that have  to be enabled(option available to choose) in Select New drive to share slection list(so then here D1,D3,D5 is enabled).Then later if u have choosed any options from the selectionlist(select new drive to share with) it needs to disable by this time.
 
Thanks
 
 
0 Kudos
Message 27 of 31
(1,398 Views)

You still have way too much duplicate code:

  1. All these "reinit to default" could be combined into a VI method "Default vals. Reinit all". They should also be wired to the loop to ensure everything happens before the loop starts.
  2. The small sequence frame in the upper left corner has no purpose.
  3. The colors of the purple array are slightly different. Is this intentional?
  4. If an array constant has all elements at the same color, you don't need to index into an array, but you can just use a scalar color constant.
  5. Instead of rattling though 5 instances of "disable items", you could use once instance in a FOR loop iterating over 5 control references. (Actually, you only need to reset the one that got used.)
  6. You set the same four "visible" properties in all cases of a case. Here the properties belong after the case and only the booleans belong inside the case. Now you only have four instances instead of twenty! (80% less code!)
  7. Instead of =1, =2, =3, =4, you could do an "in range" or do a single comparison with an array containing elements 1,2,3,4.
  8. You can add the stop event to the other event and wire the stop button to the stop terminal. No need for a seperate event case.
  9. Maybe some of your controls could use simpler names to unclutter the event labeling.
  10. ...
Message 28 of 31
(1,387 Views)

Hi altenbach

Pls give some more idea on this problem

 

Thanks

0 Kudos
Message 29 of 31
(1,366 Views)


Veeru wrote:

Pls give some more idea on this problem


DId you implement all the ideas above? Then attach your VI again to see what else needs work. :D.
0 Kudos
Message 30 of 31
(1,363 Views)