LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Developing VI script through C code

Can I create a VI using just C code? I have a C code which has some complex function with inputs suppose x, y and outputs p and q. I want to know whether we can create a VI (with/without VI scripting) from whose control panel, we can control the inputs x,y and be able to see the outputs p and q without bothering about the function(which is included in the C code). I don't want to use importing .dll files(which many may suggest), instead create labview blocks/objects on the block diagram of the VI file.

0 Kudos
Message 1 of 6
(1,654 Views)
0 Kudos
Message 2 of 6
(1,649 Views)

How can i?

0 Kudos
Message 3 of 6
(1,644 Views)

@srk1906 wrote:

How can i?


Something tells me I am not providing the answer you want....

 

It is atranslation exercsie where the syntax of C is translated into the diagrams of LabVIEW. LabVIEW has many of the same operators that you will find in C so you just have to develop the LV code to do the same thing as the C code does.

 

Now if you are looking for a way to point at some C code and punch a button to get the same code in LabVIEW, we are talking about different things. Inthat case you may want to explore what is offered on the block diagram and can be found at

 

Mathematics >>> Scripts and Formulas

 

Ben

Spoiler
Note: I did notice the spelling errors in my post but left them as is bcuase in LabVIEW, spelling a syntax do not count.
0 Kudos
Message 4 of 6
(1,636 Views)

There is no automated way to turn a C function into a LabVIEW VI. You would have to do this by hand. There is also no way to put C code into a block and execute that (no equivalent to a formula node or mathscript). Even if you spent months writing code to attempt to automate this translation, I doubt you'd come close to making it work reliably given the terseness of C and the lack of a direct pointer equivalent in LabVIEW.

0 Kudos
Message 5 of 6
(1,472 Views)

@srk1906 wrote:

[...] I don't want to use importing .dll files(which many may suggest), [...]

This is like saying you want to build a steering mechanism for a car without using a steering wheel (which many may suggest). Smiley Happy

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 6 of 6
(1,458 Views)