08-22-2022 01:18 PM
@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?
08-22-2022 01:49 PM - edited 08-22-2022 02:05 PM
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
08-22-2022 02:01 PM
@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.
08-22-2022 02:03 PM
@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.
08-22-2022 02:33 PM - edited 08-22-2022 02:40 PM
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
08-22-2022 03:39 PM
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?
08-22-2022 03:43 PM
@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.
08-22-2022 03:51 PM - edited 08-22-2022 03:58 PM
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).
08-22-2022 05:02 PM
@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.
08-22-2022 08:48 PM
@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?