LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP connection does not work as EXE

Solved!
Go to solution

The problem is in the RT exe.

 

This example used is as simple as you can get.

0 Kudos
Message 11 of 23
(2,159 Views)

Again, are you certain that you are properly deploying the RT executable?  What are the steps you are taking?  Once you've built the executable, it must be set as startup and deployed.  Have you confirmed that the RT executable is running?  Have you tried remote debugging?  You can enable debugging in the build specification, then connect to the compiled application remotely and use the standard debugging tools to see whether it's running and generating an error.

0 Kudos
Message 12 of 23
(2,158 Views)

Well, short story is that its now working.

 

Long story:

 

I used the RT Terminal COM 4 to make sure that the program was always running, and it was

I took out code to make the problem easier to handle.

Replaced a control (for the Port to Listen to) to the TCP Listen vi

Removed all other inputs to the same vi

Got better

The final solution was to NOT have the Err In wired. The property node (Value) Err Out was causing my problem.Probably because the Err In for the Property Node was unwired.

 

Thanks to all for your support.

 

 

0 Kudos
Message 13 of 23
(2,131 Views)

@CarmineS wrote:

The final solution was to NOT have the Err In wired. The property node (Value) Err Out was causing my problem.Probably because the Err In for the Property Node was unwired.


The problem is not that the error input to the property node was unwired - that will not generate an error.  The problem is the property node is generating an error when used in a compiled executable on an RT target, because most property nodes require access to the front panel and an RT executable doesn't have a front panel (with the possible exception of the case where a remote front panel is connected).  Note that the property node will not work under RT, so if you're relying on that, your code will not function as expected.  Consider using a local variable instead.

Message 14 of 23
(2,126 Views)

@nathand wrote:

@CarmineS wrote:

The final solution was to NOT have the Err In wired. The property node (Value) Err Out was causing my problem.Probably because the Err In for the Property Node was unwired.


The problem is not that the error input to the property node was unwired - that will not generate an error.  The problem is the property node is generating an error when used in a compiled executable on an RT target, because most property nodes require access to the front panel and an RT executable doesn't have a front panel (with the possible exception of the case where a remote front panel is connected).  Note that the property node will not work under RT, so if you're relying on that, your code will not function as expected.  Consider using a local variable instead.


I feel you wrote this in an earlier reply? Oh wait, you did. This is kind of like when I say to someone "nice to meet you I'm Greg" but then stop listening as soon as I introduce myself and I don't hear their name.

0 Kudos
Message 15 of 23
(2,116 Views)

@for(imstuck) wrote:

I feel you wrote this in an earlier reply? Oh wait, you did. This is kind of like when I say to someone "nice to meet you I'm Greg" but then stop listening as soon as I introduce myself and I don't hear their name.


Look, it took me a long time to get to 2000 posts.  How am I going to get to 5000 if I don't repeat myself occasionally? 😉

 

This does seem like a good opportunity to plug one of my ideas on the Idea Exchange: Warn about front-panel property node use when building RT application

Message 16 of 23
(2,110 Views)

All,

 

I went back this morning and added the Prop Node Err Out back to the TCP Listen Err In and the TCP connection was refused.

 

Took out the Err link and it worked again.

 

The prop value was the value to an indicator that I want to clear at the start of the program (for debugging). It was attached to the TCP Listen, only to keep it from going anywhere it wanted when I do a sweep of the diagram.

 

Thanks to all and I learned a little bit more.

 

0 Kudos
Message 17 of 23
(2,097 Views)

Pls change the RT application as TCP listen and GUI(Host) as TCP Open.

 

U didn't give the code. but i attached the basic module.

 

try it

Message 18 of 23
(2,094 Views)

Will this method reestablish communication if the Host stop then restarts? (With the RT always running)

 

Thanks

0 Kudos
Message 19 of 23
(2,086 Views)

nathand wrote:

Look, it took me a long time to get to 2000 posts.  How am I going to get to 5000 if I don't repeat myself occasionally? 😉

 

This does seem like a good opportunity to plug one of my ideas on the Idea Exchange: Warn about front-panel property node use when building RT application


HAHA! I wasn't knocking you though with that comment. It's all too often on these forums I see soemone ask a question then not try the suggestions in the responses!

 

And your idea has another kudo now! I thought I had kudo'd it before, but I guess not!

Message 20 of 23
(2,077 Views)