03-11-2014 06:45 PM
@Stephny wrote:
I edited my previous post. Because of the sample rate you need a minimum buffer size. So the minimum time for getting the samples is 10 seconds
That doesn't tell you that you need to collect 10 seconds worth of data. I would go back to the 1 seconds worth like you originally wrote. It tells you how large of a buffer it will make by default for different sample rates. It just so happens that it is by default setting the buffer to be about 10 seconds. You don't need to fill up the buffer (nor do you want to) before reading samples out.
03-11-2014 06:59 PM
I didn't know that. I saw that article about the buffer size and I thought I had to take that into account. But now with the 1 second logging I have the -200279 error with the NI9237's and the NI9219 modules
Thank you
03-11-2014 07:10 PM
It's possible that the writing to the file is taking longer than a second and the buffer is filling up that way. If you disable the Write to File and try running the VI, does it still give you errors?
If it works with 10 seconds worth of data, then go back to that. (Sometimes writing larger chunks of data less frequently to a file can be more efficient, then more frequent smaller chunks.)
Another way to solve the problem is to move the Write to File to a separate loop and pass it the data using the producer/consumer architecture.
03-13-2014 11:29 AM - edited 03-13-2014 11:39 AM
Without the write to file function it won't give me errors. I used the producer/consumer architexture for solving this problem now. Can someone check if it's correct what I've done?
The only problem I now have is that I get an error just after triggering the case structure. I guess it has something to do with the buffer that is partially filled and has to be emptied before starting the case structure again?
Thank you
PS:
I realised I'cant have 10 second where I cannot trigger or stop the signal so 1 sec is a must
03-13-2014 03:25 PM
I now have also errors during the measurements. I have no idea what's going on...
03-17-2014 03:24 AM
Hello Stephny,
Which errors did you get?
Please include the error codes.
03-17-2014 03:54 AM
Here is the error. I had this just after I triggered the signal
03-18-2014 03:41 AM - edited 03-18-2014 03:42 AM
Hello Stephny
Thank you for this error code!
I saw something that I didn't expect in your code.
Are you using 2 different cDAQs I see both the mentioning of cDAQ1 and cDAQ2?
This was something that I wasn't aware about.
Can you send me a MAX Report so that I have a better overview of which hardware you are using in which way?
You can create it the following way:
http://digital.ni.com/public.nsf/allkb/271F252B4EF0A2E0862570E70056A1E4?OpenDocument
This way I can create a simulated system that resembles your set-up and test it appropriately with your code.