WinCC Newbie - Help Anyone?

boswellw

Member
Join Date
Feb 2009
Location
South Africa
Posts
45
I am currently converting a relay-based control panel to an S7-200 PLC. Everything is done, apart from the "Start" button. I need to write a value to the PLC from the button, i.e. When the "Start" button is clicked, I need to write the value of 1 to M0.2 (Start_Dedusting). When it is clicked again, I need to write the value of zero to it.

I have written a small C-Script to do this, but I am fairly sure this is incorrect.

GetTagBit("Start_Dedusting,0)
if ("Start_Dedusting,1)
SetTagBit("Start_Dedusting,1)
else
SetTagBit("Start_Dedusting,0)

The main body of it is above. The header was automatically created. I haven't tested it yet, but I'm fairly sure this is incorrect.

Can anyone tell me whether I'm on the right track or not?

Cheers.
 
Look at using a switch not a button. You can set it up to do just what you want and you can make it look like a standard button.

On second thought you could also use the invert bit event.


Take a look here page 165
http://support.automation.siemens.com/WW/view/en/18796010


The switch is used in runtime to input and visualize two states, for
example, ON and OFF, or pressed and not pressed.
It can be labeled with text or a graphic that indicates the runtime status of​
the switch.
 
Last edited:
I should have mentioned I'm using WinCC V6.0 SP4, and not Flex. Just spent an hour looking for those dang switches... :oops: No invertbit command either. Would've been perfect that...
 
Hmm... No more answers. Surely someone must've done this before? Anyway, after browsing through the manuals for an hour or so, I believe my script above should work. If anyone has any other suggestions though, I'd love to hear it. Cheers.
 

Similar Topics

Hello Guys, Newbie with Siemens here. I will be configuring and deploying for a project of mine for WinCC redundancy. I have read this article...
Replies
5
Views
7,273
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
63
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
65
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
145
I am creating a project with WinCC Unified v16 Upd6 (PC runtime) with an S7-1200. The communication is good between the PC and the PLC as I can...
Replies
6
Views
190
Back
Top Bottom