VB Code in WinCC

nil9178

Member
Join Date
Jan 2009
Location
India
Posts
10
Hi All,
I have this following code attached which seems to work gud in Movicon Scada. Recently we have been building applications in WinCC & when the same code that worked in Movicon was attched in WinCC, it gave plenty of errors. Got a little feedback stating that it is as VB Code and it has to be in VB Script for WInCC.an Is that true & if so, how do I convert entire VB code to VBS.
Regards
Nil
 
First of all, you got to know that the data type of VBS tags is always VARIANT. You should find the VBscript manual in the folder :
“disk:\Program Files\Siemens\WinCC\Documents\English\VBScripts.pdf”.
The Wincc tags cannot be used directly in Vbscripts. They must be connected by means of HMIRuntime Object with the variables of the script. Here you have a small exemple of VBS .

apl.jpg
 
Hi,
Thanx for ur reply. But how do I declare the following in WinCC

Private Type Index
Tag_Time1 As String * 8
End Type

Regards
Nil
 
Hi nil9178

Unfortunately I am not very old in VB.
But I didn't find the Type statement in WINCC VBScript. I see that your programm takes process values and puts them into a file. I remind you that without HMIRuntime you cannot interface the WINCC with the script. There is a link to an exemple of reading and writing files under WINCC VBScript.
http://support.automation.siemens.com/WW/llisapi.dll/850338?func=ll&objId=26710654&objAction=csView&nodeid0=10805591〈=en&siteid=cseus&aktprim=0&extranet=standard&viewreg=WW&load=treecontent

Wish you Luck
Teckhno
 

Similar Topics

Hi all, I really need help with this one. I'm at a complete loss... For months and months, I've had no problems with pressing a NEXT button to...
Replies
14
Views
1,384
I thought I was nearly finished on this TIA Portal/s7-1212C project (famous last words)... Up until now, I'd developed the PLC/HMI such that the...
Replies
10
Views
1,401
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...
Replies
4
Views
3,059
Hi my freinds. I Have a Bar Code reader which is connected to The PC Via USB Port and Operating System Reconize it as COM3. I want to display...
Replies
0
Views
1,473
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,808
Back
Top Bottom