LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I pass a string structure into a VI?

"To learn more about LabVIEW it is recommended that you go through the tutorial(s)..."

Is this your response to all of the questions on this forum?

Clearly I do not know as much as you about LabVIEW. If I knew more I would be answering questions rather than asking them!

 

Okay, so you're saying the "command_generator" VI will do what I need it to. Still the issue remains of passing information from one VI to another.

How do I utilize this VI from another VI?

 

 

0 Kudos
Message 11 of 64
(1,652 Views)

Before you start asking questions, you really need to run through those tutorials to get a basic understanding of how LabVIEW works. So far, the questions you've asked would not be necessary if you just spent a little bit of time beforehand. Do you realize that the majority of people here are volunteers that take time off from their jobs to answer them?

0 Kudos
Message 12 of 64
(1,643 Views)

I would like this entire program to be self contained. Ie, I do not want to have to manually select the command to send to the motor.

This is an ongoing feedback loop between the thermocouples, the VI and the motor. As the temperature differential changes the motor speed needs to change. Therefore the VI needs to accept the data input from the thermocouples, calculate, and pass the relevant information to the motor (or command_generator or whatever) every, say, 30 seconds or so.

 

The motor rotation determines the speed at which a vessel nears a pool of liquid nitrogen. The nitrogen vapors cool a copper base plate in a vessel. In this way (ie by adjusting the motor speed on a continual basis) I hope to achieve a linear cooling gradient between the bottom and top of the vessel.

0 Kudos
Message 13 of 64
(1,642 Views)

Thank you, Dennis, for your advice and continued support of LabVIEW related questions. Your input and efforts are sincerely appreciated.

 

Like you I am a member of many forums and I gladly answer questions about areas in which I am more knowledgeable.

0 Kudos
Message 14 of 64
(1,637 Views)

@Samweis wrote:

"To learn more about LabVIEW it is recommended that you go through the tutorial(s)..."

Is this your response to all of the questions on this forum?


Yes, that is a response to many of the questions in the forum.

 

Why?  Because they are basic questions that can really only be answered by the person taking the time to do the upfront work by doing the tutorials and learning the basics of LabVIEW.

 

Once you learn what a wire is, how a subVI works, case structures, shift registers, basic terminology, then you can ask questions that are appropriate to answer in the forum such as the best way to do something and why doesn't this work.

 

The other types of questions that are not appropriate to ask are the "How do I import my data into Excel?"  question.  That was a good question to ask the first few times it was asked, but not anymore since it has been asked thousands of times already, and if the poster just bothered to take the time to search the forums, they'd have the answer and wouldn't need to ask.

0 Kudos
Message 15 of 64
(1,626 Views)

 


@Samweis wrote:

"To learn more about LabVIEW it is recommended that you go through the tutorial(s)..."

Is this your response to all of the questions on this forum?

Clearly I do not know as much as you about LabVIEW. If I knew more I would be answering questions rather than asking them!


Sure. If you ask questions like what the film strip is. Which is answered by doing the LabVIEW tutorial. How would you feel if you're on one of those other forums that you speak of and someone asked a question like "how do I concatenate a string in C?"

 

 

Nobody is trying to NOT help you. But it's hard to help someone who doesn't know very basic things.

 


Okay, so you're saying the "command_generator" VI will do what I need it to. Still the issue remains of passing information from one VI to another.

How do I utilize this VI from another VI?


By using terminals. Another question that is answered by doing basic tutorials. I can hear someone asking... "How do I pass a value to a function in C?"

 

0 Kudos
Message 16 of 64
(1,607 Views)

I understand your frustration with dumb questions and questions that other people have asked a million times.

 

I have done the tutorial that came with the program as well as taken a course on LabVIEW. Sure I admit I don't remember everything, but the way I learn best is through application. Please let us not digress into a discussion of intellectual aptitude and proper forum usage. I have googled my question to no avail.

 

I imagine any one of you could have answered my question ten times by now. I have already written the majority of the VI that I need but getting my VI to function with the supplied Arcus library is throwing me. Please, let's take the high road here...

0 Kudos
Message 17 of 64
(1,601 Views)

@Samweis wrote:

Is this feasible? Does this make sense? Any bright ideas?



@Samweis wrote:

I imagine any one of you could have answered my question ten times by now. Please, let's take the high road here...


Let me answer your questions 😉

Yes, it's feasible.  It makes sense, too.  Can't help you too much on the bright ideas.

 

You pass a string into a VI by creating a wire from your source to the terminal on the connector pane of the VI that corresponds to the input to which you want the string connected.

 

The library you uploaded includes a "demo.vi" that shows how to use the library, although a quick glance at it suggests that the demo code maybe be incomplete as it seems to be lacking calls to open and close the motor resource.  However, it might be a good starting point.

 

You've described a complex system that you wish to build but then asked a very basic question, so it's hard to know what sort of solution you're looking for.  You will get more useful responses if you start writing some code first, then post when you have a specific question about why some part of it does not work the way you expect.

Message 18 of 64
(1,588 Views)

My 2 cents worth.  There are probably 300+ messages posted here every day.  That is a hell of a lot of messages to go through.  I skip many because I just don't have time.  I have a regular job to do.  We regulars here are really getting tired of the same old very basic questions popping up over and over again.  So the standard response is to tell the original poster to study the free tutorials.  We are making an effor to cut down on the number of posts here.  If we don't succeed, then a lot of us will become so frustrated that we will quit doing this on a volutary basis, and there will be a lot less help going around on this forum.  I hope this is clear.  Passing a string to a subvi is just too basic.  It is something you would learn in the first hour of a tutorial.  Please help us try to keep the traffic here down to a reasonable level by studying Labview basics before asking such a basic question.

 

Now to answer your question fully.  Your subvi must have a string control created on its front panel.  If you right click on the subvi icon, you can select Show Terminal.  This will show the available connections into the vi.  Click on one of the boxes on the left side (left side for inputs and right side for outputs is the preferred method).  After clicking on one of the boxes, click on the string control on the front panel.  This connects that string control to that terminal.  Repeat for all front panel controls and indicators that you need to have access to from other vi's.  You can right click and select Show Icon after you have finished connecting controls and indicators to terminals.  Now in you main vi, you put the icon for the subvi on the block diagram.  Create a string, either a constant or a control, on the main vi.  Use the wiring tool to wire the string to the connector terminal of the subvi that is associated with the string control.  When you hover the wiring tool over the area in the subvi icon that has a terminal defined, you will see a tip strip pop up that displays the name of the control.  You will also see a colored short wire.  This tells you which terminal you are connecting to.  Just click and the connection is made.  You will see a solid wire from the string to the subvi.  In the case of a string, the wire color will be pink.  Integer wires are blue, floating points are orange.  There are other colors for other data types.  When you run the vi, the string will be passed to the subvi.  The subvi must be coded to handle that string properly.

- tbob

Inventor of the WORM Global
0 Kudos
Message 19 of 64
(1,571 Views)

Yes looking at the demo.vi does help. And you're right it does not contain a call to the motor. In fact it doesn't actually do anything lol. I played with all of the VI's in that library, and the only one I found that actually drives the motor is the utility_panel.vi, via commands manually typed into it (ie J+ or J-).

 

Also I contacted Arcus customer support and this was their response:

"You should be able to pass a string structure into the VI.  The output is
also a 
string.  The sample code accepts a user input string.  What you need
to do is provide some dedicated strings to the command processing VI so that
the user doesn't need to input each 
string by typing them in."

 

I am frustrated with the Arcus customer support. They refuse to answer any LabVIEW related questions and simply refer me to the provided library, which contains somewhat threadbare programs and no explanations.

 

That is why I was asking my specific, simple question. I realize that the nuts-and-bolts of the programming falls on my shoulders, and will involve some trial-and-error with the whole system once I have a VI that will drive the motor.  The first step is just to get LabVIEW to communicate with the motor, which is why I have posted to this forum..

 

So maybe I am asking the wrong question. Perhaps some of you would be so kind as to help me better understand the LabVIEW library they have provided, and how everything functions together? I thought that passing the requisite command(s), as a string, into utility_panel would be the way to go, but maybe there is a better way to do it.

 

Thank you all for your time and efforts.

0 Kudos
Message 20 of 64
(1,569 Views)