WinCC 7.0 VBA read/write tag values

Manglemender

Member
Join Date
Jul 2007
Location
Lancashire
Posts
1,295
This is probably a stupid question but I searched and I've read the F Manual but I still can't figure out how to read or write a tag value in VBA under WinCC 7.0

I can access the properties such as start value, Limits, etc. but although the manual says it can be done, there is no example of reading a tag value or writing one.

I'm hoping someone here may be able to guide me in the right direction.

VBS is no problem but VBA?

This all started with wanting to dynamically set the contents of a combobox. There is an example on the S website for VBS but it doesn't seem to work (cannot .AddItem) and the debugging in the MS script debugger is appaling.

I've used VBA extensively with RSView32 and would like to be able to do the same with WinCC.

Nick
 
Last edited:
You cannot read or write tag values with VBA, you have to use VBS.

What exactly did you want to achieve? I'm on holiday this week without any programming tools but maybe my memmory will be enough. The key to getting things working in VBS is getting the objects defined correctly.

Do you have the Microsoft Script Debugger installed? If no, download and install it - it's a free download.

Nick
 
I want to learn the very basics of WinCC - how to change values on PLC. I know how to read and write values via OPC Scout. Then I can connect to the OPC server in WinCC, can read DBs. But don't know how write values. Can you provide with any pdf where it's clarified?
Thanks in advance, Nick!

P.S. it doesn't need to have anything related to VB whatever. Just the simple way.
 
I also would like to know how to capture tag configuration through VBS and populate I/O fields in runtime. We control the HMI and PLC to an extent, but we have some electricians who do basic troubleshooting and the tag configuration would help them a lot without us coming onsite. Thanks.
 
I also would like to know how to capture tag configuration through VBS and populate I/O fields in runtime. We control the HMI and PLC to an extent, but we have some electricians who do basic troubleshooting and the tag configuration would help them a lot without us coming onsite. Thanks.

It isn't clear what you want to acheieve and you would probably be better starting a new thread. Please give a more detailed description and also state whether you are running WinCC or WinCCFlexible as they are very different.

Nick
 

Similar Topics

Hi,i want to logon & change the password in wincc SCADA runtime.Can anyone help. Im new to VBA.Regards,Shrikant
Replies
0
Views
1,829
I a new for WinCC Flexible. I use the WinCC version 7. I have tried to create a graphic screen and add the Button on the screen, then add action...
Replies
2
Views
5,047
Hi does any one know how I can use Object Librarys in WinCC for VBA programming? Normal I just add the Microsoft Excle 9.0 Object Library to the...
Replies
0
Views
1,841
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
79
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
69
Back
Top Bottom