How to make a code run continuously in WinCC?

gustavo_dias

Member
Join Date
Aug 2016
Location
Minas Gerais
Posts
76
Hi all,
I want that a vb scripts run continuosly in wincc. My code get a print screen when a specific bit as equal 1 and other code set a time that my barGraph will start get information from my system wheb a specific bit as equal 1.
Where I put my code??
My Wincc version is 7.2
 
Hi all,
I want that a vb scripts run continuosly in wincc. My code get a print screen when a specific bit as equal 1 and other code set a time that my barGraph will start get information from my system wheb a specific bit as equal 1.
Where I put my code??
My Wincc version is 7.2

There isn't really a "run continuously" option, but you can have scripts run at defined intervals, such as every 2s.
 
Thanks for your help, how can I do it?

See my attached document in this thread:
http://www.plctalk.net/qanda/showpost.php?p=662815&postcount=4

which shows how to realise a counter value which is incremented every second. You can add a VB script instead of a C script if you want, the settings you have to do are the same.

But if you want to do an action when a specific variable has a specific value, I would use in the trigger settings a variable trigger instead of a cyclic trigger, to keep the script load in your WinCC runtime low.
Then the script is only triggered when the value of the variable has changed. Then you read the variable value, and do some action when variable==1 or whatever you need.
 
See my attached document in this thread:
http://www.plctalk.net/qanda/showpost.php?p=662815&postcount=4

which shows how to realise a counter value which is incremented every second. You can add a VB script instead of a C script if you want, the settings you have to do are the same.

But if you want to do an action when a specific variable has a specific value, I would use in the trigger settings a variable trigger instead of a cyclic trigger, to keep the script load in your WinCC runtime low.
Then the script is only triggered when the value of the variable has changed. Then you read the variable value, and do some action when variable==1 or whatever you need.

Thanks Man, your help save me :)
Works!!
 

Similar Topics

Hi, I need to intercept the Shutdown action in my Factory Talk 7.00 HMI using Studio5000 21.03 ladder logic, so that I can ensure all power is...
Replies
7
Views
2,063
hi we have 2 pumps with one running (main) when the pressure on the bus main drops and stops when set pressure is reached. standby pump runs when...
Replies
1
Views
1,929
I was having a discussion recently & my comment mentioned 'the compiler', being RSlogix, Step 7, CX-programmer etc. The other person mentioned...
Replies
17
Views
12,898
how can I let my cicode run in startup of Vijeo Citect. I have a button where I can choose between language on my program, but when I restart the...
Replies
2
Views
6,924
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
186
Back
Top Bottom