LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logging in and switching to another VI

Solved!
Go to solution

Hey everyone,

I am creating a program in my LabVIEW as an executable. I have created a program which checks username and password from MySQL database and then says accepted or rejected. Now I want this program to switch to another VI in the executable itself if the username and password combination is right or display an error if one of it is wrong. How do I do this? I am attaching VI file created in LabVIEW 2020. I have installed a toolkit called MySQLNetCom by HampelSoftware Engineering

0 Kudos
Message 1 of 19
(253 Views)

Hi shreyaskarnad,

 


@shreyaskarnad wrote:

I want this program to switch to another VI in the executable itself if the username and password combination is right or display an error if one of it is wrong. How do I do this?


Use a case structure and call that "another VI" as subVI in one of its cases. Display the error in the other case…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 19
(246 Views)

Ok I will try this. One more requirement is that this should happen on clock of the button and not as it is. So how do I do that?

0 Kudos
Message 3 of 19
(240 Views)

Hi shreyaskarnad,

 


@shreyaskarnad wrote:

One more requirement is that this should happen on clock of the button and not as it is.


What is the "clock of the button"?

(When you convert your VI for LV2019 I could examine the "as it is" state…)

Best regards,
GerdW


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

Oh my bad, sorry for typo, I meant click of the button. As soon as I press the button it should check if the username and password combination is correct and if yes then take me to next VI in same EXE

0 Kudos
Message 5 of 19
(229 Views)

Hi shreyaskandar,

 


@shreyaskarnad wrote:

As soon as I press the button it should check if the username and password combination is correct


Without being able to look into your VI: use an event structure…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 19
(226 Views)

Here's the version 19 file

0 Kudos
Message 7 of 19
(222 Views)

Hi shreyaskandar,

 

there's no button in your VI!

 

Add a button - and add an event structure.

Compare the database data with user credentials upon "value change" event of your button.

Use a case structure to call a subVI upon successful login…

Best regards,
GerdW


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

Hi sir, 

I'm at loss here, I'm still a newbie so doing everything as given in YouTube videos. But this thing, login details check at button press and then heading to another VI is very tough. Again this second VI button press should take me to a third VI. Can you please give me a detailed guide? Because I added button but don't know how to go ahead.

0 Kudos
Message 9 of 19
(172 Views)

Okay so new update, button to check the values I succeeded, now next thing is how to switch to another VI if the login details are correct

0 Kudos
Message 10 of 19
(166 Views)