LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll - performance issue

Hello,

I created a simple Vi to test the performance. It is very good - when I start the vi in LV both processors of my PC are used.

When I create a dll to export this funtion it gets very slow. When I use the function in Visual C it uses only one processor and therefore takes more time.

I attach a shot of the VI.

C.

0 Kudos
Message 1 of 7
(3,195 Views)
hi

did you try reducing the N value of the FOR loop?

i am not sure if i sound silly, but try that too!!

reduce N value and see the time and memory it takes
0 Kudos
Message 2 of 7
(3,165 Views)
remains the same - the dll takes as two times long as the vi.


C.
0 Kudos
Message 3 of 7
(3,149 Views)
Hi Curtis W. Newton,

LabVIEW creates two threads out of your two loops and Windows decides on wich core they will run.

Do you use LabVIEW 8.5? In that case you could use the timed loop and define the core that will host the thread separately for both loops.

Could you post your VI, DLL and C-Code of your implementation? That would help us to give you more detailed hints.
National Instruments
District Sales Manager
0 Kudos
Message 4 of 7
(3,102 Views)
Hello,

attached you can find a simple test program.

Bye - c.
0 Kudos
Message 5 of 7
(3,060 Views)
Sorry,

wrong testprogram, please take this one.

C.
0 Kudos
Message 6 of 7
(3,048 Views)
Hi Curtis,

due to constant folding LV8.5 takes 0s to calc your SinCos vi!

I build a new dll from this, but didn't test it... Can you do so?
Best regards,
GerdW


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