String from WinCC to PLC

I just realized something... if you have WinCC V7.3 with no updates, you have to install WinCC V7.3 SE (which is V7.3+Upd1, in reality)from the DVD... which requires uninstalling V7.3 first. I went through this pain long ago.

Try the collation first.

I have tried with the collation, actually changed the collation of that specific SQL table, but it didn't help.. I will install WinCC v7.4.

Anyway, thanks for your huge help. If I ever figure out the source of the problem, I will post it here :)
 
Hi,
I just did a test with WinCC 7.3. I'd say there is a bug in WinCC, as when you choose a WString[16] variable by reading out AS symbols, then the length is set to the string default length of 254.



When WinCC tries to write the string into the plc, then it writes 254 bytes instead of 16, and the write request fails.



You can fix this by manually adjusting the length property in the WinCC Tag Management to the correct value, 16 when you've defined a WString[16]. For datatype string it's the same problem.
 
I just did a test with WinCC 7.3. I'd say there is a bug in WinCC, as when you choose a WString[16] variable by reading out AS symbols, then the length is set to the string default length of 254.

I used WinCC V7.3 + Upd10 and WString [16] was fine.

However, I didn't use the AS Tags... I used absolute address, and set the length to 16.
 
Last edited:
I've tested with optimized datablocks, which you can only add in WinCC 7.3 by reading the AS symbols from the plc.

The information which are readout from the plc contain also the length information, so I'd say it's a bug that the wrong length is used.

I'm using WinCC 7.3 without SP or Updates.
 
I've tested with optimized datablocks, which you can only add in WinCC 7.3 by reading the AS symbols from the plc.

The information which are readout from the plc contain also the length information, so I'd say it's a bug that the wrong length is used.

I'm using WinCC 7.3 without SP or Updates.

I have noticed this "length bug", but didn't suspect that it is the source of the problem... When you manually modify the value, is the data transfer from SQL to PLC successfull? When you modify the length, what is the exact value that you manually change?
 
I have noticed this "length bug", but didn't suspect that it is the source of the problem... When you manually modify the value, is the data transfer from SQL to PLC successfull? When you modify the length, what is the exact value that you manually change?


I did only test with a simple IO-field which is linked to the string tag. There I can see that also here writing the string was not successful. I checked with Wireshark what's going on there, and could see that WinCC writes 254 bytes instead of 16.


I'd recommend to do also a basic test with an IO-field, to make sure that writing the string in general is working.


I changed the length property in the Tag Management from 254 to 16, like you can see it in your screenshot. There is also an option to show a sidebar with extended tag properties.
 
Update:

I have solved the problem. Firstly I installed WinCC v7.4, went through the same procedure, and it worked, strings are successfully transferred. Secondly, in a project with WinCC v7.3 version I changed manually the length property of WString tags, as Thomas_v2 suggested, and it also worked!

Update2:

I even tried to manually change the length of the String tag (from 254 to 16), and despite the fact that nvarchar is 16-bit character set, it worked!!!

I can't believe that it takes all this effort because of one WinCC v7.3 bug. Really can't believe. But thank you both for so much patience and help, especially sigmadelta.

Cheers!
 
Last edited:
You're welcome, Aleksandra!

I think that WinCC V7.x and S7-1500 is not the best combination. I actually convinced a client to convert from WinCC V7.3 to WinCC Professional, and I did the conversion. It has better integration within a single project.
 

Similar Topics

Hi all, I'm trying to connect WinCC Pro to SQL server through OBDC. Everything is okie, I'm able to transfer number, DateTime and even a direct...
Replies
2
Views
1,444
Hi everybody In my program I have five bytes MB10 w#16#62 MB11 w#16#50 MB12 w#16#24 MB13 w#16#10 MB14 w#16#00 I want to show these...
Replies
1
Views
2,568
Hello, I'm having troubles with strings... DB761.DBX16.0 is the offset for a string... in the HMI, this works the way it should, but in the PLC...
Replies
3
Views
2,277
Hello guys, I suffer a problem with KTP 600 DP and CP312C I declare my tag, string: String 1: DB [DB_mux] DBB 626 - string length is 30 chars -...
Replies
1
Views
3,134
I'm trying to write a string of 15 characters from a DB (the variable has type STRING[15]) to an I/O field in WinCC flexible. My problem is that I...
Replies
1
Views
3,730
Back
Top Bottom