LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data aquisition

Hi,

A few more questions,

1) When i try to write to the "write to measurement file", the X- value consists of the number of samples i.e 1-99 instead of the time. This happens only in my final program with the offset correction method involved. In other regular programs it gives the time as it is suppossed to do. How to correct this.

2) Is there any way of naming the header in the write to measurement file, coz the file has headers named "untitled-1" "untitled-2" and so on. I wanted them to be my custom channel names.

2) I couldnt incorporate the semaphore into my program. I have two while loops, could u please attach an example program of how to introduce them into the program.

Thank you.

0 Kudos
Message 11 of 20
(1,298 Views)

Just a quick note:

1. Distance from the measurement site. At 50 m you probably would be better off to go with current based signal conditioning. This might help some with your offset issues, too.

2. X axis in " number of samples". I couldn't open your original file in 7.1, so I don't know how you're collecting data when you go to write to file but if you're collecting it as a waveform the time data is there and all you have to do is ask for it in properties on the X axis. If you're collecting it as single floating point numbers in an array and then writing that, you have no option but "number of samples" for the X axis, although if your acquisitions are fairly regular and you know how much time elapses between samples, you could scale the x axis accordingly and take it out of scientific notation and just re-label it. As long as the exact issue of time isn't critical, this is IMHO satisfactory.

3. I tended to put a "tare" button in my LVDT and strain gage programs; a button you could press that would activate a case structure, and in the case structure it would take the current raw voltage reading on the channel and load it into a variable that was constantly subtracted from the reading. This allowed us to choose "zero" and measure the difference in strain from our initial reading, the kind of thing they do on scales to subtract the box weight. (And in LVDTs to subtract the setup movement.)

Hope this helped some 

0 Kudos
Message 12 of 20
(1,291 Views)

1) When i try to write to the "write to measurement file", the X- value consists of the number of samples i.e 1-99 instead of the time. This happens only in my final program with the offset correction method involved. In other regular programs it gives the time as it is suppossed to do. How to correct this.

2) Is there any way of naming the header in the write to measurement file, coz the file has headers named "untitled-1" "untitled-2" and so on. I wanted them to be my custom channel names.


could you attach this vi?? we could take a look and suggest better

 

For semaphores, look at attached vi
0 Kudos
Message 13 of 20
(1,271 Views)

hi devchander,

The VI that u had sent for the offset removal was converting the dynamic data to floating point data, i figured thats the reason why the X-axis of the write to measurement file was giving sample numbers instead of time, now i created this VI which i have attched with this reply which essentially does the same offset removal but all the values are in dynamic data, hope this VI  does not have any errors, please look at it for me. And also this will be the VI which i will be using the semaphores for to synchronize the two while loops.

Thanks.

0 Kudos
Message 14 of 20
(1,248 Views)

Sorry, since I have LabVIEW 8.0 on my system, I could not take a look at your vi (that is in LabVIEW 8.2)

0 Kudos
Message 15 of 20
(1,240 Views)
hi devchander,
I am sorry to bother you again but i have problems with the VI that i had created. Actually if you remember you had sent me a Vi to remove the offset that we were getting, that VI was in terms of low level functions and not the express icons. But i had converted the same principle into the express VIs. I had also sent you the attachment to look at but sine you were using an older version you couldnt open the file, Now i have saved it in a labview 8.0 version so you can open it. I know the program is very unsophisticated. i will try to explain what i am trying to do in this Vi. Actually i am converting the voltage into our different measurements using the mathematical icons. And the reason for two Daq Assistants is that i am just subtracting the offset values from the second Daq. By doing this i am atleast getting initial values as zero at the begining of the program as i had wanted. The reason i am not directly using ur program that u sent is that as soon as i am splitting the data signals into index aray the program is geeting stuck and wont go anywhere, The Ni reps were here too but they were hardly any help as they just advised to use the low level functions instead of the high level, but as i said as soon as i have too many graphs the program gets stuck so for that matter i prefer to use the high level Vis. Anyways the main problem with usuing them is that as i am using N samples the loop is taking too much time and i am missing information as can be seen in the wirte to measurement file, i mean after every " say 1second we miss about 0.10 second info and the loop directly jumps to the next time level. which we dont wnat as we want continuous data. The Ni rep said this is inevitable and only by using the low level functions will we be able to achieve anything. Anyways if you could see the Vi and suggest something better please do so.
0 Kudos
Message 16 of 20
(1,180 Views)

Well, even I would be of the opinion that by using DAQmx functions( lower level), you could get a better performing vi

You have put a 'Wait Until Next ms Multiple' function with value as 100 inisde the loop. You could probably take this out since you are performing a clocked finite acquisition inside the Express vi.

Are you getting the offset correction/removal correctly for DAQ express 4??

You are subtracting the acquired values ( DAQ express 4) form the the initial offset value ( DAQ assistant 3)  ( it should be vise-versa)

Also, try to keep the two acquisitions in 2 seperate loops

Hope this helps

Regards

Dev

 

 

 

 

Message Edited by devchander on 03-12-2007 07:19 AM

0 Kudos
Message 17 of 20
(1,175 Views)

HI dev ,

Thanks for ur input, I am trying to work on a VI with lower level functions, but since we have like 16 chanels the program gets stuck as soon as i try to use an index array to split all the signals into separate 16 channels with independant graphs for each channel. I dont understand the reason for that, and also i dont wnat to use the "write to measurement" express Vi but some lower level function. Any suggestions for writing the file in Excel format.

I will be emailing you the new Vi soon.

Thanks.

0 Kudos
Message 18 of 20
(1,170 Views)

You could use 'write to spreadsheet file' function to begin with

Later you could shift to open/create file, write/read fiel, close file functions.

But I strongly recommend that you go throught the example vi's shipped with LabVIEW, Find examples>> Fundamentals>> File input and output folder and familiarize on methods to write to a file/ read from a file

also read this and this links

0 Kudos
Message 19 of 20
(1,166 Views)
hi devchander,
I have made another VI with low level functions, it consists of 8 channels. Its working alright but the fact remains that i havent converted the voltages to my required measurements like acceleration or position etc. Anyways it would be great if you look at the program and suggested something better. The main problem i have with this kind of a program is, the output file when i write it is in terms of the number of samples. I mean the X-axis consists of the number of samples instead of time, It is very imp that i get time on the X axis, Can you fix the problem? Another thing is i cant seem to get the write to measurement file inside the loop. The loop is getting stuck, Can we get the write to measurement file inside the loop. And please make the the other write to file work.
Thanks as always.
P.S OK i just found out that this Vi that i created has some information that is not supported by the old version, it consists of an initialisation vi as a sub vi which is not supported so i had to delete it, but dont worry about it. the initialisation VI is the VI which is created by breaking the DAQmx assistant into its code. If you could just see this Vi and suggest better maybe it will help.
0 Kudos
Message 20 of 20
(1,137 Views)