11-20-2008 02:22 PM
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
11-21-2008 12:27 PM
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?
11-21-2008 12:48 PM
Hi Jason,
Thanks. It seems to be running ok at the moment.
11-21-2008 01:05 PM
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
11-24-2008 09:57 AM
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.)
11-24-2008 10:58 AM
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.
11-24-2008 08:20 PM
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?.
11-25-2008 11:35 AM
Mbdeck,
Here is what I changed for 1 and 2 files. I opened both in a text file and you could see the difference.
12-09-2008 04:27 PM
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
12-09-2008 04:49 PM - edited 12-09-2008 04:49 PM
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.