DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting Digital Meter as Ammeter

Solved!
Go to solution
I'm new to DASYLab and I'm trying to connect a Digital Meter module to display the current measured by a NI 9227 Current DAQ. Do I copy the inputs to the outputs for the meter and then treat the meter as being in the current path? Also, do I connect the Current DAQ in the path as I would expect it to be electrically with one output?
0 Kudos
Message 1 of 7
(8,072 Views)
Solution
Accepted by topic author Williamx

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. 

ScreenShot014.jpg

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 7
(8,070 Views)

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

0 Kudos
Message 3 of 7
(8,062 Views)

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

0 Kudos
Message 4 of 7
(8,061 Views)

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!

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 5 of 7
(8,035 Views)
If you don't have a DASYLab Input/Output NI-DAQmx group, you have to reinstall (modify) the software to select it from the driver list. It should have installed automatically if you had MAX installed before DASYLab.
Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 6 of 7
(8,033 Views)
C.J. thanks so much for the detailed explanation! That took care of it and gave me a better understanding to boot.
0 Kudos
Message 7 of 7
(8,029 Views)