02-20-2008 07:21 PM
02-21-2008 07:17 PM
Hi Maurice,
1) While this does seem like a long time to run, it is possible that this is fine. DAQmxBase was developed in LabVIEW with the Driver Development Kit and therefore, the first time you call that function, it has to load the entire .dll into memory. When I placed this function down in LabVIEW on a fast computer, it took at least 8 seconds to load and this was in its native environment.
2) For the MIO-16E-4, I do not believe that there is an APFI line. Try instead connecting to pin 11 or PFI 0. In the C Function Reference Help Document, for the function DAQmxBaseCfgAnlgEdgeStartTrig, it says that the only terminal that can be used as a trigger source for E-series cards is PFI0. Try this and see if the error is removed. You can also take a look at the Knowledge Base: Why Does My Specified Channel Not Work as an Analog Trigger Source in DAQmx?
3) I will have to look into this, to see if this version of DAQmx Base will run inside a mutli-threaded application.
4) With regards to support for Intel Macs, the Readme for version 3.1 says NI-DAQmx Base 3.1.0f2, the LabVIEW 8.2 support is mass compiled for PowerPC. The VI support will function properly in LabVIEW 8.2 for Intel, but should be mass compiled for faster load times.
You can also look at the Knowledge Base Documents: Using LabVIEW and NI Hardware on Macintosh Computers with Intel x86 Architecture and NI Data Acquisition Support for the Intel Macintosh.
Hope this helps, Mallori M.
02-24-2008 12:45 PM
02-25-2008 01:22 PM
02-25-2008 01:58 PM
02-25-2008 03:50 PM
02-25-2008 04:27 PM
02-25-2008 04:30 PM
Hi Maurice-
Apologies for the confusion. That KB is out of date- I haven't seen an Intel Mac with PCI slots yet, but we fully tested PCIe M Series and all supported USB products (including the newly-supported USB-9233, USB-9211A, USB-9215A, and USB-621x devices) with NI-DAQmx Base 3.1. I'll make sure that KB is updated accordingly.
Thanks for the heads up-
02-25-2008 06:37 PM
02-26-2008 10:57 AM
I would like to expand on what Tom was saying:
It kind of depends on what you mean by "thread-safe". You can make DAQmx Base calls in any thread you want to, but you do want to ensure that certain calls are not made in different threads at the same time. I'm pretty sure you're using C to code, but the same would apply to LabVIEW and parallel calls. Hopefully this helps:
Can you run DAQmx Base code on a dual core machine? Yes - the DAQmx Base calls will be executed sequentially in C and will be fine.
Can you run AI and AO tasks at the same time in the same program? Yes - again the DAQmx Base calls will be sequential, the HW will be generating or acquiring data and using DMA and buffers per task. This also applies to other types of I/O and other devices as long as you keep in mind the next two use cases.
Can I spawn different threads and configure and run different tasks in different threads - No, DAQmx Base is not supported in this use case, there is a chance for race conditions, especially in the creating and clearing of tasks (due to lack of persisted storage pointed out by Tom).
Can I configure sequentially, then perform reads\writes in different threads, then clear tasks sequentially? - This specific case hasn't been fully tested, but it should be ok. I've done plenty of read/writes in parallel after ensuring that the Create tasks and clear tasks were called sequentially (good old error cluster) and haven't run into any issues.
Hope this helps,
Andrew S