05-17-2024 09:09 AM
Hi,
I am an absolute beginner in Labview. I am stuck in this task: I want to jump to a specific case based on a number comparison result. I did the initial googling and forum read, but sadly did not find what I am after. I am sure its really simple, but this time I need that extra help. Thank you in advance.
05-17-2024 09:15 AM
Hi,
I guess this is what you're looking for :
It is in "Comparaison" Palette on the block diagram.
05-17-2024 09:24 AM
PinguX is correct, but keep in mind that simply putting another case structure inside the first one will work too. This is also more versatile and will allow for more complex logic.
However, avoid the temptation to nest too many case structures as it can become a nightmare to debug and upgrade. That is the time to start using proper programming architectures like a State Machine.
05-17-2024 09:36 AM
Well, that "case inside case" approach was suggest to me by some AI tools, but I can not understand how do I wire it. I may be asking for some extra, but could you please provide a very simple drawing or edit my existing VI so that I can understand the idea behind it? In any case, thank you for your help.
05-17-2024 10:05 AM
Here you go.
As NIquist said, stay moderate with that.
05-17-2024 10:17 AM
thank you again
05-17-2024 10:27 AM - edited 05-17-2024 10:28 AM
This is all I was talking about.
It looks like you have bigger problems though. You should not have an event structure with no timeout in one of your cases. It will lock the code while it waits for "Speti" to be pressed.
It's generally best to just describe exactly what you need to code and then let us help you do it right.
EDIT: Forgot to attach the code.
05-17-2024 12:04 PM
As a rule of thumb, equal comparisons with orange data are extremely dangerous.