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

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
69
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
97
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
113
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
367
Hi Everyone, I have a customer that needs a CQM1H (CPU51) replaced. They purchased the processor new-old-stock from a source they found online...
Replies
3
Views
360
Back
Top Bottom