Transfer VBScript String to DB Bytes

DannyRitiu

Member
Join Date
Oct 2010
Location
Tg Mures
Posts
8
Hello,

I have created a String variable in VBScript. I don't know the String's length, because it is changing during Runtime. But let's say it's max. 512 chars.

Know, I want to transfer the characters of this string in a DB, which has one single array of bytes (1024 chars, to make sure the string fits).

I have tried the following script:

Dim i, myString, stringLength, stringByte
'...Preparation of myString...
For i = 1 To stringLength
stringByte = Mid (myString, i, 1)
SmartTags ("MyDB.MyArray")(i) = Asc (stringByte)
Next

This works fine, if the stringLength is <100 if it is more than or equal to 100, the script just doesn't do anything.

Can anyone explain this to me. Or can you provide a better way to extract the bytes from a VBScript String and copy them in a DB.

(I am working with Siemens Step7 v5.5+SP1 and WinCC flexible Advanced 2008 + SP3)
 

Similar Topics

Hello Everyone, I am using a raC_Opr_NetModbusTCPClient AOI module, as below,. So, I need some assistance to restrict in reducing the poling...
Replies
2
Views
142
I'm trying to verify a project with a PLC. The Transfer Setup menu item is grayed out and every time I click Verify with PLC, I get an error...
Replies
1
Views
87
Hello, I need to create an automatic transfer panel that connects to the generator when the mains power is cut. I can draw up to 60kW and draw up...
Replies
0
Views
106
Does anyone know what the data transfer rate for this series of CompactLogix PLC's? 1769-L24ER-QB1B to be exact. Cheers.
Replies
1
Views
131
Hi all, Im having trouble transferring a program from one panelview 550 to an new one. I can insert a flash card into the old panelview and upload...
Replies
20
Views
396
Back
Top Bottom