Jump to content

2 Analog Inputs with RIO and 9205


MeltingPlastic

Recommended Posts

Hello there,

I'm new to labview and am using the Copact RIO 9012 as well as the 9205 analog input. Attached is the code i'm currently using.

I'm trying to take 2 analog inputs from AI0 and AI1 and send them over DMA to my host PC. Once on the host pc, i want to display it on a waveform chart as well as write the data to an excel file when i flip the boolean switch. As of now i have gotten the system working perfectly with just 1 channel.. AI0. WHen i attempt to add the 2nd channel things don't work out that well. I've followed the turtorial shown here:

http://zone.ni.com/devzone/cda/tut/p/id/4534

I have my inputs hooked up to a 7.6V battery and a 20k pot to vary the inputs to confirm my input channels are working. If i hook up only 1 channel it displays that signal as one channel. When i hook up both channels thats when things get weird and don't act the way they should. What am i don' wrong here? I'm using labview 8.0 and plan on upgrading to 8.2 tonight if that will help me but i highly doubt that.

Attached is my labview code i am using for the FPGA and the host as well as the output graph i was telling you about.

I have only been programming with labview for about 2 weeks and am completely new so there might be something simple i'm overlooking but i'm currently stumped.

Thanks guys..

Mike

Link to comment

QUOTE(MeltingPlastic @ Nov 29 2007, 03:18 PM)

I have my inputs hooked up to a 7.6V battery and a 20k pot to vary the inputs to confirm my input channels are working. If i hook up only 1 channel it displays that signal as one channel. When i hook up both channels thats when things get weird and don't act the way they should. What am i don' wrong here? I'm using labview 8.0 and plan on upgrading to 8.2 tonight if that will help me but i highly doubt that.

This is just a guess, but try right-clicking on your graph and uncheck "Transpose Array." See if that fixes your problem.

Link to comment

QUOTE(ned @ Nov 29 2007, 05:08 PM)

This is just a guess, but try right-clicking on your graph and uncheck "Transpose Array." See if that fixes your problem.

Thanks ned,

What i've realized the graph is doing is outputing the difference between the two signals instead of displaying two different plots for some reason. I can't seem to get the graph to not do that. any help would be great

Link to comment

Hi

My recommendation would be to look in the NI example folder. There are a few examples on doing Basic IO there with a cRIO.

You need to look under Toolkits and Modules=>FPGA=>CompanctRIO=>Basic IO=>Analog Input - cRIO.lvproj

On my computer it is here

C:\Program Files\National Instruments\LabVIEW 8.2\examples\CompactRIO\Basic IO\Analog Input\Analog Input - cRIO.lvproj

Replace the LabVIEW 8.2 with your version. This is the best way to learn. This example also contains code to allow for converting the binary value to voltage. Binary 0 does not equal 0 volts.

Dean

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.