02-26-2016 09:52 AM
I'm new to using the USB-6281 DAQ thus, I'm attempting to run through the provided example code to become more familar witht the product. I'm having trouble generating a voltage. I've looked through the forums but did not see an answer to my qeustion.
I'm attempting to generate an analog voltage on A0_0. To do this I'm using the NI provided example:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.0\Analog Out\Generate Voltage\GenVoltageUpdate
Running this example I first set the input parameters as seen in the image below.
I have a volt meter connected to A0_0 and A0_GND. My problem is I never see the voltage rise. It reamins at zero on the meter. What am I missing if I want to drive 5 volts to A0_0? Am I using the wrong example?
Thanks for the help,
Jeff
Solved! Go to Solution.
02-29-2016 09:24 AM
Hi Jeff,
I just ran that same example on my end with no issues, so I would suggest confirming that your USB-6281 is working correctly before trying to proceed with the code. One way to check this would be to open NI MAX (Measurement & Automation Explorer) and then select your USB device from under "My System->Devices and Interfaces." You should see an option labeled "Test Panels..." near the top of the screen in NI MAX after selecting your device. If you choose that option, the Test Panels window will open and there will be a tab for Analog Output. I would suggest using this test panel to generate an analog voltage the same as you were doing by the example and see if you can get a voltage output from the device that way.
If you cannot get a voltage output from the device even from test panels, could you try choosing the "Self-Test" option in NI MAX? Is there an error or warning associated with the device in NI MAX? You could have a driver issue or another problem related to the device itself. I would also double check that your USB-6281 is plugged in (both to USB and power) and is receiving power.
02-29-2016 11:31 AM
Thanks Charlie.
I attempted to drive a voltage to P0_0 via the Test Panel as you described but still no voltage is showing with the volt meter. I also performed a Self-Test as you described. However, no error messages came up.
I went ahead and also attempted generating a voltage on P0_1 but no voltage as well.
The NI USB-6281 device is connected to the computer and powered. The green Ready light is ON and when a command is sent to the NI device the amber Active LED illuminates. I've also been successful at reading/writing from digital ports, P0.0 through P0.7. Thus, the device does appear to be working in some capacity.
Any other ideas?
Appreciate the help,
Jeff
02-29-2016 02:17 PM
Hi Jeff,
What are you referring to by P0_0? There should be an ao0 and ao1 option within Test Panels, and those should correspond to a pin as shown in the manual. If it does seem like the voltage is not changing at all, I would confirm in the manual that you are measuring across ao0 and Analog Ground. When you write to change the analog output, does the same "Active" LED illuminate the way it does when you successfully read and write to Digital Ports?
http://www.ni.com/pdf/manuals/375218b.pdf
Since this does seem to be an issue with the device, I would also suggest posting on the DAQ forums as well. You will get more responses there regarding the device behavior in particular.
02-29-2016 02:23 PM
Sorry for the confustion. I am using the analog voltage port A0_0 (pin 15 and pin 16 gnd) and not P0_0.
When I do write to the anlog port A0_0 the "Active" LED does illuminate.
I'll look into posting into another DAQ forums as well.
Thanks,
Jeff
02-29-2016 03:06 PM
Hi Jeff,
No problem!
I have a few more things you can try as well.
1. Try resetting your NI MAX Configuration. If you have any configuration data which you would need to back up (such as tasks, device names, or channels) then I recommend backing the configuration up as explained in the first link below. The second explains how to reset your configuration.
http://digital.ni.com/public.nsf/allkb/0E0D3D7C4AA8903886256B29000C9D5A
http://digital.ni.com/public.nsf/allkb/2C7480E856987FFF862573AE005AB0D9
2. Try the device on a different PC and see if the behavior is consistent.
3. Try resetting the USB-6281 from within NI MAX. This should be an option in the same area as the Test Panels and Self-Test options. I would also recommend fully disconnecting and removing power from the device, then plugging it back in again.
By the way, what version of the NI-DAQmx Device Driver are you using?
03-01-2016 11:28 AM
Thanks Charlie, for the new ideas.
Before trying your new ideas I did a software reset of the DAQ then powered down both the DAQ and PC. After powering back up guess what? It's working! I'm not sure what was going on, but I'm seeing the correct voltage appear on my volt meter now.
I never expected I would have to reset the hardware. I was sure I was doing something wrong. A bit of a mystery.
Thanks again for the help!
Jeff