I could use some assistance tracking down the source of this error in Labview. I'm trying to sample some thermocouples using the DAQmx Read VIs inside of a loop, and every few iterations, I get an error 50103 out of the VI and no data is returned. Is there something wrong with the timing or sequence of the read requests?
I've attached a copy of the code I am working from. It is code I inherited from a previous employee, written in Labview 4. I am trying to bring it up to speed in version 8.2.1 using the new DAQmx drivers. As I have not worked with Labview since version 4 either, any advice would be appreciated.
Thanks for the link. This is a new installation of Labview and I haven't touched the Traditional NI-DAQ drivers, so nothing shows up in MAX where the article specified. Could it be some of the older versions of the VIs that were carried over from the original application are trying to call the Traditional NI-DAQ drivers? Is there any way to scan for VIs that might be incompatible with NI-DAQmx and find a suitable replacement?
The fact that it does not happen every time infers that timing is part of it. Is the error occuring inside the TC-K vi? Does this error occur if Highlight Execution is on? If you increase the time between iterations of the loop, does the problem go away?
One thing I'm noticing is that you are using the Stop Task vi. If you aren't using the Create Task and Start Task, I don't think you need to use Stop Task. Consider putting the Create Channel and clear task vis outside the loop. No need to spend a bunch of CPU cycles doing the same thing over and over again. You should consider bringing error cluster out of sub vi's to make troubleshooting a bit easier.
I had suspected timing would be the issue. Do I need to setup the Read VIs in a sequence to keep them from stepping on each other's toes? The error does occur within the TC-K VI as well as the TC-S vi with about the same frequency. The error shows up when Highlight Execution is on. I've tried increasing the loop timing to 10000ms, 60000ms, and 100000ms, and they all produce the same errors.
I'm still new at creating and configuring tasks in Labview. I did my best to learn from the examples provided. Would creating one task for all analog inputs needed be the best way to go about it? Also, how would I bring the error cluster out of a sub-VI?
After placing the create and clear task VIs outside of the loop, the error goes away in the main VI, but the sub-VIs still produce errors. How would I go about bringing the create and clear task VIs outside of the sub-VIs? Thanks for your help and advice so far.
A rewrite is definitely in the works, but Management wants to see it up and running first ASAP. How do I make the task in and task out controls into terminals on the sub-VI that you can connect to on the main VI's block diagram?
With a little digging I found the connections and terminals editor. This should be enough to get me up and running. Once again, thanks for your help. If I run into any other issues, I'll be sure to post them.