LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a text based language in mathscript node executed faster?

Hello Everyone,

I have build a VI contains mathscript function node, due to the big data needs to run it takes long time to finish the execution, is there any way to make the process faster, such as building shared library so it can be called by call library function node, or this only valid for c and c++ .

 

  any help will be highly appreciated

0 Kudos
Message 1 of 13
(3,926 Views)

Hi Aneece,

 

replacing the mathscript node by standard LV functions/primitives might speed up your code...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(3,908 Views)

There is no way to convert the Mathscript code to a shared library.

 

Please post what you're actually doing in the Mathscript node. As Gerd noted, there's probably a way to do this using native LabVIEW functions.

0 Kudos
Message 3 of 13
(3,897 Views)

Hi aneece,

  My observation is that if you use mathscript RT module(comes along with labview 2009 onwards),it may makes the things faster..

 

 

Thanks and regards,

srikrishnaNF

 

 

Regards,
Srikrishna


0 Kudos
Message 5 of 13
(3,854 Views)

 


@srikrishnaNF wrote:

Hi aneece,

  My observation is that if you use mathscript RT module(comes along with labview 2009 onwards),it may makes the things faster..


For a separate license fee, of course.... Smiley Wink

 

0 Kudos
Message 6 of 13
(3,843 Views)

@smercurio_fc wrote:

There is no way to convert the Mathscript code to a shared library.

 

Please post what you're actually doing in the Mathscript node. As Gerd noted, there's probably a way to do this using native LabVIEW functions.


While it may not be possible for a direct conversion from MathScript code to a DLL, it is possible to build a shared library using the application builder from a VI containing a MathScript node. This could be one way to get MathScript code into a shared library.

 

The application builder is included with LabVIEW Professional Edition. You can setup a shared library by going to the project explorer and right clicking "Build Specifications" and selecting New->Shared Library (DLL).

 

-K Scott

0 Kudos
Message 7 of 13
(3,814 Views)

Hello Guys,

I wrote the code in C language and I tried to build a shared library, when I do right click on the call library functin node and creat .c file, the file ll be saved as a C file in text format not in .dll format, so the last step it doesn't work (identify the path to the file)and that due to the file is not saved as .dll.

0 Kudos
Message 8 of 13
(3,787 Views)

The last step is woking perfectly fine as all that is supposed to happen is to create a .c file that you can edit and create a dll with whatever c compiler you have. LabVIEW does not come with a c compiler

Message 9 of 13
(3,783 Views)

Thanks Dennis,

you mean i have to have a c compiler installed in my pc. can i know in what kind of text language that the sine wave and other wave generators which are all being called by the call library function node are written? I thought LV comes with the C compiler.

 

thanks

Aneece

0 Kudos
Message 10 of 13
(3,757 Views)