You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 16th, 2020, 04:52 PM   #1
backn
Member
United States

backn is offline
 
Join Date: Sep 2018
Location: Minnesota
Posts: 5
Angry Using the MSG and Socket Comms with a printer

I have an Allen-Bradley 1769-L33ERM and I am trying to interface it with a Markem Printer Using the NGPCL Protocol over Ethernet and have not gotten any real results.

I have been all over PLCS.net and Google and I cannot get these to work. I have the NGPCL Manual from Markem and the Ethernet I/P Socket Interface manual from Rockwell.

I was able to create a socket, open a connection, and write without errors, but the setting I tried to change in the printer shows no change.

I tried a read from the printer also but where do I tell it what info I want back and where does the read write the actual information back to?
  Reply With Quote
Old January 16th, 2020, 08:19 PM   #2
JeremyM
Member
United States

JeremyM is offline
 
Join Date: May 2014
Location: Texas
Posts: 401
Links to manuals?
  Reply With Quote
Old January 16th, 2020, 11:10 PM   #3
JeremyM
Member
United States

JeremyM is offline
 
Join Date: May 2014
Location: Texas
Posts: 401
we won’t do your work for you. stop stalling.
  Reply With Quote
Old January 17th, 2020, 09:29 AM   #4
backn
Member
United States

backn is offline
 
Join Date: Sep 2018
Location: Minnesota
Posts: 5
Here are the links to the manuals.

file:///C:/Users/backn/Downloads/NGP...uide%20v25.pdf

https://literature.rockwellautomatio...t002_-en-p.pdf
Attached Files
File Type: pdf NGPCL Users Guide v25 (1).pdf (158.8 KB, 4 views)
  Reply With Quote
Old January 17th, 2020, 02:08 PM   #5
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,102
No need to write own sockets program, use pre-configured AOI from TN 50122
  Reply With Quote
Old January 17th, 2020, 02:45 PM   #6
backn
Member
United States

backn is offline
 
Join Date: Sep 2018
Location: Minnesota
Posts: 5
I did eventually find that and I am trying to use it.

I am using the Client AOI as the PLC will be initiating the communications.

In the Printer
I have set the printer IP to 10.20.5.9, the subnet to 255.255.255.0, and the gateway to 0.0.0.0.

also the settings in the printer match the settings in the Printer Settings Section of the NGPCL Document. One thing I am confused on is that it only references RS232 in the printer itself but the document states this will work over Ethernet.

In the PLC
The destination address is 10.20.5.9?port=21000

The port is always 21000 per the NGPCL Document.

The PLC has IP 10.20.5.2, subnet 255.255.255.0, and gateway 0.0.0.0.

The path in the MSG instructions is 1,0 for the ethernet ports embedded in the processor.

The PLC and printer are connected via an unmanaged Switch and ethernet cables

I have the PLC Port setting at 0 since the Rockwell documentation states 0 will cause the PLC to choose an open port. also I have 0 for the IP Address as the documentation states that it will then work with any IP I set the PLC to.

I am attempting to send {~SCdarkness|90|} to the printer but the darkess is not changing and nothing seems to be in the read buffer(Unless the Read is not working, which it probably isn't)

Things I noticed
I have noticed that the document states the IP Address should be a DINT but the AOI has it as a SINT[4]

Also in the read response the document has a separate BufLen DINT and Buf SINT[480], but the AOI has both together in a STRING
  Reply With Quote
Old January 17th, 2020, 04:59 PM   #7
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,102
SINT[4] works the sam way as DINT
SINT[480] combines all data structures in one, just less understandable but easier to handle with MSGs
You need to use wireshark to see what is actually on the wire. You must use port mirror on a managed switch or ETAP, or you will not see packet.
  Reply With Quote
Old January 20th, 2020, 09:30 AM   #8
backn
Member
United States

backn is offline
 
Join Date: Sep 2018
Location: Minnesota
Posts: 5
I was off for the weekend but now i am back to it. I am getting a managed switch and downloading wireshark right now but i would like to verify that once this works an unmanaged switch will work correct? the managed switch is just for diagnosis?
  Reply With Quote
Old January 20th, 2020, 09:56 AM   #9
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,102
Quote:
the managed switch is just for diagnosis?
correct, managed switch is to set port mirror to use wireshark
  Reply With Quote
Old January 20th, 2020, 05:48 PM   #10
backn
Member
United States

backn is offline
 
Join Date: Sep 2018
Location: Minnesota
Posts: 5
I was able to get it working! Not positive what fixed it but I think it was the request string I was sending. I found a little blurb in the manual.

5.16Setting Change
Sent to NGE device to change the value of a single setting. The requirements outlined in the
NGCommon requirements spec ‘Print Job Management’ shall apply. The requirements specify the
settings that can be changed in each PackML state. This can lead to changes in settings being
rejected. If a setting change is rejected the command will fail.

Looks like the setting I was trying to change was not changeable in the PackML state the printer was in. I might have had an extra delimiter character in the wrong place as well.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
MSG delete socket error durioner LIVE PLC Questions And Answers 4 February 5th, 2019 05:29 PM
question about socket messages lunknowl LIVE PLC Questions And Answers 3 September 18th, 2018 06:06 PM
MSG function from CIP device without socket? stokke93 LIVE PLC Questions And Answers 3 October 3rd, 2014 09:44 PM
AB CompactLogix L36ERM - Socket Programming small help needed bharat.desh LIVE PLC Questions And Answers 4 January 27th, 2014 12:30 PM
rslogix5000 socket initialization-1768 EWEB italo2008 LIVE PLC Questions And Answers 3 June 1st, 2009 05:44 PM


All times are GMT -5. The time now is 05:36 AM.


.