LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating between VI

Hi,

Let's say we have 2 vi's namely A.vi and B.vi. A.vi carries a string input and a numeric input, whereas B.vi carries a string indicator and a numeric indicator. I want to check if the fields are not empty and when the user inputs data in A.vi, it has to be received and displayed in B.vi using subVI concept. Could anyone kindly help?

 

Diaspora_0-1576131929704.png

 

 

0 Kudos
Message 1 of 7
(2,653 Views)

Hello,
To access and pass data among several VIs you need Global Variables:
https://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/glob_variables/
To check the numeric inputs you could use this:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000015BHlSAM&l

for the string you could use:
http://zone.ni.com/reference/en-XX/help/371361R-01/glang/string_length/
and than do the same thing as with the numeric.
And/Or you could do something like this:
http://zone.ni.com/reference/en-XX/help/371361R-01/glang/wait_for_front_panel_act/
There are more options and I don't know if this is the best way.

I hope I could help you.
PS: Next time show us your try in the Block Diagram 🙂

0 Kudos
Message 2 of 7
(2,624 Views)

I am fairly new to LabVIEW. I am sorry, I am unable to infer the answer from your contribution. Thank you though.

0 Kudos
Message 3 of 7
(2,608 Views)

Hi Diaspora,

 


@Diaspora wrote:

I am fairly new to LabVIEW. I am sorry, I am unable to infer the answer from your contribution.


Then you should take the "Training resources" as offered in the header of the LabVIEW board to learn the LabVIEW basics.

 


@Diaspora wrote:

Let's say we have 2 vi's namely A.vi and B.vi. A.vi carries a string input and a numeric input, whereas B.vi carries a string indicator and a numeric indicator. I want to check if the fields are not empty and when the user inputs data in A.vi, it has to be received and displayed in B.vi using subVI concept.


When you want to "check for non-empty inputs" you should use some comparison functions - in every programming language…

To send data from one VI to another you should use wires to connect to the connector pane inputs/output…

Best regards,
GerdW


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

I am really sorry to take up all your time. As I was in an emergency to accomplish this task, I resorted here. It has its own consequences. Thank you though for reaching out.

0 Kudos
Message 5 of 7
(2,584 Views)

If the homework is due "tomorrow" (or "later today"), you should talk to your classmates (there's generally nothing wrong in "learning together" -- it often is quite effective, especially if you all bring out your laptops and try to write (and test) routines as you discuss).  But asking strangers to "do your work for you" doesn't really help you in the long run ...  We do try to discourage this in the LabVIEW Forum.

 

Bob Schor

Message 6 of 7
(2,529 Views)

@Diaspora wrote:

I want to check if the fields are not empty and when the user inputs data in A.vi, it has to be received and displayed in B.vi using subVI concept. Could anyone kindly help?


It's a trick question. 

 

When the user enters data, the fields are never empty... Not both anyway.

 

Actually, most of us would use the event of data being (value change event) entered as a trigger to test the string(s) and then optionally send the values...

0 Kudos
Message 7 of 7
(2,499 Views)