News:

  • October 14, 2025, 12:15:22 PM

Login with username, password and session length

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

plcnut

  • Hero Member
  • *****
  • Posts: 813
    • premiersi.com
Re: TCP and networked printer
« Reply #30 on: July 28, 2016, 03:59:01 PM »
Try this example.
Please let me know how it goes.
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 #31 on: July 29, 2016, 07:17:14 AM »
Thanks plcnut. I hope to have time to work on this next week. I do have a question after looking through the program. Bits C0 and C3 have to do with the printer queue being full. How is this determined?
Thanks again, you truly are a nut for PLCs.

plcnut

  • Hero Member
  • *****
  • Posts: 813
    • premiersi.com
Re: TCP and networked printer
« Reply #32 on: July 29, 2016, 08:00:41 AM »
I frequently use Tasks to assemble data and place it into the queue using STRPRINT. Many times this data is being assembled inside a FOR/NEXT loop using indexed fields (like a database table inside Do-more). When the queue gets full, then I will set a bit to indicate that I have more data coming, then call the code block that sends out the data. As soon as I have finished streaming out the queue, then I will call the Task to continue where it left off and fill the queue again.
Rinse, Lather, Repeat...
Circumstances don't determine who we are, they only reveal it.

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

plcnut

  • Hero Member
  • *****
  • Posts: 813
    • premiersi.com
Re: TCP and networked printer
« Reply #33 on: July 29, 2016, 10:18:00 AM »
Here is a screenshot where I am assembling a csv file that is then streamed out to a client.
You will notice that I monitor the length of the queue so that I can exit and stream the queue, but once the data is all assembled it exits with the 'c_AssemblyDone' bit, so that my Stream code block knows what to do.
Circumstances don't determine who we are, they only reveal it.

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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: TCP and networked printer
« Reply #34 on: August 06, 2016, 11:46:46 PM »
So we walk a fine line between providing the features required for high-end applications, keeping the product usable for the majority of our customers, and keeping the techs from pulling their hair out.

Easy peasy.  Just hire completely bald techs, and you can write any features you want.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.