Using the MSG and Socket Comms with a printer

backn

Member
Join Date
Sep 2018
Location
Minnesota
Posts
5
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?
 
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
 
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.
 
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?
 
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.
 

Similar Topics

Hello All, is there any way to fetch remote controllers Mode Run/Remote Prog/Faulted etc. ( AB L8 Series) using CIP message, if yes please share...
Replies
5
Views
793
Hello Ken Roach, Thank you for your quick reply , As informed earlier i want to read P&F Sensor data on Micrologic 1400 series B using MSG...
Replies
17
Views
5,732
I'm looking to implement a low-cost, efficient method of communicating some integer values to an R30iB robot from a Rockwell 1100 PLC. I am not...
Replies
8
Views
1,712
Hi all, We have a packaging machine in our plant that has a cartoner and the casepcker. If caspacker goes down for 5-10minutes this shuts of...
Replies
5
Views
1,676
Is it possible to use the MSG instruction to grab all the information from an analog module (e.g. 1756-IF8I/A) that is owned by a different CPU...
Replies
12
Views
3,680
Back
Top Bottom