KWaris Posted August 7, 2012 Report Share Posted August 7, 2012 Hello everybody. I developed the code, took me three months and turned out its very good. Does the job and customer very pleased as long as I am the first one to come up and turn the computer on. This is because I know a little secret to make my executable work. And that secret is to shut down the labview application, turn it back on, keep doing it until the computer establishes the communication based on UDP protocol with the instruments. This project is based on cRIO 9012 controller and 9112 FPGA chassis. Computer IP address: 192.168.0.180 Instrument A IP: 192.168.0.175 Instrument B IP: 192.168.0.165 Instrument A: Port labview uses on windows to write to this instrument is 4243 Instrument B: Port labview uses on windows to write to this instrument is 4243 Both Instruments are similar and listen using only 4242. This is a single block diagram architecture based on many loops and hosted on windows target.( I do sometime thinks that if I had 9014 controller, I could have implemented the whole software on Real time controller but thats beyond the scope of this problem.) I increased/varied the timeouts, made the while loops which deals with UDP communication during initialization iterate until communication is establish but to no avail. The conclusion is the following statement ' Sometimes when the labview application runs, a communication port on windows operating system may locks up. The only way to release the port is by shutting down the application completely and restarting it again'. I just dont want the end customer to start this mission critical application knowing that the instruments may not communicate on initialization and they may have to close the application few times before it starts kicking. Please help. These are famous error 56 and error 66 and I did everything for instance varying timeout values, waiting longer before quitting while loops but nothing worked. It could help if I just can programmatically determine if at a time windows port e.g 4243 is locked up?. If so, It will help further, if I could unlock the port? I am just talking vaguely and have very limited knowledge on network communication especially when windows home operating system is involved. I am just slightly worried that the customer waited so long and the whole software application works a treat except that there may be some occasional communication problems on initialization. Any comments will be very appreciated Kind Regards Austin Quote Link to comment
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.