01-13-2006 02:53 PM
01-16-2006 03:15 PM
Hi Dave,
First you need to create an analog input task by selecting only one channel from your device. (Create New Daqmx Task >> Analog Input >> Voltage >> Channel >>Name). Once you get to the task configuration window under "Task Timing" specify "1 sample (on Demand)" mode. Under the "Task Triggering" tab specify Trigger type as "digital edge"; and trigger source will be the PFI pin that you have physically connected you digital line to.
After this, you can add more channels to this task by selecting the "+ Add Channel" tab on the very top of the config window. This can be channels from the same daq card or other ones that you might have ..... depending on how are you acquiring the data.
I hope this helps.
01-17-2006 08:06 AM
01-17-2006 09:24 AM
Hi Dave,
I apologize, that was error on my part. You need to select 1 sample (HW timed) instead, because your acquisitions will be based on the external trigger. The error you got was because “on demand” mode is software timed acquisition and we were trying to combine it with hardware timer/trigger.
Also, what daq card are you using?
01-17-2006 09:29 AM
01-17-2006 11:11 AM
Hi Dave,
I think there is a problem either with your configuration files in MAX or the driver. Try renaming the MAX Data folder located at C:\Program Files\National Instruments\MAX. Also, you can try exporting your MAX configuration to preserve what you already have and then start fresh by creating new task. This will create a new MAX configuration and new Data folder when you create a brand new task.
I have searched for the -2147220733 error but I can't find any documentation on it even internally. Do you have another machine where you can try to create/test the task? Does the error appear in MAX or in LabView when you try to run your application? Do you have problem setting up tasks with any other cards in the computer? Does the error occur only when you have one channel in the task or all 31?
Selecting "1 sample HW timed" should definitely work.
01-17-2006 01:36 PM
Natasa -
Deleting the old Data directory did the trick. I now have the task implemented. What blocks do I need to wire this with to make it function properly?
Thanks,
Dave
01-17-2006 02:02 PM
Hi Dave,
I'm glad that your error was fixed. For proper implementation of your task you can reference shipping examples that are included under Help >> Find examples in your LabView installation. In the Example Finder select Hardware Input and Output >> DAQmx >> Analog Measuremen >> Voltage. The example that will work best for you is Acq&Graph Voltage - External Clk. However, you'll need to modify this by removing the DAQmx Create Channel vi and DAQmx Timing vi (since you have already set this up in your task) and simply just wire a task constant with you task name to the DAQmx Start task.
Feel free to look at other examples if you'd like to expand your code.