12-12-2019 12:27 AM
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?
12-12-2019 12:51 AM
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 🙂
12-12-2019 01:17 AM
I am fairly new to LabVIEW. I am sorry, I am unable to infer the answer from your contribution. Thank you though.
12-12-2019 01:48 AM - edited 12-12-2019 01:51 AM
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…
12-12-2019 02:04 AM
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.
12-12-2019 06:53 AM
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
12-12-2019 10:35 AM
@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...