You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
Thread Tools Display Modes
Unread April 25th, 2009, 03:32 AM   #1
nil9178
Member
India

nil9178 is offline
 
nil9178's Avatar
 
Join Date: Jan 2009
Location: India
Posts: 10
VB Code in WinCC

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
Attached Files
File Type: pdf VB Code.pdf (12.2 KB, 449 views)
  Reply With Quote
Unread April 27th, 2009, 04:40 AM   #2
teckhno2002
Member
Romania

teckhno2002 is offline
 
Join Date: Nov 2005
Location: Craiova
Posts: 35
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.pd f”.
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 .
Attached Images
File Type: jpg apl.jpg (79.1 KB, 220 views)
  Reply With Quote
Unread April 27th, 2009, 06:02 AM   #3
nil9178
Member
India

nil9178 is offline
 
nil9178's Avatar
 
Join Date: Jan 2009
Location: India
Posts: 10
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
  Reply With Quote
Unread April 27th, 2009, 08:05 AM   #4
teckhno2002
Member
Romania

teckhno2002 is offline
 
Join Date: Nov 2005
Location: Craiova
Posts: 35
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&nod eid0=10805591〈=en&siteid=cseus&aktprim=0&extranet= standard&viewreg=WW&load=treecontent

Wish you Luck
Teckhno
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Citect Vs WinCC - Long Doug_Adam LIVE PLC Questions And Answers 22 October 3rd, 2014 12:56 PM
Orphaned PLC code twu026 LIVE PLC Questions And Answers 26 October 21st, 2008 09:28 AM
VB Code for developing SCADA saravanan_rock LIVE PLC Questions And Answers 6 October 28th, 2005 02:58 PM
Simulator, Simulation, Shadow Code Terry Woods LIVE PLC Questions And Answers 1 January 2nd, 2005 01:40 PM
Different WinCC and WinCC server option huynt LIVE PLC Questions And Answers 1 November 15th, 2004 09:13 AM


All times are GMT -5. The time now is 10:44 PM.


.