LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

 

Hi Jason,

 

I've attached my code so you can assess whether it is ok for use in acquiring data from two voltage sources.  Please check the DAQ assistant settings. I scaled the input of the temperature sensor by multiplying it by 100. On the "index array" function, I assiginged an index of 0 to voltage input channel 0 and an index of 1 to voltage input channel 1.  Please let me know if the coding is correct.

 

Thanks

 

 

0 Kudos
Message 21 of 41
(1,698 Views)

Mbdeck,

 

It looks good to me!  I am not sure the exact specs of your temperature sensor  so as long as you are scaling that correctly you should be recieveing good readings.  Are you expierencing any problems with this code?

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

Hi Jason,

 

Thanks. It seems to be running ok at the moment.

0 Kudos
Message 23 of 41
(1,677 Views)
Hi Jason,

 

One more question.  Am I supposed to write both the temperature and voltage measurement data to only one LVM file?. I tried using two "lvm express" VIs for each data and got an error message.  How can I write both to one LVM file?. 

 

Thanks

0 Kudos
Message 24 of 41
(1,671 Views)

Mbdeck,

 

Did you want to write them to one file or two?  I have attached a VI that writes to 2 assuming that this is what you wanted to do?  What error did you get?

 

(In order to get example to work you will have to change the tasks back in DAQ Assistant.)

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

 Jason,

 

I'll rather write the data to one file but I was wondering wether they'd be distinguishable if both the temperature and voltage were both written to one file?. 

 

I'm away from my computer. I'll look at the file you attached when I get back. 

0 Kudos
Message 26 of 41
(1,644 Views)

Hi Jason,

 

I couldn't open the file. I have Labview 8.20 and you have a latter version. Can you modify it so I can open it?.

0 Kudos
Message 27 of 41
(1,627 Views)

Mbdeck,

 

Here is what I changed for 1 and 2 files.  I opened both in a text file and you could see the difference.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
Download All
0 Kudos
Message 28 of 41
(1,605 Views)

Hi Jason,

I'm looking at a "voltage output" code and I having a difficult time making sense of it. Can you or someone else explain it to me. It is a voltage ouput code the uses the value of the select function to terminate the loop iteration. See attachment. Here is the description that preceeded the block diagram:

 

 In this exercise, the objective is to output an analog voltage using a DAQ device. Complete the following steps to finish a VI that outputs voltage from 0 to 9.5 V in 0.5 V steps.

 

My understanding is that the select function returns the boolean value wired to it but in the block diagram the code should return false for all iterations. I don't understand how it returns a zero value.

 

My interpretation of the code for example the first iteration is as follows 20 - 1 = 19; 19 x 0.5 = 9.5 is not equal to 19 and therefore false. The false value of 9.5 is then chosen by the select funtion. If my interpretation is correct, I don't see how this logic will work for the last iteration. I'll really appreciate some input here.

 

Thanks

0 Kudos
Message 29 of 41
(1,527 Views)

No.

 

You are comparing 19 ( n-1) to the loop iteration terminal which is 0, 1, 2, ...., 18, 19 for n=20 iterations.  If the comparison is false, the select function returns i x 0.5.  If it is true which happens on i=19 (the 20th iteration), then it returns 0.

Message Edited by Ravens Fan on 12-09-2008 05:49 PM
0 Kudos
Message 30 of 41
(1,525 Views)