LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List of pointers Moveblock

Solved!
Go to solution

Here you are. 

0 Kudos
Message 11 of 16
(2,048 Views)

Why make it so difficult to help you? Upload the VI, and the VI that calls this one that shows how you update the address global variable, and also show us your real C code.

Message 12 of 16
(2,025 Views)

Thanks for your help. I could post all my code but it will be huge. 

0 Kudos
Message 13 of 16
(2,022 Views)

Do you have any control over where the initial set of images are stored? If you could store them in consecutive addresses - one immediately after the other - then you could do a single MoveBlock call rather than loop through all the addresses. I don't know if this would be much faster.

0 Kudos
Message 14 of 16
(2,007 Views)

Well,there is absolutely no reason to set the Call Library Node to execute in the UI thread. MoveBlock() is a self contained function that has no global state that is shared with itself or anyone else. So change the Call Library Node to execute in any thread and after that when you really want to go crazy you can also enable parallel execution on the loop. That should definitely give you a performance boost to the point that doing this in C will be actually slower unless you start to go multithreading in C too.

 

in case you wonder how you can know if a LabVIEW manager function is multithreading compatible or not: Take a look at the extcode.h file in the cintools directory inside the LabVIEW directory. All functions in there have a preprocessor definition in front of them.

If the function is TH_REENTRANT it is completely safe to call the function from any thread. If it is TH_PROTECTED it could be safe but you must make sure that you do not call the same function in parallel otherwise it could result in mutex locks (the code simply hangs and you can not get out if it other than resetting the whole process). If it is TH_SINGLE_UI or TH_UNSAFE you absolutely have to call it from the UI thread to be safe.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 15 of 16
(1,999 Views)

Many thanks for your feedbacks. I will check this in a few days and keep you updated. Again, many thanks 

0 Kudos
Message 16 of 16
(1,985 Views)