01-30-2009 01:23 AM
Hi
I have an application where I want to use some sort of hardware timing
to call a function in C# to calculate feedback gains and send a signal
back to the DAQ to control an actuator. The board I bought for this
application was the USB-6211 but subsequently realised that that I
can't use a "SampleComplete" or "SampleClock" event because of it's USB
interface. I found a 6024E card that we had and managed to get
"SampleComplete" event to work, however I am struggling to read data in
the "SampleCompleteEvent" function at any frequency above 1 hz. I
suspect that I may be doing something incorrect in the way I read the
data. Some of the code (for a 6024E card) I have written follows, as
this may explain what I am trying to do a bit better:
{
// Setup the channel:
AI0_Task.AIChannels.
02-02-2009 10:56 AM
Regards,
Dan King
02-03-2009 01:52 AM
Hi Dan
Thank you for your prompt reply. I suspected that, that may have been they case and in the meantime got the program working using another method without using a "SampleComplete" event, at about 500 hz. I was looking to use the hardware timer at around 250 hz, but my computer usually struggled at anything above 1 hz, but sometimes got up to about 25 hz.
I don't seem to have any control examples on my DAQmx installation disks (although all the other example files have been loaded). Would it be possible to post the example you mention onto this thread or alternatively email it to me at: ansutherland[at]gmail[dot]com or asutherland[at]csir[dot]co[dot]za?
Thank you for your help.
Regards
Alan
02-04-2009 10:24 AM
Regards,
Dan King
02-07-2009 10:31 AM
Thanks Dan, the example you posted helped a lot. I am using version 8.6 of DAQmx . The examples that were loaded with my installation are:
- Analog In
- Analog Out
- Counter
- Digital
- Switches
- Synchronization
Regards
Alan
02-07-2009 02:16 PM
Regards,
Dan King