EN2T Card Open Sockets

mpaisley90

Member
Join Date
Aug 2018
Location
Ohio
Posts
2
Trying to send data to a Diagraph printer. I can send data through Port 80
HTTP://192.168.106.9/serial.cgi?idx=0&nme=Remote.prd&fst=1&lst=2&d1=123d2=ABC&net=1

This will set Message Remote and data 1 to 123 and Data 2 to ABC.

But I want to do this by the PLC and upload data and error proof it.

I tried the sockets and was able to open a socket and connect but never got the info to printer. I watched on the EN2T card URL and say write data and size still no change in printer. My question is there a way to just write the HTTP message on an open Socket and not have a connect msg and write message. Still trying to get this. I have been working on serial too but have some hiccup there also. Rather do it though the Ethernet so that I can have one PLC to send data to multiple printers instead of RS232 hardware per printer.

Thanks in advance. First Time posting.
 
I don't know anything about Diagraph printers, but I would try to contact someone at Diagraph for advice. First find out if your printer can communicate over Ethernet/IP. Then you will need a list of commands that you can send the printer. I would also ask if they can send you a sample program.
 
Tested

I used the WEEB Sockets Test application and I am able to communicate and send data to the Printer. I have Imported the SKT_AOI_TCP CLIENT aoi and logic and am trying to get it to communicate and open sockets. I can create the socket and now connect but my read msg keeps error out. I fixed the Buff.len to above 0 and my timeout is at 2000 but the AOI sits and waits for the Read_msg to complete before I can send A write command to test. Trying to figure this one out.


printer can take commands

the one I need send to now is
GET /serial.cgi?idx=0&nme=Remote.prd&fst=1&lst=2&d1=123&d2=456&net=1 HTTP/1.1 (Carriage Return)
Host: 192.168.106.9(Carriage Return)
(Carriage Return)
(Carriage Return)
 
I fixed the Buff.len to above 0 and my timeout is at 2000
Without seen your application, I am not sure what you actually did.
Good practice is to do short (timeout 10ms or less ) reads continuously and stop read when you do write.
Read should give you ER when no data in the buffer of timeout expired.

Instead of writing your own code or extracting code from the manual demo app you should download a complete read/write AOI that will do all do you, its available in the RA KB.
I think you need TN 50122 (if I recall correctly)
 
Last edited:
For closure and for the sake of others, I will add some comments:

Diagraph is a Linux-based computer, both HMI & its IDS InkJet Delivery System run VNC & web server.
Therefore, HTTP command can be used with a web browser.
For down & dirty open socket communication, GET & PUT are used instead.

Overall, Diagraph industrial tech support is weak, yet their machine is more reliable than Markem-Image small char inkjet line.

SKT_AOI_TCP CLIENT is more superior than the other tech note that was mentioned here, IMHO.
The read is done automatically. However, the default response time should be changed to a small amount of time like 20 ms instead of 2000.
I pointed this out to Rockwell support, they have since added a note to that effect.
The problem is magnified and can be seen when writing multiple times. The root cause is in the AOI, the auto read is causing the problem when the server is null or no data to read.

The read can be done with : GET /status.cgi?ifc=0&net=1HTTP/1.1$r$lHost: 192.168.IP.ADDRESS$r$l$r$l
and the write is done with : GET /serial.cgi?idx=0&nme=MsgFileName.prd&fst=1&lst=2&d1=88888888&d2=999999999&net=1 HTTP/1.1$r$lHost: 192.168.IP.ADDRESS$r$l$r$l

Looking at your command, you came so close, missing the LineFeeds and having one extra CR.
 

Similar Topics

EN2T card is capable of 256 Connection. What exactly a connection means? I am going to use a Generic Module communication with 128bytes input and...
Replies
5
Views
2,264
I've to develope the logic in RS logix 5000 to diagnost the EN2T card. I'm stuck in architecture of EN2t, I don't know which bit will check the...
Replies
0
Views
1,633
I have a question. I work in a very large plant and this one (of many hundreds of control cabinets) contains one 5580 (1756-L83E), two 1756-L73...
Replies
6
Views
198
So I have code to read the IP address of a 1756-EN2T with a MSG block - Get Single Attribute. Does anyone know where to find the MSG block...
Replies
12
Views
1,127
I've been trying to get this Ethernet module configured to send emails to our relay server but cannot get it to work. the EN2T is running...
Replies
7
Views
1,739
Back
Top Bottom