01-21-2016 05:55 PM
I have a main VI which, after initial setup, calls a VI that reads and writes multiple times to a DAQ (USB 6356). This sub VI is called multiple times for each of the program steps. On the first pass through, there is no problem. On subsequent calls to the sub VI, however, it throws error -50103. I have identified the task that this error addresses. I have made sure to do an auto-cleanup on the task, create the task outside of any loops, and stop and clear the task after all iterations are done. In order to test whether it is solely subsequent calls that cause the error, I created a simple VI that just ran the sub VI twice in a row, and there were no errors.
Any ideas on what is causing my issue or why it only occurs on subsequent calls in my more complex VI?
Attached is an image of the frame and task that is giving me the issue.
Thanks!
Solved! Go to Solution.
01-21-2016 06:22 PM
Please include a Snippet of your code, or attach your VIs, so that we can better assist you. We are here to help, but won't spend all day recreating your code from scratch. The screenshot doesn't include all of the code because there's another sequence frame after the one shown, right?
At which VI does the error get thrown? Is the screenshot from the subVI or the main VI?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-21-2016 07:38 PM
01-21-2016 08:30 PM
@nrpratt wrote:
Any ideas on what is causing my issue or why it only occurs on subsequent calls in my more complex VI?
Attached is an image of the frame and task that is giving me the issue.
Thanks!
Yes, You did an Auto-Cleanup That is good. You really need to get rid of the Stacked Sequence Structure (As has been mentioned)
Then we might be able to disecect the code and find whith sequence local contentents are failing to contain what you want them to contain. Its probabably simple but, we need code rather than pictures.
OK?
01-28-2016 11:08 AM
Here are snippets from the main VI (Main Transient) and the subVI where the error is occurring (Take Transient). I replaced all stacked sequences with flat sequences in the subVI and most of them have been replaced in the main VI. In the main VI, the call to the subVI has been highlighted in yellow, and in the subVI, the task that is throwing the error has been highlighted.
I apoligize for the messy coding. I cleaned it up as much as possible, but this was recently converted from LabVIEW 6 and still is using some old coding styles.
01-28-2016 11:13 AM
I replied to my own post with snippets of both the main and subVI. The subVI is the one throwing the error and it has been highlighted in the snippet.
Thanks
01-28-2016 11:22 AM - edited 01-28-2016 11:23 AM
Holy wall of code, Batman. You need to make some more subVIs in there man.
I think I found your issue with this specific task. You clear it where that error occurs, but then you open up a task for those analog channels again right afterwards without closing the task the 2nd time. The task wire cuts out where I found this Analog Input VI:
If you clear the task after that, your problem should be fixed. This is definitely a bandaid solution, though, when you should really visit the ER.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-28-2016 11:56 AM
I had actually been playing around with that bit before. I just tried it again with a stop and clear task outside the loop for that task. Also, prior to creating the virtual channels for that task, I added a create task with auto-cleanup enabled. I am still, unfortunately, getting the same error as before, on the "prescan" task, which is a seperate task from the one being manipulated.
01-28-2016 01:45 PM
I finally found the issue, though it was not with the task that LabVIEW had identified. The problem task was within a separate subVI that was called from the main VI and the subVI that was throwing the error. I got this task stopped and cleared and it doesn't look like it's having the issue anymore.
Thanks to everyone who contributed.