Hi Guys,
Please give me some tips about scripting in Wincc. I wanna copy a value of a Tag and transfer it to another Tag. These tags are located in my PLC (S7-300) memory. I've got some tips in this link http://www.plctalk.net/qanda/showthread.php?t=65298. I don't have any information of VB scripting but by the help of that link I've written this script:
Bitm02 related to this address M0.2 and Bitm03 ==>> M0.3
Bitm50 ==>> M50.0
at this stage I just wanna read the value of M50.0 and write it to M0.2 by wincc. I've saved this script and put the trigger time in 250 ms but after activating the script doesn't work. I don't know what's the problem? Please guide me. If you have the script in C it's also good for me.
Thanks in advance
Please give me some tips about scripting in Wincc. I wanna copy a value of a Tag and transfer it to another Tag. These tags are located in my PLC (S7-300) memory. I've got some tips in this link http://www.plctalk.net/qanda/showthread.php?t=65298. I don't have any information of VB scripting but by the help of that link I've written this script:
Code:
Option Explicit
Function action
Dim Tag1
Dim Tag2
Dim Tag3
Set Tag1=HMIRuntime.Tags("Bitm02")
Set Tag2=HMIRuntime.Tags("Bitm03")
Set Tag3=HMIRuntime.Tags("Bitm50")
Tag3.Read
Tag1.Value = Tag3.Value
Tag1.Write
Set Tag1 = Nothing
Set Tag2 = Nothing
Set Tag3 = Nothing
End Function
Bitm50 ==>> M50.0
at this stage I just wanna read the value of M50.0 and write it to M0.2 by wincc. I've saved this script and put the trigger time in 250 ms but after activating the script doesn't work. I don't know what's the problem? Please guide me. If you have the script in C it's also good for me.
Thanks in advance