Aleksandra
Member
Hello everyone,
I am trying to send some data from WinCC to PLC. All types of data work fine, except string data type. I am getting the string value from SQL database (defined as nvarchar(50)) and writing it to PLC tag which I have defined as:
1. Firstly as String[16] - didn't work
2. Then as String[150] - didn't work
3. Then as WString[50] - didn't work
4. Then as WString[150] - didn't work
5. Then as String (which is 255 bytes by default) -> only in this case the string is written from WinCC to PLC
6. I came up with an idea to define Array[1 .. 16] of Char and send character by character in a loop -> this also works
The problem is that I have already made complete programs on the PLC side, and changing the the String[16] data type into any other type would be very, very time consuming because I have been using indirect addressing in a lots of places (client required programming in STL, so....)
I very much hope that someone can tell me why there is a problem with transferring string data types... I have read many forums, and posts, found that other people also had the same problem, but didn't find helpful answers..
Looking forward to hearing from you
I am trying to send some data from WinCC to PLC. All types of data work fine, except string data type. I am getting the string value from SQL database (defined as nvarchar(50)) and writing it to PLC tag which I have defined as:
1. Firstly as String[16] - didn't work
2. Then as String[150] - didn't work
3. Then as WString[50] - didn't work
4. Then as WString[150] - didn't work
5. Then as String (which is 255 bytes by default) -> only in this case the string is written from WinCC to PLC
6. I came up with an idea to define Array[1 .. 16] of Char and send character by character in a loop -> this also works
The problem is that I have already made complete programs on the PLC side, and changing the the String[16] data type into any other type would be very, very time consuming because I have been using indirect addressing in a lots of places (client required programming in STL, so....)
I very much hope that someone can tell me why there is a problem with transferring string data types... I have read many forums, and posts, found that other people also had the same problem, but didn't find helpful answers..
Looking forward to hearing from you