04-09-2010 11:58 AM
Solved! Go to Solution.
04-09-2010 12:37 PM
Not sure exactly what you are asking.
Here is what I would do from step 0:
Step 0: create a NI-DAQmx task in MAX (Measurement & Automation). Configure it for CONTINUOUS sampling, and set the Samples to Read to be about 1/10th of the Sample Rate. For example, it the Sample Rate is 25K (Hz), then configure the Samples to Read to be 2500.
Save and run the task to test it. Stop the task. Close MAX.
Step 1: Open DASYLab and create the NI-DAQmx Analog Input. Configure it to read the task that you created.
Step 2: Create a Digital Meter module. Connect the output of the Analog Input to the input of the Meter.
That's it.
If you are adding more logic, you can configure the Digital Meter to "copy inputs" and connect your logic to the Digital Meter, or you can BRANCH the wire between the Analog Input and the Meter to connect to other modules.
Logically, it's the same. The output of the Meter is simpy the same data that goes into the input of the meter. It is not processed or changed in any way by the meter.
I set it up as a simulated device, and this is what a worksheet could look like.
04-09-2010 06:09 PM
Thanks CJ. I understand my problem is trying to associate the principle of current measurement too closely with how DASYLab does it. I was trying to have the current measurement be a series connection/measurement in DASYLab, but now I'm separating the two approaches since they're not identical.
I made the task as you described in MAX. Now my problem is performing your Step 1: Open DASYLab and create the NI-DAQmx Analog Input. Configure it to read the task that you created. I searched in the DASYLab help for terms from this step, but I'm coming up empty. Is there a keyword I can search on that will explain how and what I'm trying to do?
Regards,
Bill
04-09-2010 06:10 PM
I also forgot to ask, how do I find the task created in MAX? Do I need to import something first, or does DASYLab know where to start looking?
Bill
04-12-2010 08:21 AM
When you installed your hardware from NI, you should have installed the Measurement and Automation World, MAX, program.
This program manages your devices, allows you to test them, and, with DASYLab installed, allows you to configure measurement tasks that DASYLab can use.
If you haven't installed it, you need to do that before you can use your device with DASYLab.
Open MAX... there should be a shortcut on your desktop. If not, check the Start menu for National Instruments Measurement & Automation.
Verify that your hardware is installed by opening the Devices and Interfaces section. You should be able to select your hardware and test it here.
From here, you can right click over your device and select "Create Task" or, you can right click over the Data Neighborhood section and select "Create New" and then select "NI-DAQmx Task".
It will prompt you for the type of task (Acquire or Generate), Analog, Digital or Counter, and for Analog, the type of sensor. You're reading current, so select Current here. You can select one or more channels for the task. Name your task - you'll need this in DASYLab.
In the Task properties page, you can define your range, the units, custom scaling, the shunt resistor, and, you can add or remove channels.
From DASYLab's point of view, we care about the Timing Settings at the bottom of the Properties page. The default is N Samples, Samples to Read is 25K and Sample Rate is 25K.
This is where I want you to change "N Samples" to "Continuous" and the Samples to Read to 2500. You can leave the Sample Rate at 25. If you want to read slower, then reduce the Samples to Read and the Sample Rate by the same divisor. For example, if you read at 10K, set the Samples to Read to 1000. DASYLab works well with a 10:1 ratio for Sample Rate/Samples to Read.
Save the Task.
Run the task to test it.
Make any changes that you need, Save again, and close MAX.
Now, open DASYLab.
Go to the Input/Output Group in the module browser, and select NI-DAQmx. There will be six modules listed there... choose Analog Input and place it on the workarea. If you don't know how to do that, please review the Getting Started with DASYLab section of the Help, the Tutorial in the help, or the printed handbook that came with the software.
Right click to open the Properties page for the new NI-DAQmx Analog Input module, and ensure that the new task is selected. If your task has more than one channel, then click on the <+> button to add channels to the module.
Click OK to save the changes, and go back to module browser to select a Display-->Digital Meter. Open its properties to add channels, if necessary. Connect the output(s) of the Analog Input to the input(s) of the Digital Meter. Restore the Digital Meter display window from the bottom left of the screen.
Click the Start button (upper left), and you should see data.
If this doesn't help... we do have a class coming up next week in Norton, MA!
04-12-2010 08:22 AM
04-12-2010 10:46 AM