Wincc flexible 2008 - Array syntax in script

naturephoenix

Member
Join Date
Jan 2015
Location
Vienn
Posts
181
I have 4 arrays.
1. -> arrdb1 (array of 52 bytes)
2. -> arrdb2 (array of 20 bytes)
3. -> arr1db300 (array of 20 bytes)
4. -> arr2db300 (array of 52 bytes)


I need to copy arrdb2 in arr1db300 and arrdb1 to arr2db300
in for loop, but i dnt know the syntax

my try:
Dim i

For i = 0 To 20
SmartTags("arrd1b300")(i) = SmartTags("arrdb2")(i)
i = i+ 1
Next

But this is not working
 
Hi have you considered using the PLC to do this? use SFC20 and call it with a bool tag from the HMI
 
I can't find the reference right now, but I think I read once that referencing arrays in scripts didn't work the way I expected them to.

Have you tried copying the whole array at once (arr1 = arr2)?
 
I may be wrong but normally in a for next loop the index variable is incremented automatically by the "next" statement. Try commenting out the line i=i+1 and see if that works.

One more thing, 20 bytes would be 0 to 19 and not 0 to 20.

Nick
 

Similar Topics

Hi, We have upgraded our laptop which includes Windows 11. It appears that WinCC flexible 2008 advanced does not support Windows 11. What...
Replies
11
Views
255
Hello everyone I Have an Issue with the usage of recipes in Wincc Flexible 2008, I create the recipe to change the values in a fast way The...
Replies
0
Views
103
Hello Friends I have installed WinCC Flexible 2008 SP5 Update 2. I have open the software, but the Transfer option does not appear. Is It...
Replies
2
Views
1,468
I have wincc flex 2008 project made with wincc flexible 2088 sp1 project hmi device is simatic pc panel 19" I want to change hmi device to run the...
Replies
17
Views
5,265
Dear experts, I am Muhammad we have an IPC With the windows XP Embedded CE 5.0 on project and running well. i have plan to install wincc flexible...
Replies
8
Views
3,827
Back
Top Bottom