03-21-2006 07:55 AM
03-23-2006 04:34 AM
Hi Bill
Here are a bunch of ANSI C DAQmx examples that are shipped with NI DAQ
C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C
Here is a link for some more examples
DAQmx - Write Digital Channel with Digital Start Trig - LabVIEW - CVI - VB.NET - ANSI C - C#
http://venus.ni.com/stage/utf8/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=F0F6166C04697184E0340003BA7CCD71&p_node=201181&p_rank=&p_source=Internal&p_submitted=N
This is more specific for your board this is a Microsoft Visual C++ project but the code should still work
Digital Read and Write Using Two Digital Ports
http://venus.ni.com/stage/utf8/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=F1AFBB03CCE70E5CE0340003BA7CCD71&p_node=201196&p_rank=&p_source=Internal&p_submitted=N
A bit of information about the error -50400 occurred at DAQmx Start Task.vi.
By default, on-board regeneration is enabled on M-Series DAQ devices. This means that a continuous output task will repeatedly output the data in its buffer. If this data is updated with a write, the output will eventually change, but there is no guarantee on when this change will occur. Setting the DAQmx Write RegenMode property to "Do Not Allow Regeneration" specifies that data should be output only once and that new data should be written to the buffer before the output pointer reaches that location in the buffer a second time. This is useful for continuous digital pattern output.
The one caveat to this process is that the output buffer must be at least as large as the physical memory on the card. For M-Series devices, the DIO FIFO size is 2046 samples. If the buffer size is smaller than this, error 50400 is generated at DAQmx Start task, with description, "The transfer did not complete within the timeout period or within the specified number of retries."
Hope this helps
Tim
03-23-2006 07:05 AM
03-23-2006 08:14 AM
Cool glad you are sorted thanks for the code.
Tim
AE NI