06-26-2008 06:29 PM
06-30-2008 07:53 AM
Hello,
I am interested to know what DAQ device your have connected to the BNC-2090 DAQ Accessory and to see a screenshot of the error message. When the application is running on the MAC Pro is it an executable (.exe)? Are you opening or creating any files in the application? When running the application on the MAC Power PC are there any differences in the setup?
Here is another forum thread post where error 42 was an issue.
Please summarize the DAQmxBase code or provide a screenshot of the block diagram. If error 42 is coming from the DAQmxBaseStartTask.vi, are you looping this vi? Does the same error occur when using one of the examples that download with the driver for AI? For example, Cont Acq&Graph Voltage-Int Clk-Analog Start.vi examples will run continuous and use analog triggering.
07-01-2008 07:25 PM
07-02-2008 10:37 AM - edited 07-02-2008 10:37 AM
Hi Maurice-
There are several possible causes for error 42 in DAQmx Base, but based on your description it sounds like you're running into a memory allocation error. In DAQmx Base, we internally allocate acquisition buffers for AI operations. There is a requirement imposed by DAQmx Base that the buffer be composed of a single contiguous block of memory due to the architecture of the DMA engine that we use to interface with the hardware.
This allocation occurs within DAQmx Base Start Task. So, if you repeatedly allocate and release it is possible that memory may become fragmented to some point that does not allow for further contiguous allocation operations. It seems an extreme case that 40kB of contiguous memory is not available (for your 20kSample buffer), but it is possible. The fact that it eventually begins working again seems to indicate that other processes might be releasing memory "chunks" that then become available to DAQmx Base. There is no way to avoid this limitation in DAQmx Base.
Is there a reason why you need to Start and Stop repeatedly in a loop? In the past, to overcome this long-term limitation of DAQmx Base, I have suggested using a continuous analog input operation and using post-processing on the data to determine when analog trigger conditions are met. This would require you to supply the analog signal of interest to another of the AI channels and then add that channel to your scanlist.
How many iterations are you able to run before the failure occurs? How much RAM is available in your PowerPC machine? Is there significantly more available in the Intel machine? FYI- the fact that one machine is using E Series and another using M Series should not make a difference in this case.
07-02-2008 05:16 PM
07-07-2008 08:51 AM
Hi Maurice-
If you set up the task for "continuous" sampling then you will indeed just need to call DAQmxBaseRead multiple times. The driver will perform double-buffering and you need to choose loop rates and an appropriate number of samples to read per DAQmxBaseRead (since it will block execution until the requested number of samples are available) to avoid data loss. However, if any data is overwritten or lost DAQmxBaseRead will report that error condition appropriately and will halt the acquisition.
Let me know if you have other questions. Thanks-