LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding channels to daqmx after Express conversion

Solved!
Go to solution

Hello everyone,

            I am trying to update a VI I created a couple of years ago.  It was one of my first.  I used the DAQ Express VI.  I received complaints about the computer hanging up every once in a while and thought it might be attributable to the Express.  So I used the LabView function to convert to individual DAQmx tasks.  Everything appears to work okay for the channels that were installed originally.  Now we need to add channels to the readout.  Shot one is of the top level DAQmx icons in the main VI.  The second shot is of the channel setup subVI that the computer created.  In the AI Voltage box you can see the channel I am trying to add, Channel 9.  Am I missing something obvious?  Thanks for the help.

TestRigDaqmx-2.JPG

TestRigDaqmx-1.JPG

0 Kudos
Message 1 of 12
(4,305 Views)

Hi Willy,

 

don't you think we would be able to give help when we could actually see something in your pictures?

 

Please attach non-scaled pics (or just the VI!) instead...

 

So just guessing:

You edited only one of those array constants. As the FOR loop still autoindexes through all the arrays it will stop before reaching your added channel name...

 

Hint:

You don't need to use SplitSignal when you already get an array of waveforms from your DAQmxRead. Use IndexArray instead!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(4,300 Views)

Hey Gerd

     You lost me on the discussion with the For Loop.  I will start going throught the VI to see if I can figure out what you were talking about.  Until then, here is the VI.  I don't know why I didn't post it to start with but here it is now.

0 Kudos
Message 3 of 12
(4,293 Views)

Okay, lets try this one more time.  Here is the VI.

0 Kudos
Message 4 of 12
(4,292 Views)

Hi Willy,

 

set the index display of all array constants before the FOR loop to "9". You will note some of the arrays show grayed elements. Those arrays have less elements then others. As the FOR loop uses autoindexing it will only iterate over the shortest array!

 

To solve your problem set the missing elements of all arrays.

 

When you don't know what is meant by "autoindexing" you should definitely go through LabVIEW basics course offered by NI on their website...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 12
(4,288 Views)

I have updated all the arrays that are entering the AI Voltage For Loop.  I have confirmed correct location of wiring, several times.  And I have used NI Measure and Auto to confirm that the CompactDAQ is receiving the proper signal, at least twice.  Still nothing when running this VI.  Is there any setting is the DAQ setup VI that I might have missed?  I am about to the point of erasing all DAQmx icons and start over with an Express VI again.  At least then it worked!  I have even attached the latest and greatest version just in case I accidently clicked somewhere I wasn't supposed too.

0 Kudos
Message 6 of 12
(4,262 Views)

Hi Willy,

 

"TestRig2-0.vi" is missing and so we cannot check any initialization stuff of your DAQ task...

 

Why do you use a shared variable "task out" when you could use a simple wire instead?

 

"Still nothing when running this VI."

I don't believe it's doing nothing at all... Either you will get atleast some values from DAQmxRead or it will output an error!

Do you get error messages in the error cluster? If so, which errors do pop up?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(4,251 Views)

Sorry for the delayed response.  When I run this VI under highlight execution, I receive the -200279 error, but it doesn't appear when I run it without the execution.  When I run NI MAX, select channel 17 under Diff Input, I can see the signal I am entering through a Function Generator.  When I run this, I indicate noise.  I have attempted to attach both VI's under this connection.  Let's see if I can figure at least this part out.  Unfortunately, throwing this computer against the wall or into a spinning propeller isn't really an option so let us try to figure this out!  Thank you.

 

Tim

Download All
0 Kudos
Message 8 of 12
(4,235 Views)

That error code is due the DAQ buffer filling up before you can read the data.  This is fairly common when using highlight execution with a DAQ.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 12
(4,232 Views)

Yeah, I'm not too worried about that.  It is kind of a pain in the butt when your trying to troubleshoot something, but it appears to work.  I am just trying to figure out why my one channel that I added refuses to showup.  I usually consider myself a pretty decent computer nerd, but this problem is making me feel like its amatuer hour in between my ears.

0 Kudos
Message 10 of 12
(4,225 Views)