News:

  • September 24, 2026, 03:27:47 AM

Login with username, password and session length

Author Topic: TCP Device won't Close  (Read 13145 times)

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
TCP Device won't Close
« on: June 06, 2019, 12:00:41 PM »
I went to make a sample application for a colleague so that he could make a simple TCP connection to a BRX and pass in a setting.
I decided to use the DMD Simulator so that I could test.

I barely got started on the project when i ran into trouble with closing my TCP device.

I cannot get the device to close without putting the Simulator into Stop mode.
I have been away from PLC's for a while, and so maybe I am just missing something.
Please see my attached project.
Thanks!
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: TCP Device won't Close
« Reply #1 on: June 06, 2019, 12:51:38 PM »
May be a bug. Appears to be hung on the server side (TCPLISTEN) only. We did a little bit of work to handle some errors better, and might have broke it in 2.5.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: TCP Device won't Close
« Reply #2 on: June 06, 2019, 12:56:50 PM »
So you are turning off X0 to disable your TCPLISTEN, then indirectly Closing the device in your ServerPgm based on .Connected (i.e. the remote client is still connected)???

Have you tried CLOSE based off X0 going OFF?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: TCP Device won't Close
« Reply #3 on: June 06, 2019, 01:00:38 PM »
So you are turning off X0 to disable your TCPLISTEN, then indirectly Closing the device in your ServerPgm based on .Connected (i.e. the remote client is still connected)???

Have you tried CLOSE based off X0 going OFF?

He may not be doing it right, but I can easily dupe the inability to CLOSE from the server side.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: TCP Device won't Close
« Reply #4 on: June 06, 2019, 01:09:51 PM »
So you are turning off X0 to disable your TCPLISTEN, then indirectly Closing the device in your ServerPgm based on .Connected (i.e. the remote client is still connected)???

Have you tried CLOSE based off X0 going OFF?

I leave X0 on all the time.
The Close instruction seems to have no effect on the connection.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: TCP Device won't Close
« Reply #5 on: June 06, 2019, 01:46:14 PM »
It's goobered. Got broke during some re-factor work in support of HTTPCMD. Easy fix. Should not affect 2.4 and prior. Fix will be in 2.6.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: TCP Device won't Close
« Reply #6 on: June 06, 2019, 03:08:59 PM »
Thanks guys!
I installed 2.2.1 and go the project done.
I was doubting myself for a while this morning  :o
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: TCP Device won't Close
« Reply #7 on: June 06, 2019, 03:20:22 PM »
Thanks guys!
I installed 2.2.1 and go the project done.
I was doubting myself for a while this morning  :o

Sorry. It was a testing hole, and we are in the process of filling it. As the engine has gotten bigger and we have gotten further from initial development, we increasingly depend on our automated test suite to make sure we don't break stuff. Which works great as long as the suite is complete, but there are most certainly holes.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: TCP Device won't Close
« Reply #8 on: June 07, 2019, 07:31:39 AM »
Good morning!
Is there an approximate time frame for the next release?
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: TCP Device won't Close
« Reply #9 on: June 07, 2019, 08:32:39 AM »
Good morning!
Is there an approximate time frame for the next release?

Later this month. Coincides with the release of a new batch of analog modules.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO