LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple case selection at a time


@JÞB wrote:

@paul_cardinale wrote:

@User002 wrote:

how to select mutiple cases at time? i have some cases such as case 0 case 1 case 2. i want to select some time indusually, some time 0,1 or 0,2 or 1,2 etc or all three at t time.. is it possible? 


You should never select anything "indusually"; that's way too cromulent.


Actually it's not cromulent at all!


Are you trying to tell me that cromulence and indusuallant selection don't go hand-in-hand?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 21 of 37
(1,187 Views)

 

Actually im making it for three channels. The command for RC and current  conmnd (command 11 and 12 so commands are not the same)will change in every sub VI so the commands in cluster will aslo chnage. 

- im using send because  if change the command for current measurement then im measuring current and channel value using it.

-  furthermore need that last code as wel for making it zoro and LED and other stuff

 

0 Kudos
Message 22 of 37
(1,172 Views)

@paul_cardinale wrote:

@JÞB wrote:

@paul_cardinale wrote:

@User002 wrote:

how to select mutiple cases at time? i have some cases such as case 0 case 1 case 2. i want to select some time indusually, some time 0,1 or 0,2 or 1,2 etc or all three at t time.. is it possible? 


You should never select anything "indusually"; that's way too cromulent.


Actually it's not cromulent at all!


Are you trying to tell me that cromulence and indusuallant selection don't go hand-in-hand?


Since indussually is not cromulant it follows that any attempt at performitifcation of  indussuallant selectessioning should not be a correct aspirementation.  


"Should be" isn't "Is" -Jay
0 Kudos
Message 23 of 37
(1,163 Views)

@GerdW wrote:

Hi jeet,

 


@User002 wrote:

converted to 2019..


Finally some code…

 

Suggestion:

All code, that is the same in all cases, does not belong into those cases! Move "constant code" out of the case structure! (This will reduce your cases 1,2,3 a lot…)

Then we can discuss about your other/original problem: what is the difference between those 3 cases!?

For me they look the same, even their input clusters have the same values…

 

  • What's the point of the wait inside the "Send" event case? Events should be handled as fast as possible!
  • What happens when you press "Init" (incidently) twice?
  • There's no project file, and all clusters miss a typedefinition…

 

More suggestions:

  • Do you really need upto 5 (!) input tunnels for the very same value???
  • Do you really need to compare ">1.2" two times for the very same value?
  • Do you really need to convert a boolean value to TRUE/FALSE in the most popular Rube-Goldberg way (IF true THEN true ELSE false)???
  • Do you need to add zero?

I've notice that no effort made at a clean BD or FP often goes hand-in-hand with no effort made at thinking while coding.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 24 of 37
(1,160 Views)

The formula part is working fine.. im facing problems while visa reading for all three cases.. so i used radio button for selecting case.. but now i want to select  all three cases. If i select one case at a time its working and getting results as expected 

0 Kudos
Message 25 of 37
(1,136 Views)

https://forums.ni.com/t5/LabVIEW/Can-a-case-structure-execute-multiple-cases/td-p/1389954 

 

Can someone explain me how to do like this in the link? 

0 Kudos
Message 26 of 37
(1,087 Views)

@User002 wrote:

https://forums.ni.com/t5/LabVIEW/Can-a-case-structure-execute-multiple-cases/td-p/1389954 

 

Can someone explain me how to do like this in the link? 


Let us stop here and rethink, instead of telling how you want to do it, can you please tell what you're trying to achieve with all details of the instrument you're trying to control/communicate?

 

perhaps, there is a lot simpler and better way to do it than the convoluted way you're trying to approach with.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 27 of 37
(1,083 Views)

Ok i will explain the situation in detail. 

Im using microcontroller is  connected to chip and im communicating using Visa write and read.. initially  i want to send all the 14 commands as a initialization to activate the  chip as i did in VI.. then i have 3 sensors which is attached to that chip. I can control the current of the sensors using the commands(which is command 12) as i did it in the Current VI even i can select the channels using command 11 then commen vI is to get a final output of sensors..( command 11 and 12 are not same here in subvis). 

0 Kudos
Message 28 of 37
(1,074 Views)

@paul_cardinale wrote:

@GerdW wrote:

Hi jeet,

 


@User002 wrote:

converted to 2019..


Finally some code…

 

Suggestion:

All code, that is the same in all cases, does not belong into those cases! Move "constant code" out of the case structure! (This will reduce your cases 1,2,3 a lot…)

Then we can discuss about your other/original problem: what is the difference between those 3 cases!?

For me they look the same, even their input clusters have the same values…

 

  • What's the point of the wait inside the "Send" event case? Events should be handled as fast as possible!
  • What happens when you press "Init" (incidently) twice?
  • There's no project file, and all clusters miss a typedefinition…

 

More suggestions:

  • Do you really need upto 5 (!) input tunnels for the very same value???
  • Do you really need to compare ">1.2" two times for the very same value?
  • Do you really need to convert a boolean value to TRUE/FALSE in the most popular Rube-Goldberg way (IF true THEN true ELSE false)???
  • Do you need to add zero?

I've notice that no effort made at a clean BD or FP often goes hand-in-hand with no effort made at thinking while coding.


Yes, I believe "sloppy coding equals sloppy thinking".  I believe it's because of inattention to detail.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 29 of 37
(1,040 Views)

@User002 wrote:

Ok i will explain the situation in detail. 

Im using microcontroller is  connected to chip and im communicating using Visa write and read.. initially  i want to send all the 14 commands as a initialization to activate the  chip as i did in VI.. then i have 3 sensors which is attached to that chip. I can control the current of the sensors using the commands(which is command 12) as i did it in the Current VI even i can select the channels using command 11 then commen vI is to get a final output of sensors..( command 11 and 12 are not same here in subvis). 


Now you're revealing some details, could you please provide all details involved in creating the VI(do remember that we can help only based on the information you share)

 

What are the commands? when to send each command? what is the format of the response? how to convert the response into some value?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 30 of 37
(1,024 Views)