03-02-2011 04:39 PM
"I notice your LabVIew Serial 3.vi has no wire through if Read is false, which'll clear any error, but more importantly Drops the Visa resource! That might well be a reason."
"You seriously need to look at your Open and Close visa's, they're happening all over the place and you start off in #1 by writing to the com port without opening it."
A version of this routine has been running successfully for several years, It will be difficult to get signoff on major changes to structure unless that structure is really causing the problems. I have added small bits to the original to add a a few moves, and to move upward past zero.
Please tell me about all the "closing" of visas. I found only two total and and took out one, but I'm not aware of what "closes" you are referring to. The note above about no wire through if Read is False dropping the Visa Resource doesn't appear to agree wiith the usage directions. They would seem to indicate that if errors occur it reports them but keeps going, etc. I don't understand it dropping the resource.
And the statement about writing to the com port without opening it, I believe this is possible because of the naming protocol opening it. That part works reliably, evidenced by the fact that the end definetely closes the port after outputting a signal m to run in manual mode. Setting up baud rate and all and naming it I believe opens the port.
BTW, Thanks everyone. I'm learning as fast as I can and appreciate the input.
03-03-2011 01:55 AM
LabVIew Serial 3.vi might not get False very often thus reducing the problem, but that makes it trickier to find. (i cant open the code right now) I think you had Use Default if unwired which'll cause the Visa resource to switch to Com1(?) in case of error, possibly changing com port.
Assuming you're right about the port auto opening, you still opens it a 2nd time every time you call the other sub-vi which happens alot in the inner sequence (which to a large degree can be swapped for a simpler loop).
/Y
03-03-2011 05:45 AM - edited 03-03-2011 05:47 AM
@mnadams wrote:
"I notice your LabVIew Serial 3.vi has no wire through if Read is false, which'll clear any error, but more importantly Drops the Visa resource! That might well be a reason."
"You seriously need to look at your Open and Close visa's, they're happening all over the place and you start off in #1 by writing to the com port without opening it."
A version of this routine has been running successfully for several years, It will be difficult to get signoff on major changes to structure unless that structure is really causing the problems. I have added small bits to the original to add a a few moves, and to move upward past zero.
Please tell me about all the "closing" of visas. I found only two total and and took out one, but I'm not aware of what "closes" you are referring to. The note above about no wire through if Read is False dropping the Visa Resource doesn't appear to agree wiith the usage directions. They would seem to indicate that if errors occur it reports them but keeps going, etc. I don't understand it dropping the resource.
And the statement about writing to the com port without opening it, I believe this is possible because of the naming protocol opening it. That part works reliably, evidenced by the fact that the end definitely closes the port after outputting a signal m to run in manual mode. Setting up baud rate and all and naming it I believe opens the port.
BTW, Thanks everyone. I'm learning as fast as I can and appreciate the input.
The fact that this program works is due to more pure luck than good Labview skills. The wiring is messy to put it mildly. And not to mention the opening and closing of the serial port. That part of the programming was very dodgy.
I think I fixed most of serial/open close nonsense. But I have not tuched anything else. If you do run this program on a computer without Labview installed you must do as I have showed in picture.
03-03-2011 05:28 PM
Thanks very much for the input. This is my introduction to LabView, editing someone else's program. I do have to say the original version has run reliably for years.
I've built the .exe as directed from your edited code but have the same failure as before. The device stalls when the first call of Jar Swap happens (following the dip sub. up.vi) but runs properly when called immediately after the dip sub. down.vi. An error appears that says Null Window: "(main).vi stopped at node 0x0 of Jar Swap.vi" but actually continues past it, outputting the dialog requesting user to lower the disc etc. Program continues properly from that point and exits/quits properly.
I have not yet been able to test whether it will run un-built.
03-03-2011 06:43 PM
Just tested the supplied code three ways on new laptop; 1) Built, but not installed, running the .exe file,2) Installed per recomendations 3) Un-built from folder with all sub vis on machine with LabView installed.
None will now pass the first call of Jar Swap.vi correctly. All will go past that step without doing the required move.
03-04-2011 07:12 AM
If you see Brandon Shuman. Smack his fingers and tell him from me that he is a very slipshod Labview programmer. Could you trouble be that in fram two. You do not enter a carriage return constant after each comand. This may cause the write in frame 3 to fail.
The programming in LabVIEW Serial 3.vi is also dodgy, and sloppy. I have made some changes it is better. But still somewhat sway. What kind of instrument do you use? Do you have any manual in PDF format
03-04-2011 06:52 PM
Thanks very much for the latest input Coq Rouge ! It works as planned.