10-12-2011 09:55 AM - edited 10-12-2011 09:56 AM
Hi, I'm developing an aplication to measure vibrations, I'm using the NI 9234 module and the NI WLS-9163 adapter connected via ethernet.
All the data from my accelerometer is sent to a database, the problem is that no matter how many times I change my rate and samples values it always comes the 200279 error.
My maximun time of adquisition was 16 minutes with a 200 Hz and 10,000 samples values.
The minimum time was 23 seconds with a 800 Hz and 100 samples values.
I required 6 hours of adquisition, so what do you think is happening?
Do I need to flush the buffer every "x" time? If so, can you help me with an explanation or an example?
Thanks and greetings!!
NOTE: This wasn´t happening until I add the database part http://forums.ni.com/t5/LabVIEW/dynamic-data-to-database/td-p/1724608
Solved! Go to Solution.
10-13-2011 08:32 AM
I searched for information and it's also possible that my computer is the one with the problem, but I don't know how to be sure of that, here are my computer specifications:
hp dv4-1414
Processor: AMD Athlon X2 QL-65
OS: Windos 7 Ultimate Edition
Hard drive: 250 gb
Memory: DDR2 3 gb
10-13-2011 06:14 PM
Hi Rolando
I was looking your problem and I think you have a problem wtih some arrays in the while loop with th foor loop. Tha maximum numer of elements that you can introduce to an array es 2,147,483,647 elements. So thas maybe the reason of your error. You can verify this placing a Probe to check the number of elemnts. To do it go to the View>> Tools Palette, there tou can select the tool Probe and place it before de for loop. Then you run your VI. If this is the case you maybe want to implement a circular bufer.
There's also some parts from the code that you don't use and others that you just need to do one time.
I hope this can help you
Julio Mena
10-14-2011 08:36 AM
Thanks Julio
I used the probe tool until it gave me the same error, then i check the size of the array and it was the same as the number of samples
So what you think is happening??
10-14-2011 06:00 PM
Hi Rolando
Well it seems that the arrays were not the problem. I'm thinking that may be is a race condition between your while loops, because of the local variables that you want to read before you write or you write before you read the elements, have you consider programing this application with less while loops, I saw that you can do it with just two while loops. One for read form the NI 9234 and do all the programatic secuencially inside one while loop. And the other one use it for writing to the database. In the while loop of database, I recommend you to put outside in the left side of it the database open VI and in the right outside the tool free object VI, database close VI and the general error message VI. This is because everytime the loop iterate it open and close conection with the database, and that consume a few time, also you don't need to open and close the connection everytime. I'm continue thinking what could be the problem.
Greetings
Julio Mena
10-17-2011 11:29 AM
Thanks for the replying Julio, I made the modifications and left only two while loops.
Since my read code its in only while loop I decided to simulate a signal to see if the error still preveals, I left it for about an hour and never gave the error and all the data save correctly in my data base, so I connected the NI 9234, but no, the error appear in about two minutes.
I attached the new VI, and thank you again for all the help
10-18-2011 03:17 PM
Hi Rolando
I was looking at your VI express DAQ assistant and the simulate signal VI's and I notice a difference in your DAQ assitant your samples to read are 1000 samples, while in the simulate signals is 100 samples. Check that out, may be the problem lies in the number of samples that you are acquiring, try to take less samples, or you really need to have that numer of samples.
Greetings
Julio Mena
10-19-2011 12:13 PM
Thanks for the reply Julio but yesterday in the afternoon I solved the problem.
I replaced the DAQ assistant with DAQmx code and add the input buffer VI, I left my VI running all night and no error appear and all the data saved correctly in my database 🙂
I really appreciate all the time you took in my problem, greetings and thanks again!!