From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

program designed by vi and dll which one cost less time ?

first, I want to ask is that, I found the root of the VI  in labview is a kind of dll, and the files of .lib, .h and .dll can by searched in the installation directory.

As that, is the VI designed by C++?

 

Another question is if I want to designed a system which cost least time.

Without considering the  difficulty of the achievement, is better to use VI or call the DLL to achieve the core algorithm?

 

thank you 

0 Kudos
Message 1 of 8
(2,530 Views)

I don't understand your question about the "VI designed by C+"?

 

What are you trying to do?

 

Unless you are doing something exotic, I'm sure you'll find it is better to code your algorithm in pure G code.

0 Kudos
Message 2 of 8
(2,527 Views)

@Guevara wrote:

first, I want to ask is that, I found the root of the VI  in labview is a kind of dll, and the files of .lib, .h and .dll can by searched in the installation directory.

As that, is the VI designed by C++? 


Are you talking about a specific VI? What is your definition of the "root of the VI"? Are you talking about the LabVIEW installation folder?

VIs are programmed in LabVIEW, not C++. LabVIEW can call code written in other languages. The LabVIEW compiler itself  is described here.


Guevara wrote:

Another question is if I want to designed a system which cost least time.

Without considering the  difficulty of the achievement, is better to use VI or call the DLL to achieve the core algorithm?


What kind of system? "core algorithm" to do what? We need more information.

0 Kudos
Message 3 of 8
(2,526 Views)

@altenbach wrote:
 Are you talking about a specific VI? What is your definition of the "root of the VI"? Are you talking about the LabVIEW installation folder?

VIs are programmed in LabVIEW, not C++. LabVIEW can call code written in other languages. The LabVIEW compiler itself  is described here.


Many of the number crunching VIs in Labview. Have a core that is DLL call. So none of the calculation is coded in Labview. The reason for this is to increase speed, and I also suspect conserve memory. Usage of memory and speed is close related.

But to the OPs question. I will say "when in Rome, do as the Romans do" So if you have something you want to solve in Labview use Labview. Do not mess with writing DLLs that perform the core functions. I can not in any way see how this would benefit your project at all. This will be true 99.9 % of the time.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 8
(2,512 Views)

Maybe I can ask in another way

If my codes include 65536 or more loops

Should I just use labview itself to achieve that, or is better to code the loop by C++ first, and then let labview call the dll built by C++

Which way will cost less time

0 Kudos
Message 5 of 8
(2,469 Views)

Are you talking about 65k individual loops or a single loop with 65k interations?

 

If you can completely program a loop in one minute, coding 65536 loops would take many months. (An empty loop has little purpose, it must also contain some code).

 

LabVIEW is good at loops and it will be faster to write the program. There is no need to take a detour via C++.

 

What kind of project is that?

0 Kudos
Message 6 of 8
(2,456 Views)

@COq Rouge wrote:
Many of the number crunching VIs in Labview. Have a core that is DLL call. So none of the calculation is coded in Labview. 

That does not really prove anything, because you can create dlls from plain LabVIEW code. 😄

 

(Of course there is a huge algorithm legacy of text based "number crunching" code available (e.g. BLAS), no need to reinvent the wheel.)

0 Kudos
Message 7 of 8
(2,453 Views)

@altenbach wrote:

@COq Rouge wrote:
Many of the number crunching VIs in Labview. Have a core that is DLL call. So none of the calculation is coded in Labview. 

That does not really prove anything, because you can create dlls from plain LabVIEW code. 😄

 

(Of course there is a huge algorithm legacy of text based "number crunching" code available (e.g. BLAS), no need to reinvent the wheel.)


And, in LabVIEW we have Altenbach and the forums.  Pick your poison- the code will be optomized and done quicklySmiley Very Happy


"Should be" isn't "Is" -Jay
Message 8 of 8
(2,450 Views)