LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Un-compiled runs well, compiled code fails

Solved!
Go to solution

"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.

0 Kudos
Message 11 of 17
(1,243 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 12 of 17
(1,229 Views)

@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. sample.PNG



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 13 of 17
(1,215 Views)

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.

0 Kudos
Message 14 of 17
(1,190 Views)

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.

0 Kudos
Message 15 of 17
(1,183 Views)
Solution
Accepted by topic author mnadams

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.

sample.PNG

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



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 16 of 17
(1,163 Views)

Thanks very much for the latest input Coq Rouge ! It works as planned.

0 Kudos
Message 17 of 17
(1,136 Views)