Hello guys,
Please exolain me, how to use TCP_UDPPort1 in tight way?
In my case I try to make TCP_UDPPort1.Active:=True in Form1.Create procedure.
This is work fine.
Then, in Form1.Close I deactivete the TCP_UDPPort1.Active:=False;
In this time the apllication may freeze.
Also, if Ethernet connection was disconnected during application running, the application will freeze too.
I use ISOTCPDriver1 for the connection to a machine.
Rest of functions are working fine.
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did the changes.
Application always freeze if it run with no connection.
50/50 when connection disappear when the aplication work.
And sometime freeze when I close the application.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First, send a copy of your pascalscada, a copy of application that reproduces this, Codetyphon version and arch (typhon 32 or typhon64), OS version and OS architecture.
I'll try reproduce this here. If I cannot reproduce, I'll ask to access you computer, only if agree.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for my late again :)
I was really busy to done the project with 20 PID regulators.
They controls temperature and humidity in big sections (pasta production)
So I did Operator's Panel with Pascal SCADA.
Except this small confusion everithing run fine. I had disable automatic reconnection, at least the application is not freeze anymore. But there is necessary to close and start the application again.
Not a big problem, I hope, because there is wired Ethernet connection, so the connection should not to disappear normally.
Now I must say THANKS to Fabio, his product is really good!
PS Later I will back to the question. Probably I have to try to compile the project on another PC.
Hello guys,
Please exolain me, how to use TCP_UDPPort1 in tight way?
In my case I try to make TCP_UDPPort1.Active:=True in Form1.Create procedure.
This is work fine.
Then, in Form1.Close I deactivete the TCP_UDPPort1.Active:=False;
In this time the apllication may freeze.
Also, if Ethernet connection was disconnected during application running, the application will freeze too.
I use ISOTCPDriver1 for the connection to a machine.
Rest of functions are working fine.
Thanks in advance.
Look into the unit tcp_udpport.pas at the line 70. You will see something like this:
freconnectTimer:{$IFDEF FPC}TFPTimer{$ELSE}TTimer{$ENDIF};
change it to:
freconnectTimer:TTimer;
In the same file, go to line 207, you will see something like this:
freconnectTimer:={$IFDEF FPC}TFPTimer{$ELSE}TTimer{$ENDIF}.Create(nil);
change it to:
freconnectTimer:=TTimer.Create(nil);
The problem is the TFPTimer, that uses a thread to do the timer job. Replace these lines and rebuild your application to see if it freezes again.
Last edit: Fabio Luis Girardi 2014-10-29
Sorry, are you using Lazarus?
Last edit: Fabio Luis Girardi 2014-10-29
Code Typhon currently, but the problem the same with Lazarus.
Ok! So the fix is in my second comment. Have you tried it?
Sorry for my late.
As I remember the compiler cannot understand TTimer there.
I will check once again.
add the unit ExtCtrls to the interface uses
I did the changes.
Application always freeze if it run with no connection.
50/50 when connection disappear when the aplication work.
And sometime freeze when I close the application.
Any ideas?
Do you allow me to access your computer through Teamviewer or something else to see what happens?
I have no idea...
First, send a copy of your pascalscada, a copy of application that reproduces this, Codetyphon version and arch (typhon 32 or typhon64), OS version and OS architecture.
I'll try reproduce this here. If I cannot reproduce, I'll ask to access you computer, only if agree.
send it to fabio at pascalscada dot com
I forgot: send together, the processor name and number of cores.
Sorry for my late again :)
I was really busy to done the project with 20 PID regulators.
They controls temperature and humidity in big sections (pasta production)
So I did Operator's Panel with Pascal SCADA.
Except this small confusion everithing run fine. I had disable automatic reconnection, at least the application is not freeze anymore. But there is necessary to close and start the application again.
Not a big problem, I hope, because there is wired Ethernet connection, so the connection should not to disappear normally.
Now I must say THANKS to Fabio, his product is really good!
PS Later I will back to the question. Probably I have to try to compile the project on another PC.
Thanks!!
But how we can debug this? Can you send your application+pascalscada to me? Or maybe can I connect on your development station to see what happens?
What's your suggestion?