12-11-2019 05:25 AM
Hi everybody,
I am really confused. I have a very basic subVI (attached below) that reads an Analog Input.
When run by itself the subVI executes properly but it produces a warning (200010) at Stop Task.
Then, when incorporated in the main program this subVI produces an error at Start Task (-50103 ).
What am I doing wrong? Any advice would be greatly appreciated.
Thank you in advance and have a great day, everyone!
Broni
12-11-2019 05:40 AM - edited 12-11-2019 06:03 AM
The warning comes from the fact that you are requesting 1000 samples (this is the default value for the Samples per channel input of DAQmx Timing (Sample Clock).vi) but reading only one. Wire 1 to that input (or read 1000 samples).
About the error, well, we would need to check your main program. It seems however that this task conflicts with other tasks configured in other parts of the main. Maybe the onboard clock is used elsewhere?
12-11-2019 08:12 AM
Thank you for your prompt reply, Paolo.
However:
1. when I wire "1" to "samples per channel" I get error -200077 in Start Task.vi.
2. If 1000 is wired to the number of samples to be read, it produces a warning 200010 in the Stop Task.vi. And this is all when running the simple subVi by itself. 😞
Broni
12-11-2019 08:44 AM
Broni, I'm sorry my answer not useful. I have not the right hardware to try myself now.
Actually I did not expect the error setting 1 sample, although this is not a typical value (if you want sample at a given rate, it's reasonable that you would like a series of data, not a single value: for this, you may simply read without timing).
However, to read 1000 samples at 1 Hz, you need to wait for 1000 s... So, I guess you should let -1 as number of samples and provide a sensible timeout: 10 s is not enough.