03-22-2011 12:25 PM - edited 03-22-2011 12:34 PM
I have two PXI-1045 chassises connected to a single computer via a dual port MXI Express card.
Each of the two chassises have 12 PXI-4462 4 channel DSA cards.
I am using the "DAQmx Self Calibrate.vi", which takes about 156 seconds.
It appears that if place 24 of these DAQmx Self Calibrate VIs on my block diagram,
then it appears that 4 will finish after 156 seconds, then another 4 will finish after
another 156 seconds, and so on, until all are finished after a total of 936 seconds.
I have found that 1, 2, 3, or 4 can be simultaneously self calibrated, but more than that requires additional time for each group of 4.
So my question is, is it possible to sell calibrate more than 4 at once?
My computer is a quad core, but I don't think this is the limiting factor.
Could it rather be some other resource, such as Triggers on the PXI bus, that are the limiting factor?
03-23-2011 03:36 PM
Sorry about any grammar problems.
03-24-2011 01:39 AM - edited 03-24-2011 01:41 AM
Hello There,
The MXI Express link expands on the PCI Express bus over the the PXI Express platform. However, the triggers are not shared over the MXI Express link and probably does not influence the self calibration of the cards. This is described in figure 3.1 on page 3-2 of the MXI Manual:
http://www.ni.com/pdf/manuals/371814b.pdf
In fact, the reason why you are experiencing four executions simulataneously of the self calibration is due to the quad-core processor. Generally, each core is dedicated to executing one self calibration vi at a time. I would refer to Programming Strategies for Multicore Processing: Data Parallelism:
http://zone.ni.com/devzone/cda/tut/p/id/6421
05-23-2011 10:05 AM
Roman,
I have a dual core processor computer and a quad core processor computer.
Both processors have one thread per core.
Anyway, both the dual core and quad core are able to self cal 4 of the PXI-4462 cards simultaneously.
So there must be some other resourse that limits the number of cards that can be self calibrated sumultaneously.
Do you have an idea what the limiting item would be?
Kevin.
05-23-2011 12:12 PM - edited 05-23-2011 12:20 PM
Hey Kevin,
The problem you are running into is likely caused by the fact that LabVIEW allocates a default of 4 threads per priority per execution system. DAQmx VIs by default run at the same priority and execution system as their caller (despite the existence of a "DAQ" execution system), so they are probably running at normal/standard:
While a .dll is being called by LabVIEW the thread is reserved. So, 4 parallel calls to DAQmx Self Calibrate.vi (which call into nilvaiu.dll inside the subVI) will reserve all 4 threads that LabVIEW has allocated to the normal/standard priority and execution system.
To raise the number of threads that LabVIEW allocates, add the line "ESys.Normal=24" or whatever number you'd like to LabVIEW.ini. You might also have to run threadconfig.vi (instructions found here). The end result should look like this when you run threadconfig.vi (you'll have to restart LabVIEW after editing the .ini file):
You could technically just use threadconfig.vi to set the number of threads without manually editing the .ini file, but this only lets you allocate up to 8 threads per execution system per priority. The number shown in < > is two higher than the actual number of threads allocated due to how the enum was defined in the vi.
Best Regards,