Transfer VBScript String to DB Bytes

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

Hi everyone. I am attempting to transfer several Licenses from an old PC to a new PC via offline transfer. As far as I can understand, I did all...
7
Replies
1,322
Views
New customer recon. Trying to backup all the PLCs and HMs. PLCs are done. So next is tthe Pain. In the Factory Balk Transfer utility, I am not...
20
Replies
1,345
Views
When pushing a new .MER file to an HMI, is there a functional difference between using ME Transfer Utility, vs simply copying the .MER file onto...
7
Replies
1,124
Views
I need old Ebelt software. BTProWin V2.92. I am trying to transfer software to a spare hmi.
0
Replies
420
Views
Hi, I have an ET200SP 1510SP-1 PN, i want to transfer a TIA portal project to via SD card. All of the tutorials seem to be made for S7-1200 PLC...
5
Replies
755
Views
Top