LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

integrate code in labview

Solved!
Go to solution

Hello,

I do not know if this action is possible with Labview but I would among other things, set up a simple code in C outside labview to offer the developer , different parameters to ultimately create a database in the program has adapted needs.

Example, if I want my labview program has say, four external devices , the port is connected to port B with buttons or displays positioned on { x, y } and the conditions of each object are defined according to the need of developer , this would be the C program that define these parameters in such a text file and the text file would fit a result in Labview as import by defining a basic program with connections and positions of each Vi , buttons , displays, ...

To give you a better idea of the thing , I can take an example , home automation , or where each house has its peculiarities to know the number of devices , type, ... which are automatically set by the developer in the C program because it has already defined its needs.

Thank you in advance for your answers

0 Kudos
Message 1 of 9
(3,448 Views)

@Fëanor wrote:

[...]

Thank you in advance for your answers


I am very sorry....but: What exactly is the question?

 

thanks for stating clear questions in the future,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(3,416 Views)

How to " define these parameters in such a text file and the text file would fit a result in Labview as import by defining a basic program with connections and positions of each Vi , buttons , displays, ..."

0 Kudos
Message 3 of 9
(3,408 Views)

Sorry, but you still have to help us in understanding your goal:

As i understand it, you want to provide a configuration tool which lets the user configure some specific topics on the application. This tool creates a file which is then used to create VI(s) matching that definition.

 

Is my understanding correct?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 9
(3,391 Views)
Solution
Accepted by topic author Fëanor

Are you trying to automatically generate a VI based on user inputs?  The LabVIEW Code Generation Engine might be useful.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 9
(3,384 Views)

Norbert_B a écrit :

Sorry, but you still have to help us in understanding your goal:

As i understand it, you want to provide a configuration tool which lets the user configure some specific topics on the application. This tool creates a file which is then used to create VI(s) matching that definition.

 

Is my understanding correct?

 

Norbert


Yes and define also the position of Vis, buttons, displays,...

0 Kudos
Message 6 of 9
(3,345 Views)

So please look into the link Jim provided.

There is no tool for this available, but you can create one. BUT: This requires a very decent knowledge about LV and "VI Scripting" and hence is nothing, a LV newcomer can handle.

 

So baseline message:

It is possible, but very complex. The advantage is that the "Script" file (so the file you are talking about all the time) could be "generic" as you have to implement a parser on your own.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 9
(3,336 Views)

oh... ok thank you. for explain my think,

for example the file to import to LabView is could be a txt file like this:

 

while ( Loopcondition != STOPBUTTON)

{

Display=NumericControl*5 {5;6}

 

 

}

 

I thought something like that.

0 Kudos
Message 8 of 9
(3,330 Views)

Do you really need to implement some C interpreter for this? As i understand it, you can just set up a settings/parameter file?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 9
(3,282 Views)