Prodave MPI Windows - PLC S7 300 - String

michelv

Member
Join Date
May 2004
Posts
2
Hello,

I'm trying to read/write String to S7 315 2 DP using the W95_S7.DLL

I've no problem with CHAR, REAL, INT, BOOL datatypes, but require information about the Siemens STRING type.

When you declare a STRING[10] in the PLC, and have a look to the hexa bytes, you find 12 bytes :
- 2 bytes : length and probably something else
- 10 bytes : then 10 characters, one character per byte.

Of course, to be able to write correctly a STRING in the Siemens structure, I need to know the structure of the 2 first bytes.

Can somebody give me that information ?

Thanks,

Michel.
 
Michel,

This is the IEC1131 definition of a STRING data type. The first two bytes are always used to hold -

i) the maximum length of the STRING when it was declared
ii) the number of valid characters currently in the STRING

Regards,

Ken M
 
Jackpot

Hello,

According to your advice, I just try to understand some STRING[10] readed from the PLC and ... of course that's it.

Thanks a lot for your very very quick help,

Michel.
 

Similar Topics

hello, i want to recognize telegrams send by S7 via mpi with prodave-dll method and got no clue which method I could use... or how to do it the...
Replies
1
Views
2,093
Hello folks, Is there someone out there who has a simple example S7 project that communicates with pc by means of delphi and prodave? Thx
Replies
14
Views
7,022
Anyone have a .net example of prodave communications? Specifically over ethernet if possible, but I'll take anything.
Replies
1
Views
5,290
Hello I have Prodave V6.0 IE and i want to communicate with a plc through IE. The standard example of Siemens is stil with a MPI communication...
Replies
0
Views
1,722
Hello, I am in the process of writing a scada front end on a robot cell i am building. I am using Prodave 5 to connect to a S7315. I am looking...
Replies
2
Views
3,347
Back
Top Bottom