Wincc Scripting

DeepThought

Member
Join Date
Mar 2008
Location
Norwich
Posts
52
Hi Guys

I have attached a screen shot hoping someone can help me i dont do VB very well and i get an error saying the script does not return a value any help is greatly appreciated

Deepthought:eek:

wincc.jpg
 
Hi Guys sorry for the delay in answering,

What I am trying to do is when a value is changed on the screen i take that value and run it through a script, in the script i want a function or sub to take that value and do some math on it and then transfer that value into a DB. However I will have many of these values on the screen and I wanted to call the same script but have many different functions in it so i can make the relevant calculation depending on which value from the screen was change and therefore which function/sub was called.
Thanks (hope that makes sense)
 
Not sure about the advantages of using only one script to perform multiple functions but if that's what you want to do, declare your script as a sub not a function, pass the Item number to the sub and then use a case statement to perform different statements depending on the item edited.

Nick
 
Thanks for the advise,

Got it working I declared the function as a sub but in the script declared it again using function sub, end sub etc This was wrong i took these out and got the script to work> The reason I multi functions in one script was they were all the same calculation so i used different case selects.
Thanks for the help.
DeepThought
 

Similar Topics

Hello everyone. I'm trying to export data to excel from Wincc. My code is global action that executed every second that create excel filer per...
Replies
1
Views
5,733
I have 5 temperatures that i want to record during 4 modes which i'll label A,B,C,D. The temperature sensors are the same across all modes. I...
Replies
0
Views
1,176
Hello, I would like to make a script in WinCC 7.2 to read and write data from internal binary tags to specified bit in external(TCP,MPI etc.)...
Replies
0
Views
1,547
Hi! I'm having a problem. I draw a valve in my Graphic Designer and also a Rectangle. I'm trying to do the following: When the user click on...
Replies
0
Views
1,550
Hi Gents , Is it possible to manipulate a bit in a word tag in WinCC,using either direct connection/C Script or VB script? The links are dynamic...
Replies
2
Views
4,863
Back
Top Bottom