Writing a VBS value into a WINCC tag

teckhno2002

Member
Join Date
Nov 2005
Location
Craiova
Posts
35
I have this situation in a Global Script (Action)

v(1) is associated to “tag1” from WINCC
v(2) is associated to “tag2” from WINCC
v(3) is associated to “tag3” from WINCC

dim v(3), t(3), i,
For i= 1 to 3
If t(i) <256 Then
v(i) = 1 ‘v(i) must be writen into the appropiate WINCC tag .That means
‘v(1) to “tag1”, v(2) to “tag2”, v(3) to “tag3”.
Else

v(i)=0

End if
Next
[FONT=&quot]
How can I send the element
[/FONT][FONT=&quot]of the matrix [/FONT][FONT=&quot]v(i) to the WINCC tag in this specific case?

[/FONT]
 
Found the answer

Option Explicit
Function action
Dim v(3),t(3),i
Set v(1) = HMIRuntime.Tags("v1")
Set v(2) = HMIRuntime.Tags("v2")
Set v(3) = HMIRuntime.Tags("v3")
t(1)=HMIRuntime.Tags("t1").read
t(2)=HMIRuntime.Tags("t2").read
t(3)=HMIRuntime.Tags("t3").read
For i = 1 To 3
If t(i)<100 Then
v(i).Value = 1
v(i).Write
Else
v(i).Value = 0
v(i).Write
End if
Next
End Function
 
Can you please help me 'dynamic filling' properties in wincc?
How to change the foreground and background colors of polygon using dynamic filling?
 

Similar Topics

Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
4
Views
189
Hello all, I'm currently working on a servo motor linear positioning system (ball screw). I'm all set up regarding communication between my HMI...
Replies
1
Views
90
Hello All: I have a Windows 10 PC running a FTView ME Station 10.00. I have a .mer file version 6.00. It has been running well on it for a long...
Replies
1
Views
164
My R55 Ingersollrand is tripping on motor overload and im falling to see the trip history it is writing Acquarring texts
Replies
0
Views
132
Hi. Not the fist time I'm saying this but just to give a background. 95% of my PLC programming has used Schneider over the last 10 years on...
Replies
66
Views
4,939
Back
Top Bottom