Hi there,
When I try to retrieve an array with size of 10k items(LREAL, 80000bytes in total) from a PLC using S7Plus driver, I receive an error as follows:
Unexpected state, S7PlusTrans, toVar, Data buffer too short (14472) for expected itemSize 80000
I need even larger arrays 500k items(4,000,000bytes). I was not able to find any configuration related to the buffer size of S7plus connection's data exchange. There are item related queues which does not affect the behavior (or I failed).
Can anyone guide me through how to receive large tags from PLCs?
Retrieving huge arrays via S7Plus driver
Search
-
- Posts: 373
- Joined: Tue Jan 15, 2019 3:12 pm
Re: Retrieving huge arrays via S7Plus driver
Are you using a TIA project or online device (file or online browsing) for the TIA configuration?
How is your address config configured?
How is your array defined in the PLC?
How is your address config configured?
How is your array defined in the PLC?
Re: Retrieving huge arrays via S7Plus driver
- I'm using offline project export. (see the datablock in plc attached) Export size becomes 300MB if you configure only one DB with the attached configuration which is also strange and unacceptable.
- Just regular input address configuration, using a dyn_ type datapoint element. Tried both subscription and polling.
- See attached
- Just regular input address configuration, using a dyn_ type datapoint element. Tried both subscription and polling.
- See attached
-
- Posts: 373
- Joined: Tue Jan 15, 2019 3:12 pm
Re: Retrieving huge arrays via S7Plus driver
I have no idea what you mean with a regular address configuration. Does it include the size of the array, for example: 'Array1k:1000'? If not, does it work if the array size has been added?
Re: Retrieving huge arrays via S7Plus driver
Selecting the item from the TIA export automatically adds the length of the item.
This is the error message I receive:
Unexpected state, S7PlusTrans, toVar, Data buffer too short (14472) for expected itemSize 80000
This means that array address configuration has 10000 in it already so it knows the size of the expected message(80000 bytes). However, the buffer seems not to be adapted accordingly, and the message cannot be received. Sometime it receives some amounts of data (1800, 2700) but never complete.
That's really a strange behavior and probably can be considered as a bug.
This is the error message I receive:
Unexpected state, S7PlusTrans, toVar, Data buffer too short (14472) for expected itemSize 80000
This means that array address configuration has 10000 in it already so it knows the size of the expected message(80000 bytes). However, the buffer seems not to be adapted accordingly, and the message cannot be received. Sometime it receives some amounts of data (1800, 2700) but never complete.
That's really a strange behavior and probably can be considered as a bug.
Re: Retrieving huge arrays via S7Plus driver
Hello!
The error message you get directly points to the fact, that the S7+ driver expects 80.000 bytes of data being sent from the PLC for 10k items of size LREAL. However, the PLC only sends 14.472 bytes of data, which is simply too little for correct data processing. You really have to consider some limitations on PLC side, especially a maximum size of single variables or data messages.
If you must deliver the PLC-arrays as dyn-elements to WinCC OA I recommend splitting your arrays into shorter ones so that the PLC can send them successfully. Calculating backwards from 14kByte to LREAL array would mean ca. 1800 items.
Best regards, Daniel
The error message you get directly points to the fact, that the S7+ driver expects 80.000 bytes of data being sent from the PLC for 10k items of size LREAL. However, the PLC only sends 14.472 bytes of data, which is simply too little for correct data processing. You really have to consider some limitations on PLC side, especially a maximum size of single variables or data messages.
If you must deliver the PLC-arrays as dyn-elements to WinCC OA I recommend splitting your arrays into shorter ones so that the PLC can send them successfully. Calculating backwards from 14kByte to LREAL array would mean ca. 1800 items.
Best regards, Daniel