AG_SEND, AG_RECV Max Send/Recv Data Length

Rusty_K

Member
Join Date
Mar 2004
Location
Norway
Posts
73
Hello!

Slightly confused at the moment regarding the maximum number of bytes transferable via the AG_SEND (FC5, V4.2),AG_RECV (FC6 V4.7) blocks using a CP343-1 EX30. I have tested these blocks sending data to an ABB robot via a TCP connection. The robot only receives the first 240 bytes. I need to send 1024 bytes so this is a bit of an issue for me! I'm finding the Siemens documentation rather missleading...

For example, in the help files for AG_SEND it states :

Number of bytes to be sent from the data area with this job. The possible values range from 1 to length specified for the SEND parameter. ·Note the block type:
- For S7-300 The current versions of FC AG_SEND allow up to 8192 bytes (2048 bytes for UDP) to be transferred.
- For S7-400 With FC AG_SEND, the data area is restricted to a maximum of 240 bytes.

But in the manual for the CP-343 it states:

Max. data length for blocks AG_SEND (V4.0 and
higher) and AG_RECV (V4.0 and higher)
AG_SEND and AG_RECV allow the transfer of
data fields of between 1 and 240 bytes.
- 1 to 8192 bytes for ISO transport,
ISO-on-TCP, TCP;
- 1 to 2048 bytes for UDP
(This is really confusing beause the first line states 1-240 bytes and the next line states 1-8192 bytes for ISO,ISO-on-TCP and TCP...so what protocol are they refering to when they say 1-240 bytes, and why can I only send 240 bytes even though I using TCP??!!)

Anyone have any ideas..am I in serious trouble here? Any recommendations?

Cheers!

R.K.
 
It is confusing because the length you can send has increased over the years. If you have a rather new cpu and a rather new cp card you should be able to send 8192 bytes over TCP/IP.
If you are using a 400 CPU change from AG_SEND to AG_LSEND
Check out this manual.


S7300:
– With the latest versions of the Ethernet CPs, only FCs AG_SEND and AG_RECV are
used; data with a length of up to 8192 bytes can be transferred.
– With S7–300 CPs (up to 6GK7 343–1EX10–0XE0 with firmware version V2.2), use
FC60 on TCP connections instead of FC6. For the CP 343-1 (EX10), you can use
FC5/FC6 up to block version V3.0.
● S7400:
– With FCs AG_SEND / AG_RECV, the data length per job is restricted to <=240 bytes.
Longer data records (up to 8192 bytes) can be transferred with FCs AG_LSEND or
AG_LRECV.
 
Hey Brat, thanks for the response!

Right, so it seems there's something seriously wrong here!

I'm using a CP343-1 (CP343-1EX30-0AB0, Firmware version V2.0) with a CPU315-2PN/DP (315-2EH13-0AB0, Frimware version 2.6).

Am using FC5 & FC6 AG_SEND (V4.2) and AG_RECV (V4.7).

I don't see why I cant transfer more than 240 bytes!
 
I don't have STEP7 available at the moment, but check if there is not an option in the CP properties saying 'allow more than 240 bytes'.
That existed as I know for older CPs, but maybe it's still here for compatibility.
 
Merci Clweb,

I've looked all over the CP properties, unfortunately I haven't found anything like what you mentioned...
 
Have you solved your problem? I do have exact same problem. I also can recive only 240bajts even though there is possibilty to get 8kb.
 
I'm retired from Siemens since 5 years, but take a look at the CPU parameter if there is not any check box for communication of more than 240 bytes.
 
It is possible that the CPU -> CP communication is limited to 240 byte chunks. The CP card may be trying to send a large number of small packets as one group, instead of one large packet.

The standard Ethernet frame is about 1500 bytes, though, so you may need to have jumbo frames enabled somewhere if you want to send one packet larger than this.
 
Thank you for replay. I want to recive something about 500-600 bytes. In CPU settings there is no such an option to recive more than 240b. I used to have it when I tested it with older CP and it was in CP settings but it doesn't help at all.
 

Similar Topics

I'm trying to understand how the various PLC's in our machine are communicating and I've gotten so far but come with a bit of a dead end... Basic...
Replies
15
Views
8,940
I am using SCL for a bit of TCP programming on an S7-400. How do I link the DB to the AG_SEND or AG_RECV FC? In the case of FBD or ST, you use...
Replies
5
Views
4,556
I'm looking for documentation for the functions PDAT_CY, PCD_SEND and PCD_RECV that are part of an existing Step-7 program. The best I can find so...
Replies
1
Views
2,387
Hi I just came back from a project where I had to help someone else with his PLC where he was using a CP342-5 to exchange data with a Profibus...
Replies
0
Views
1,498
Hi everybody, I could not find any useful information about this blocks for siemens s7-300.I would like to find out how can we use those...
Replies
18
Views
9,848
Back
Top Bottom