VB in WinCC

Right guys can we at least agree on one thing? Regardless of whether we use VBS or C for scripting in WinCC, WinCC is one of the worst SCADA packages on the market.
 
Combo said:
no doesn't work.

...... And no, I will not use reset in the PLC, that's not clean.

......

I don't agree ... you use wincc to tell the PLC what to do .It seems logical that you reset the bit after the PLC used it , meaning that the PLC has noticed the bit .The way I have used this in the past is a follows : scada sets bit , PLC resets bit ,scada checks if bit is reset ( after time) if not then some sort of alarm.

Right guys can we at least agree on one thing? Regardless of whether we use VBS or C for scripting in WinCC, WinCC is one of the worst SCADA packages on the market.
I worked with intouch , cimplicity , WizCon and WinCC ... and I cannot agree with you ,they all have good and bad points.They all start to look similar in lay-out.If they can use WinCC as 'engine' for PCS7 to do Process control then WinCC can't be that bad.

Bye

Eric
 
Last edited:
Now why not set the bit with the Press Left action (using direct connection) and resetting the bit with the Release Left action?
This should work and needs no scripting and should work faster than running a script each time.(at least thats what the siemens-trainer told me.....)

That's exactly what was being done here and on the stations with cycle times > ~40ms the operators were screaming because they had to hold their finger unnaturally long on the button to be sure it was seen by the PLC.

I have gone away from that because I have been burned.
Me too!!!
 
Jeebs said:
why not set the bit with the Press Left action (using direct connection)

You could use that for boolean tags and fixed values. I always use 8-bit unsigned integers and some bit filtering to reduce the number of (expensive) tags required. Scripting is more flexible and allows you to create tag names and values on the fly. It all depends on how you have set up your project.
 
stplanken said:
You could use that for boolean tags and fixed values. I always use 8-bit unsigned integers and some bit filtering to reduce the number of (expensive) tags required.

A feature even available in Protool/WinCCFlex, but not in WinCC: SetBitinTag. 1 tag 32 uses....and no scripting(y)
 
Okay

Okay, I've done it like this.

Jeebs said:
Correct me if I'm wrong, but:

When I create a button using WinCC and go to Object properties > Events, I have the choice of:
-Action
-Press Left
-Release left
-Press right
-Release right

Now why not set the bit with the Press Left action (using direct connection) and resetting the bit with the Release Left action?
This should work and needs no scripting and should work faster than running a script each time.(at least thats what the siemens-trainer told me.....)
 
Hi all.

Forgive me if i am in a wrong topic.
I am uiversity student in Greece and i am working in wincc.
I have made a wincc project and i want by a mouse clicking in a button (wincc runtime) to change a bit value of a tag. I have tried all the ways you explained before (c-action,vsb-action) but the tag in my plc simulator (plcsim) does not change value(it changes just for a while and not at all).Does it mean that my plcsim connection to wincc has any problem???
 
And have you tried to use one of the native functions in WinCC for setting a bit with a button ?
I dont understand this infatuation with doing the most basic things with scripts.
 
To explain what i do in a different way
From my plcsim ,when i change a bit in an input variable,then i see the object change in wincc runtime. But i cannot do the opposite: by clicking a button to make the input variable in plcsim change. What i tried is that:I inserted a button object,then click to properties the events,then c-action and then internal function-settagbit(i insert the tag that controls my input variable)
What i see in my plcsim when i click the button is that the bit becomes 1 just for ms and with a strange ''way''(after a lot of clicks it is possible to see this bit 1)
 
I would be grateful if you could explain step to step what to do because i am not so expert in the wincc. I am just a university student.
 
It is possible that the variable is written to elsewhere in the program.
In STEP7 highlight the address, and select CTRL-ALT-Q. A pop-up with the X-ref for that address will appear. Be sure to check the "overlapping accesses".
 
I tried what you told me but with no result. I ensure that i have the overlapping acsesses checked.
it does the same again by clicking the button
My address properties is.. I6.3 OB1 cycle execution NW 58/A R ladder
I tell you my adress properties because i dont know if they have any effect to what i do....
 
Jesper is dead on here.

Point 1 is a given.

Point 2 applies to any HMI as well. Writing a script that sets and holds a value is dangerous and awkward in any language. I understand the roots from a PLC that has a contact input (switch) that you hold. This approach does not make sense with any software package, especially where the software package is separate from the PLC logic. It's too dangerous an event and too difficult to program correctly - if there is such a thing in this case. Using the HMI to set the value and having the PLC do the reset is the correct course of action.

JesperMP said:
1st, I am with Jeebs, why use scripts to solve something that you can do without scripts ?

2nd, even if you can do it with or without scripts, like Roy says, no matter if you do it like this, it has its clear disadvantages.
And it is much worse than the 40ms cycle time Roy mentions, he probably means the cycle time in the PLC, but what about the tag update time in WinCC ? A mouseclick only lasts a few milliseconds, and a typical tag update time is 1 second (400 ms if you have set it up to be fast). So for it to work the operator has to force himself to hold the button pressed for a little while in an unnatural way.
Add to that there are many things that can go wrong, so you risk that the bit never gets reset.
I have gone away from that because I have been burned.
 

Similar Topics

Hello. I have a db which is 1000 INT, and this db is represented in WinCC as a raw data type set of 5x 400 Bytes. This set is read with a script...
Replies
1
Views
72
Hello Experts I am working on a project with WinCC Unified v16 PC system and want to create an option on the screen to export logs to the...
Replies
0
Views
61
Does anyone happen to know how to install the graphic picture in HMI when I go into blower selection there are no graphics shown not only blower...
Replies
1
Views
75
Hi folks, I'm not as accustom with Siemens & WinCC, however I've been asked to increase the amount of data an existing application is logging...
Replies
2
Views
78
I have created a project in TIA Portal v16 Upd6 with S7-1200 (6ES7214-1AG40-0XB0) and WinCC Unified (PC station). The communication between the...
Replies
4
Views
153
Back
Top Bottom