Announcement

Collapse
No announcement yet.

Still stuck with Zebra

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lucas.Allen
    started a topic Still stuck with Zebra

    Still stuck with Zebra

    Good morning all,

    I have been able o get communication to printer from PLC with static text:

    "^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR5,5 ~SD15^JUS^LRN^CI0^XZ^XA^MMT^PW456^LL0253^LS0^FT405 ,216^A0I,28,28^FH\^FDMachine Count Verified^FS^BY3,3,100^FT423,105^BCI,,Y,N^FD>:MR>51 24400>6A^FS^FT281,15^A0I,28,28^FH\^FDQTY:15^FS^PQ1,0,1,Y^XZ"

    What they want now is the part in red the quantity to read from a counter instead of static so if they need to do a box with smaller qty they can still label correctly IE partial order. and if possible add time and date to label that I will need to pull from PLC as the GK420d does not have internal clock.

    HELP!!
    Last edited by Lucas.Allen; 07-11-2018, 06:53 AM.

  • Lucas.Allen
    replied
    Originally posted by imberiman View Post

    Lucas,

    Since I am using the D4-454 plc unit I am a little more limited on my functions etc as far as I can tell. I can't seem to figure out a way to do a memory block. When you separated the the label file into sections did you place ^XA in each box or just the first box? Thanks for your help on this once I am done and happy I plan to post this on the forums how I got it to work and what wiring etc so others won't have to go through this.

    Thanks
    adam

    Adam,

    Just do it in the first box, it will send to printer and combine strings waiting for the final comand

    Leave a comment:


  • imberiman
    replied
    Originally posted by Lucas.Allen View Post

    Adam,

    When using multiple box I designed label in zebra designer then print to file, when you open the file delete the top row it is junk, start with "XA" and highlight characters to fit in box, I separated to sections to keep it easier paste into STRPRINT and set bit for complete, that bit ill trigger the next STRPRINT instruction, these will stack in the printer till they receive "XZ" in the last box, this will tell it to Print. I think I had 5 in series that printed without fault, but creating my own memory block was much better as I was able to get all characters into 1 block
    Lucas,

    Since I am using the D4-454 plc unit I am a little more limited on my functions etc as far as I can tell. I can't seem to figure out a way to do a memory block. When you separated the the label file into sections did you place ^XA in each box or just the first box? Thanks for your help on this once I am done and happy I plan to post this on the forums how I got it to work and what wiring etc so others won't have to go through this.

    Thanks
    adam

    Leave a comment:


  • Lucas.Allen
    replied
    Originally posted by imberiman View Post

    Hi,

    When you were using the multiple boxes what were you doing in your zpl code so it would print multiple boxes in order? Were you doing the ^XA command and ^XZ in each box with each section of ZPL?

    Thanks
    Adam
    Adam,

    When using multiple box I designed label in zebra designer then print to file, when you open the file delete the top row it is junk, start with "XA" and highlight characters to fit in box, I separated to sections to keep it easier paste into STRPRINT and set bit for complete, that bit ill trigger the next STRPRINT instruction, these will stack in the printer till they receive "XZ" in the last box, this will tell it to Print. I think I had 5 in series that printed without fault, but creating my own memory block was much better as I was able to get all characters into 1 block

    Leave a comment:


  • imberiman
    replied
    Originally posted by Lucas.Allen View Post

    C1020 is used in program at end of cycle to print label when box is full I have STRPRINT at 1 second interval just to refresh data that is being printed from variable fields in PLC as different programs are selected and counts change, Still need ti fix time format as 7:06 will display as 7: 6 but havent really had time to play with this formatting

    Click image for larger version Name:	print.JPG Views:	4 Size:	177.9 KB ID:	117171
    Hi,

    When you were using the multiple boxes what were you doing in your zpl code so it would print multiple boxes in order? Were you doing the ^XA command and ^XZ in each box with each section of ZPL?

    Thanks
    Adam

    Leave a comment:


  • Lucas.Allen
    replied
    Originally posted by imberiman View Post
    Do you have a copy of your program you could supply? I am working on trying to get a similar project working and need some guidance. Thanks
    C1020 is used in program at end of cycle to print label when box is full I have STRPRINT at 1 second interval just to refresh data that is being printed from variable fields in PLC as different programs are selected and counts change, Still need ti fix time format as 7:06 will display as 7: 6 but havent really had time to play with this formatting

    Click image for larger version  Name:	print.JPG Views:	4 Size:	177.9 KB ID:	117171

    Leave a comment:


  • imberiman
    replied
    Do you have a copy of your program you could supply? I am working on trying to get a similar project working and need some guidance. Thanks

    Leave a comment:


  • Lucas.Allen
    replied
    Originally posted by BobO View Post

    Go into the System Configuration dialog. Select the Memory Configuration item from the tree on the left. Then either Add Memory Block or Add Heap Item. Select String Struct and pick the length.

    If you do a block, the default block length is 256...which with 1024 strings is more than the entire image register size...so be sure to reduce to something more suitable.
    Just set this up and got the whole label into 1 block thank you, 2 more blocks and I should be able to get logo lol

    Leave a comment:


  • BobO
    replied
    And if this were BRX, another nifty trick would be to read label information from a file on the uSD. If could then be changed without touching the PLC program.

    Leave a comment:


  • BobO
    replied
    Originally posted by Lucas.Allen View Post
    hmmmm something new to dig into haha, thank you!!!
    Go into the System Configuration dialog. Select the Memory Configuration item from the tree on the left. Then either Add Memory Block or Add Heap Item. Select String Struct and pick the length.

    If you do a block, the default block length is 256...which with 1024 strings is more than the entire image register size...so be sure to reduce to something more suitable.
    Last edited by BobO; 07-12-2018, 12:05 PM.

    Leave a comment:


  • Lucas.Allen
    replied
    hmmmm something new to dig into haha, thank you!!!

    Leave a comment:


  • BobO
    replied
    SL is 256. You can create user strings up to 1024.

    Leave a comment:


  • Lucas.Allen
    replied
    fully solved, have it working great, the SL string only allows 250 i think characters so I needed to split into multiple strings sending one at a time to PLC using the success bit to trigger the next string, this allows me to print whatever is needed on label< I did not do any logos as they later asked for due to the logo would add another 2500 characters or 10 STRPRINT commands on top of the 5 I already have but it works great, now load part numbers from recipe and quantity from counter Time and date from PLC clock:

    Zebra Designer: Actual Label
    Click image for larger version

Name:	finnished label.JPG
Views:	37
Size:	224.0 KB
ID:	115867Click image for larger version

Name:	actual label.jpg
Views:	21
Size:	173.6 KB
ID:	115869


    ZPL Code:
    ^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR5,5~ SD15^JUS^LRN^CI0^XZ
    ^XA
    ^MMT
    ^PW812
    ^LL1218
    ^LS0
    ^FT791,1070^A0I,102,117^FH\^FD"SS10"^FS
    ^BY3,3,30^FT761,110^BCI,,Y,N
    ^FD>:Q"CT1.ACC"^FS
    ^BY3,3,30^FT761,238^BCI,,Y,N
    ^FD>:P"SS20"^FS
    ^BY3,3,30^FT761,367^BCI,,Y,N
    ^FD>:"SS10"^FS
    ^FO25,589^GB757,420,3^FS
    ^FO128,658^GB588,72,3^FS
    ^FO15,1019^GB781,0,3^FS
    ^FO28,333^GB754,121,3^FS
    ^FO28,206^GB754,121,3^FS
    ^FO127,744^GB588,72,3^FS
    ^FO28,76^GB754,121,3^FS
    ^FO127,829^GB588,72,3^FS
    ^FO127,915^GB588,72,3^FS
    ^FT608,929^A0I,53,60^FH\^FDQTY: "CT1.ACC"^FS
    ^FT617,761^A0I,51,52^FH\^FDTIME: "$NOW.HOUR":"$NOW.MINUTE"^FS
    ^FT633,845^A0I,53,57^FH\^FDDATE: "$NOW.MONTH"/"$NOW.DAY"/"$NOW.YEAR"^FS
    ^FT713,674^A0I,53,45^FH\^FDOPERATOR:^FS
    ^FT761,160^A0I,28,28^FH\^FDQUANTITY (Q)^FS
    ^FO30,491^GB750,74,74^FS
    ^FT780,505^A0I,59,67^FR^FH\^FDMACHINE COUNT VERIFIED^FS
    ^FT761,288^A0I,28,28^FH\^FDCUSTOMER PART NUMBER (P)^FS
    ^FT761,415^A0I,28,28^FH\^FDINTERNAL PART NUMBER^FS
    ^LRY^FO22,1046^GB769,0,129^FS^LRN
    ^PQ1,0,1,Y^XZ
    Attached Files

    Leave a comment:


  • Lucas.Allen
    replied
    I am able to use the $NOW. series to add time and date but it seems that I am limited to only 3 lines of label for printing so trying to make it work with all info now within 3 lines

    Leave a comment:


  • BobO
    replied
    The input to STRPRINT is actually a script. String literals are bounded by quotes, any valid PLC element will be printed in the default format for its type, and for more control, there are a number of formatting functions. For time or date, you can use the functions FmtTime() and FmtDate() to gain more control of the output.

    Leave a comment:

Working...
X