LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about enums

i have total 8 enums  named as controller1 to controller 8 with 8 elements in each enum as Channel1 to Channel8. if i choose channel1 in A1, that should get disabled in the corresponding enums (i.e A2 to A8 ).like that it has to fallow... but when u dont choose anything for a particular enum , it will be at its first element Say "NA " and this shud nt get disabled in the corresponding enums.can anybody help me out....... i have attached my code..... i have done most of the part.... bt it is not working as i wished....

thank u.

Message 1 of 32
(4,902 Views)

Duplicate - http://forums.ni.com/t5/LabVIEW/about-enums/m-p/1217677#U1217677


___________________
Try to take over the world!
0 Kudos
Message 2 of 32
(4,888 Views)

hi sagar,

  Please attach the code,because i want to know what are the elements in enum?

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 3 of 32
(4,881 Views)

i have attached it.... thanks fr the reply........

0 Kudos
Message 4 of 32
(4,875 Views)

Hi,

 

just cleaned up your VI to use the terminals and create the references more efficiently.

Always use a delay in UI loops.

I would suggest using an event structure for your kind of task...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 32
(4,860 Views)

@GerdW

thanks for the reply.... bt in ur reply code if i choose nothin in controller1 (i.e " NA" is der) , then it will get disabled for the corresponding Controllers........

which should nt happen......

0 Kudos
Message 6 of 32
(4,854 Views)

@GerdW

I mean to say.. if u choose nothin in the controller 1 And choose anytin in the controller 2 (from Channel1 to Channel 😎 then "NA" will get disabled for the remaining Controllers..... which should not happen........

0 Kudos
Message 7 of 32
(4,851 Views)

Hi mohansagar,

 

well, "my" VI is just like yours, just cleaned up...

 

You have to provide some (more) logic. Like: "IF enum1="NA" then DO Nothing" or "IF enum1="value1" THEN disable "value1" on all other enums"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 32
(4,845 Views)

@GerdW

that is the point where i got stuck.... i could nt find out the Logic der. thats why i hav posted here..

thanks fr the reply......

0 Kudos
Message 9 of 32
(4,840 Views)

Please don't abbreviate words (like fr instead of for).  This isn't text messaging.  Abbreviations are harder to read.

I think what you are looking for is in the attached vi.  It was a bit challenging but I did it.  I use an event structure instead of polling to see when an enum is changed.  Then I read all enum values, eliminate the NA's and make an array with the rest.  These are the items that should be disabled for all enums.

 

One thing though, the enum just changed will show its text in grey.  You would have to add code to not disable the item just chosen for that enum only.  But still disable the chosen item for the rest of the enums.  Its very complex.

 

If you could live with the grey text, then use this vi.

- tbob

Inventor of the WORM Global
Message 10 of 32
(4,800 Views)