LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

Running multiple Mathscript nodes in Parallel without suspending each other

For our master project in mechanical engineering, we are making a truck-trailer simulator based on some Matlab code with some .m functions. To get inputs from steering etc. and output for the motion platform we are using Labview Real-Time.

To execute the code, we are using a RT desktop with 8 CPU's (Intel i7 3,4 GHz). We would like to execute the code by at least 1000 Hz but that is too much for one core. We have split the code into two parts which should be able to run in parallel. One part lasts about 0,7 ms and the other part 0,5 ms if they run alone.

The problem is that when we try to run both Mathscript nodes parallel in the VI, it still lasts too long. It seems like the Mathscript nodes are "fighting" against each other to execute the code. It is like some of the functions that the Mathscript nodes are using, are non-re-entrant and don't allow parallel execution.

Does anyone have an idea, how we can get the code to run parallel on different CPU's?? Are there any functions that should be avoided to achieve parallelism?? It is so annoying to see 7 cores at 0% when it can't run fast enough.

 

Hoping for some quick answers - it is really a show stopper right now.

0 Kudos
Message 1 of 2
(5,644 Views)

The best general answer to your question is here:

http://zone.ni.com/reference/en-XX/help/373123C-01/lvtextmathmain/rt_determ_guide/

 

If you could post your code, I could give more specific advice.

 

Kevin C.

LabVIEW MathScript RT

0 Kudos
Message 2 of 2
(5,619 Views)