![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Feb 2007
Location: Leuven
Posts: 1,059
|
Strings WinCC -> S7-400
Hi,
Got a question thats been bugging my collegue. We use WinCC to fetch data from a SQL DB. These are mostly strings. Now we need to send a couple of these strings from WinCC to the PLC. We're using 8-bit type character strings. The irritating part is that the string in the PLC has an additional character in front of the string. And we have no clue what this character represents. Any of you know what gets added? Thanks Jeebs |
![]() |
![]() |
#2 |
Lifetime Supporting Member
![]() ![]() Join Date: May 2008
Location: Switzerland
Posts: 1,570
|
What do you mean by extra character? Is there more than lenght + array of chars + end mark of zero in it?
To clarify, this is what is normal string Code:
Byte 0 := 2 (lenght of string) Byte 1 := 'a' (first char) Byte 2 := 'b' (second char) Byte 3 := 0 (end mark) Last edited by TurpoUrpo; June 3rd, 2010 at 09:26 AM. |
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Jan 2010
Location: Bayern
Posts: 48
|
I normally do not use the string function for that kind of application, due to the length that is added to the front
I use a Char. array in my db. This is the link directly as char string in wincc. Hope that helps. If you need a sample please PM me then I will make a sample project for you with a SQL call script. |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Citect Vs WinCC - Long | Doug_Adam | LIVE PLC Questions And Answers | 22 | October 3rd, 2014 01:56 PM |
Choosing S7 300 or 400 | Plc_User | LIVE PLC Questions And Answers | 19 | December 10th, 2009 06:48 PM |
S7 400 password | usman | LIVE PLC Questions And Answers | 0 | April 27th, 2009 04:53 AM |
PLC S7 400 & WinCC Communication | RezaSoleimani | LIVE PLC Questions And Answers | 1 | October 4th, 2008 08:29 AM |
2 questions regarding WinCC & S7 | mi91240 | LIVE PLC Questions And Answers | 2 | August 15th, 2007 04:29 AM |