News:

  • October 14, 2025, 12:07:27 PM

Login with username, password and session length

Author Topic: TCP and networked printer  (Read 20364 times)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: TCP and networked printer
« Reply #15 on: June 08, 2013, 04:12:18 PM »
Yes, .Connected gets dropped when the connection is closed, however, TCP timeouts can be lengthy...on the order of minutes in some cases. There's no telling what the server is doing once things go south. He could have code there designed to deal with denial of service or he could be contemplating his naval in some kind of a timeout. Generally if things are done in the way he expects...connect, do work, disconnect...everyone will be happier.

I assume you have all of your logic properly monitoring the instruction completion/error results and are not moving from operation to operation until each part completes normally, yes? That's the primary reason I push stage. Do it the way we designed it and it is hard to screw up. Code in straight ladder and keep re-coding till it works. I have seen it happen *many* times with various students of Do-more...
« Last Edit: June 08, 2013, 04:16:49 PM by BobO »
"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: TCP and networked printer
« Reply #16 on: June 08, 2013, 07:03:57 PM »
Yeah, not stage per se, but the equivalent, looking for the success bit from the previous STREAMOUT.

I like looking at boats too.... :D
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: TCP and networked printer
« Reply #17 on: June 08, 2013, 07:23:33 PM »
Oh goodness...spelling Nazis on an engineering centric site? No credit for you...it's no challenge! Put that in your naval...um...navel...er...belly button and ponder it!
"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: TCP and networked printer
« Reply #18 on: June 08, 2013, 09:28:30 PM »
Oh goodness...spelling Nazis on an engineering centric site? No credit for you...it's no challenge! Put that in your naval...um...navel...er...belly button and ponder it!

;D  I guess my worst case frequency wise would be like every 3-5 seconds for a couple minutes, then a break of 30-60 seconds and repeat.  So you're saying at that pace it's OK to close after each session?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: TCP and networked printer
« Reply #19 on: June 08, 2013, 10:39:09 PM »
Oh goodness...spelling Nazis on an engineering centric site? No credit for you...it's no challenge! Put that in your naval...um...navel...er...belly button and ponder it!

;D  I guess my worst case frequency wise would be like every 3-5 seconds for a couple minutes, then a break of 30-60 seconds and repeat.  So you're saying at that pace it's OK to close after each session?

If you are referring to your navel, there is no restriction. ;D If you are talking about your printer, that's plenty ok too. It can get silly when you use a single client device to hit half a dozen servers flat out...think Modbus mastering, round robin, no delay. That's why I warned 'nut. Truthfully I shoulda said nothing... :P
"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: TCP and networked printer
« Reply #20 on: June 08, 2013, 10:53:31 PM »
Cool, thanks!  Yeah, if I want to poll multiple devices, I'll set up a device per, and open and close according to the same guidelines.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: TCP and networked printer
« Reply #21 on: June 08, 2013, 11:07:30 PM »
Cool, thanks!  Yeah, if I want to poll multiple devices, I'll set up a device per, and open and close according to the same guidelines.
And a stage program code-block per.   ;D

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: TCP and networked printer
« Reply #22 on: June 09, 2013, 08:57:32 PM »
Why, of course!   :)
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: TCP and networked printer
« Reply #23 on: July 27, 2016, 10:44:46 AM »
plcnut,
Will you consider posting your code for this?
Thanks

plcnut

  • Hero Member
  • *****
  • Posts: 813
    • premiersi.com
Re: TCP and networked printer
« Reply #24 on: July 27, 2016, 08:25:43 PM »
plcnut,
Will you consider posting your code for this?
Thanks

For a Zebra printer specifically?
Or are you wanting to talk to something else?
Circumstances don't determine who we are, they only reveal it.

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

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: TCP and networked printer
« Reply #25 on: July 28, 2016, 06:54:15 AM »
I need to print data that has been collected by a DoMore. I know nothing about what a printer needs. Are all printers different?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: TCP and networked printer
« Reply #26 on: July 28, 2016, 09:49:45 AM »
If you just need to print logged data and there is a PC on the network, you could use DMLogger to log to a data file on the PC, then print from the PC.
"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: 813
    • premiersi.com
Re: TCP and networked printer
« Reply #27 on: July 28, 2016, 10:12:52 AM »
I need to print data that has been collected by a DoMore. I know nothing about what a printer needs. Are all printers different?

The print message/commands will be different for each printer, but the communications method will all be the same. I will see if I can put a generic program block together for you.
« Last Edit: July 28, 2016, 10:26:28 AM by plcnut »
Circumstances don't determine who we are, they only reveal it.

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

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: TCP and networked printer
« Reply #28 on: July 28, 2016, 11:14:31 AM »
Quote
If you just need to print logged data and there is a PC on the network, you could use DMLogger to log to a data file on the PC, then print from the PC.
That is what I did. They need it printed in a very specific format. So I had them open it in excel and then had a macro that would format and print. They are telling me that that is too complicated.
Quote
The print message/commands will be different for each printer, but the communications method will all be the same. I will see if I can put a generic program block together for you.
Thanks

plcnut

  • Hero Member
  • *****
  • Posts: 813
    • premiersi.com
Re: TCP and networked printer
« Reply #29 on: July 28, 2016, 02:09:44 PM »
What is the printer?
Circumstances don't determine who we are, they only reveal it.

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