From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant Channels

There is even a discussion about how to make snippets work with the image viewer floated to this board.   Maybe Lili can update the thread to sum up the advice.

 

Oh Lili (waves hand) could you update the post attachments... thread please?


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 17
(647 Views)

Thank you all, I got the snippet working.. 

 

Jeff, I tried your snippet and the result is attached below and I have 3 questions:

 

1) Why is the data so noisy (fuzzy) in this graph as opposed to the line being really fine and accurate when I make a simple graph using DAQ express in another VI?

 

2) Similar to the picture you posted, the channels all have the same data just offset; for example, when I shift the voltage up they all shift up by the same amount. As of now, I have hooked up an analog input to the ai0 channel only so why am I getting results for all these other channels? Shouldn't the VI recognize there are no inputs and thus display nothing?

 

3) I am creating an Excel spreadsheet that has a header like shown:

 

Time       ai0           ai1           ai2          ai3

 

How do I create local variables to each element in the listbox so that I can write boolean logic code so that if the channel is checked, the VI will write data for that channel and if it's not checked, then nothing is written?

0 Kudos
Message 12 of 17
(638 Views)

@laps682 wrote:

3) I am creating an Excel spreadsheet that has a header like shown:

 

Time       ai0           ai1           ai2          ai3

 

How do I create local variables to each element in the listbox so that I can write boolean logic code so that if the channel is checked, the VI will write data for that channel and if it's not checked, then nothing is written?


  1. Are you really writing a Native Excel Spreadsheet (.xlsx), or a Delimited Spreadsheet File (.csv)?
  2. Do you really want to write 5 Headers, but 2-5 columns (depending on the setting of the Channel Selectors)?
  3. Do you expect the Channel Selectors to change (or be allowed to change) during an Experiment?  Could the output file have Chans 1, 2, 3 for some runs, Chans 3, 4 for others?

These questions are, of course, inter-related.  The issue of "skipping" a column requires a little thought ...

 

Bob Schor

 

0 Kudos
Message 13 of 17
(633 Views)

@laps682 wrote:

Thank you all, I got the snippet working.. 

 

Jeff, I tried your snippet and the result is attached below and I have 3 questions:

 

1) Why is the data so noisy (fuzzy) in this graph as opposed to the line being really fine and accurate when I make a simple graph using DAQ express in another VI?

 

2) Similar to the picture you posted, the channels all have the same data just offset; for example, when I shift the voltage up they all shift up by the same amount. As of now, I have hooked up an analog input to the ai0 channel only so why am I getting results for all these other channels? Shouldn't the VI recognize there are no inputs and thus 

 

 

How do I create local variables to each element in the listbox so that I can write boolean logic code so that if the channel is checked, the VI will write data for that channel and if it's not checked, then nothing is written?


1 noise vs DAQ Express vi:  attach snippet of your vi.  The timing is most likely very different or you are getting ghosting from the floating inputs.  What is the device model?

 

2.  All channels HAVE an input!!! Tie the unused AI to ground through a resistor.  Value depends on input characteristics .  We can't say for sure without knowing what the device is.  

 

Unnumbered.  You don't want a local variable.  You want a property node to the chart terminal.  Write active plot, read plot.name & plot.visible in a for loop for each plot.

 

Posting via phone so....no snippet this time.  Maybe Bob can show the property node example.

 

Thanks guys


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 17
(630 Views)

@Bob_Schor wrote:

@laps682 wrote:

3) I am creating an Excel spreadsheet that has a header like shown:

 

Time       ai0           ai1           ai2          ai3

 

How do I create local variables to each element in the listbox so that I can write boolean logic code so that if the channel is checked, the VI will write data for that channel and if it's not checked, then nothing is written?


  1. Are you really writing a Native Excel Spreadsheet (.xlsx), or a Delimited Spreadsheet File (.csv)?
  2. Do you really want to write 5 Headers, but 2-5 columns (depending on the setting of the Channel Selectors)?
  3. Do you expect the Channel Selectors to change (or be allowed to change) during an Experiment?  Could the output file have Chans 1, 2, 3 for some runs, Chans 3, 4 for others?

These questions are, of course, inter-related.  The issue of "skipping" a column requires a little thought ...

 

Bob Schor

 


Bob,

 

1) Delimited Spreadsheet (.csv)

2) The skipping column sounds like a good feature to add to my program but if it's too complicated I would just like to stick to having a static 5 columns as I am not that experienced with LV.

3) No, I would like to have it so that once you select which channels you want to read, they remain that way (which of course means the "skipping column" is better option).

0 Kudos
Message 15 of 17
(625 Views)

@JÞB wrote:

@laps682 wrote:

Thank you all, I got the snippet working.. 

 

Jeff, I tried your snippet and the result is attached below and I have 3 questions:

 

1) Why is the data so noisy (fuzzy) in this graph as opposed to the line being really fine and accurate when I make a simple graph using DAQ express in another VI?

 

2) Similar to the picture you posted, the channels all have the same data just offset; for example, when I shift the voltage up they all shift up by the same amount. As of now, I have hooked up an analog input to the ai0 channel only so why am I getting results for all these other channels? Shouldn't the VI recognize there are no inputs and thus 

 

 

How do I create local variables to each element in the listbox so that I can write boolean logic code so that if the channel is checked, the VI will write data for that channel and if it's not checked, then nothing is written?


1 noise vs DAQ Express vi:  attach snippet of your vi.  The timing is most likely very different or you are getting ghosting from the floating inputs.  What is the device model?

 

2.  All channels HAVE an input!!! Tie the unused AI to ground through a resistor.  Value depends on input characteristics .  We can't say for sure without knowing what the device is.  

 

Unnumbered.  You don't want a local variable.  You want a property node to the chart terminal.  Write active plot, read plot.name & plot.visible in a for loop for each plot.

 

Posting via phone so....no snippet this time.  Maybe Bob can show the property node example.

 

Thanks guys


 

 

Hello the following is a link to the device I am using:

 

http://www.ni.com/pdf/manuals/374369a.pdf

 

I attached an image of the VI I had that produces much clearer lines along with the DAQ express settings...

 

The VI that produced the relatively noisy result is the same VI from y our most current posted snippet. 

 

I think I see what you are saying about the channels always having input; I believe I hooked up a common ground for all the terminals for all the channels already yet I still don't understand why they are all offset from each other..

 

0 Kudos
Message 16 of 17
(623 Views)

I'm sorry, I don't think the noiseness is much of a problem as I first thought... I turned off the autoscale and fixed it to 0-10 Volts and the lines became much clearer.

0 Kudos
Message 17 of 17
(622 Views)