LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't reestablish TCP communication to cFP

So here is my problem.  I have a PC running XP communicating with a cFP using TCP.  I setup the cFP to listen on port 5150, and I connect to it using a PC.  Everything works great, except when I try to close the connection, and reopen it.  I send a command to the cFP to close the connection.  Then I close the PC side of the connection, then I try to reopen the connection using the  same port, but I can never reestablish a connection.  The code in the cFP is in a loop, so it should loop right around, and start listening again, but it doesn't.  The only way I can talk to the cFP again, is if I reboot it, or press the reset button. 

Am I missing something obvious here?

Thanks,
Benjamin
0 Kudos
Message 1 of 7
(3,273 Views)

Benjamin,


Nothing jumps out immediately. Is there any chance you can post some of the code that is running on your cFP controller? If there are other things that your code is doing, you may try to cut that out, so it’s just the TCP communication part that still exhibits this behavior. Also, just for completeness, which cFP controller are you using?

-GDE

0 Kudos
Message 2 of 7
(3,264 Views)
I have the same problem. I am using code from the examples. Did you find a solution?
Alberto
0 Kudos
Message 3 of 7
(3,069 Views)

Hi Alberto,

which examples do you use? Did you make changes?

Mike



Message Edited by MikeS81 on 07-02-2008 12:50 PM
0 Kudos
Message 4 of 7
(3,063 Views)
I am using FTP Communiction.lvproj.

What I am trying to do is to build an application that reconnects automatically whenever the FTP communication is lost.

At first I used it without doing any changes but it didn't work.



0 Kudos
Message 5 of 7
(3,060 Views)

Hi Mike,

Here is what I am trying to build:

I have a RT application that stores temperature values and timestamps in a cFP-2120 acting as a TCP server. This data needs to be sent to a client vi that it's in my computer. This works fine except when the communication is lost. I am using wireless communication in an environment with different sources of interferences. Once the communication is lost the only way to reestablish communication is by rebooting the cFP and doing so I lose all the stored data in my shift register.

Have you come across the same problem?

Do you have any ideas to overcome it?

Kind regards,

Alberto

0 Kudos
Message 6 of 7
(3,048 Views)
Hi Alberto,

You said you were using FTP Communication.lvproj.  Is that correct, or did you mean TCP Communication.lvproj?  I was unable to find any FTP Communication.lvproj in the Example Finder.  I tried the TCP Communication.lvproj on my computer and it worked correctly.  You will need to add your target to the project instead of using the generic "RT Target (0.0.0.0)."  Then drag the VIs and libraries from the generic target to your target.  You will also need to make sure the machine alias matches the name of your RT target.
Eric C.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(3,015 Views)