LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring sound signals from a microphone using USB-6009 DAQ hardware

Yes, the encoder is an external device.

 

I think the 6009 does not have a counter output pin.  You can only read the value of the counter in software.  It is not useful for generating timed pulses.  Many of the more expensive DAQ devices have counters with Source, Gate and Output pins available.

 

Lynn 

0 Kudos
Message 11 of 41
(2,140 Views)

Hi Johnsold and others,

 

I'm writing a code for a file write VI and for some reason I'm having trouble wiring the file path indicator to the open/create/replace VI. It's really wierd and frustrating. Could somebody please help me out here. I've attached the code.

 

Thanks

0 Kudos
Message 12 of 41
(2,118 Views)

You need a control, not an indicator.  The "file path (use dialog)" input to the Open/Create/Replace File function must be given a value.  An indicator only displays the value connected to it.  If you hover over the broken wire with the wiring too, a tip will pop up telling you the you do not have a data source connected.

 

Lynn 

0 Kudos
Message 13 of 41
(2,097 Views)

Mbdeck,

 

I would recommend that you either leave it unconnected which will use the default value which will pop up a dialog box allowing you to select the file, or right click on the file path terminal and create a control.  This should show up as green (the file path type) and will allow you type in or select a file from the front panel.  Finally if you always want the same file you might want to create constant.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 14 of 41
(2,085 Views)

Hello everyone,

 

Thanks for the replies and suggestions they've been very helpful. I have two other questions:

 

1) I'm having a hard time designating a file path for the file writer VI below. It doesn't recognize my file path entries on the front panel.  I keep getting an error message each time I run the VI. I will appreciate some help in this regard.

 

2) I'm trying to build a VI that would simultaneously acquire data from a solar cell and a temperature sensor. My question is how to build a VI so that both the solar cell and tempeture data acquisition can be called from one VI. Is this possible?. I don't want to build separate VIs for each. I have a usb-6009 DAQ device. I'll appreciate any suggestions you may have. 

 

Thanks

 

0 Kudos
Message 15 of 41
(2,069 Views)

1) Change the settings under Browse Options... on the file path control to "New or Existing."  It was set to Existing on the VI you posted.  With that setting, it would work only if the file already existed.

 

When you have an error, please post the error code and associated text.  It makes it much easier to try to determine the cause. 

 

2) Just put two (or more) channels in the AI task.   Look at the DAQ help files for details.

 

Lynn 

0 Kudos
Message 16 of 41
(2,060 Views)

Johnsold,

 

Again thanks for responding.  My second question is more about the coding on the block diagram. So after adding two channels in the AI task, all I have to do is put for example my thermometer sub VI in the "For loop" of the "analog input VI" after configuring both channels in one DAQ assistant?.

 

I will appreciate your comments and suggestions on my approach.

 

Thanks

 

 

0 Kudos
Message 17 of 41
(2,046 Views)

Mbdeck,

 

If you put multiple chanels in the AI task you will then get an array of data out in which you will index the array out so that the data pieces will go to their respective code segments.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 18 of 41
(2,033 Views)

Jason,

 

Apart from the index array you suggested. Is my approach to writing the code correct?. Do I need to do index array for both the thermometer sub VI and the voltage input VI?.

0 Kudos
Message 19 of 41
(2,030 Views)

Mbdeck,

 

I believe your approach is correct post a new copy of your VI again if the current suggestions do not work for you and I will check to make sure you have the right idea.

 

Yes you will need to index both so as to acquire the correct 1D piece for each of your measurements from the 2D array.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 20 of 41
(2,002 Views)