PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Labwindows/CVI, TestStand, MultiThreading with same DLL

I am writing a dll in Labwindows/CVI that will be used with TestStand. I would like TestStand to run 10 "tests" at the same time by using the multithreading capabilities. Each test will use the same DLL at the same time however. I have run into some data protection problems (more than one thread writing to the same dynamically created array, etc.). My question is, what is the most convenient/effecient way around this problem. I do not want the threads to "share" the same array or any other resource, I would like each thread to have their own individual array/resource.

Thanks in advance.

Jared
0 Kudos
Message 1 of 2
(3,013 Views)
Jared,

Have you considered creating the array in TestStand and then passing a reference to the DLL? You can create arrays with the "initially empty" property checked and then call PropertyObject.SetNumElements to dynamically set the bounds of the array.

Hope that helps.

Matt Pickard
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,013 Views)