05-21-2019 07:43 AM
Hi Bob,
Please see the belowing figrue
Thanks,
Mei
05-21-2019 09:51 AM - edited 05-21-2019 09:51 AM
M.Mei, can you post yours? The error that you're getting could not happen with your previous code.
You're not trying to run your code with the run continuously button, are you?
05-21-2019 11:04 AM
Hi johntrich,
No, I did not run the code continuously. I only change the sample mode and auto start mode.
Thanks,
Mei
05-23-2019 11:35 AM
Hi M.Mei,
I apologize for the delayed response. I had missed your response. You do also need to connect the # of samples to the DAQmx Timing. This should fix the error.
05-24-2019 05:56 AM
Hi johntrich,
Thanks. Yes, it works! But can you please explain a little bit the reason? I searched this error in the forum, and tried to solve it by myself according to other posts, but failed. So, I hope to understand it rather than only solve it. Thanks.
Thanks,
Mei
05-24-2019 06:17 AM
Hi M.Mei,
There were two basic changes to be made. First you had the acquisition set to run continuously but were only reading once. If you want to continuously acquire then the read needs to be in a loop, and the number of samples to be read would be chosen there. Your program would reach the wait until done and would never be done. Since there was no timeout it would get stuck there. However, it never got there because of the other error. On the DAQmx Write you had selected auto-start as TRUE. This starts the task. In the next box you add a start for the task on the first call. Since the task is already started an error is thrown. The choices were either to get rid of the TRUE or to get rid of the explicit start. In this case either one would work. I tend to like to use explicit starts.
05-29-2019 06:18 AM - edited 05-29-2019 06:20 AM
Hi johntrich,
Sorry for the late reply and thanks for your explaination. I can understand the second problem, and for the fisrt one, I got puzzled. Also, I tried to make this program can run continously, so I used two ways: one is pressing the 'run continously' button- working well; the other is putting this program into a while loop- got some problems, 1. the time count does not work;2. x signal missing in the sencond loop. Error-200288 occurs when debugging, but no error comes out when running the code. I wonder are these problems related with the first problem before which I cannot understand?
Thanks,
Mei
05-29-2019 08:28 AM