Anvesh Posted May 29, 2016 Report Posted May 29, 2016 I want to do a printing application from TP1200 comfort panel HMI. For online printing of data, many suggested to go for VB script. I dont know scripting. Can anyone help me in this regard. Quote
Anvesh Posted February 9, 2017 Author Report Posted February 9, 2017 Hi... Please find the example VBS for the printing application in Siemens CE terminals for reference... Dim f Dim path Dim mode mode=8 Dim life life=0 Dim hr,hrm Dim min,minm Dim sec,secm hr=Hex(SmartTags("Act_Hour")) min= Hex(SmartTags("Act_Minute")) sec= Hex(SmartTags("Act_Sec")) If hr<10 Then hrm=0&hr Else hrm=hr End If If min<10 Then minm=0&min Else minm=min End If If sec<10 Then secm=0&sec Else secm=sec End If path="\Flash\print.csv" Set f=CreateObject("FileCtl.file") f.Open path,mode f.LinePrint(" " & "EZAMPLE") f.LinePrint(" " & "COMPANY") Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.