'ADIM 1 Dim fileName, folderName, fileLocation fileName = Year(Now()) & "_" & Month(Now()) & "_" & Day(Now()) & ".csv" folderName = "\Storage Card USB\Logs\" fileLocation = folderName & filename 'ADIM2 Dim fso Set fso = CreateObject("FileCtl.FileSystem") If (fso.Dir(folderName)) = "" Then fso.MkDir folderName End If If Err.Number 0 Then ShowSystemAlarm "Error # " & CStr(Err.Number)& " " & Err.Description Err.Clear End If 'ADIM3 dim fctl Set fctl = CreateObject("FileCtl.File") fctl.Open fileLocation, 8 If Err.Number 0 Then ShowSystemAlarm "Error # " & CStr(Err.Number)& " " & Err.Description Err.Clear End If 'ADIM4 Dim currentPosition, nextPosition currentPosition = fctl.Loc nextPosition = fctl.Seek If currentPosition = 1 And nextPosition = 1 Then fctl.LinePrint "Time, Data Point 1, Data Point 2, Data Point 3, Data Point 4, Data Point 5" End If 'ADIM5 currentTime = Hour(Time) & ":" & Minute(Time) & ":" & Second(Time) dataValues = currentTime & _ SmartTags("DataPoint1") & ", " & _ SmartTags("DataPoint2") & ", " & _ SmartTags("DataPoint3") & ", " & _ SmartTags("DataPoint4") & ", " & _ SmartTags("DataPoint5") fctl.LinePrint dataValues fctl.Close
@airtonchinaglia8565
Жыл бұрын
Very good. For me to record a change in a field value that was performed by an operator, how could I do it? For example, the operator changed a speed on the HMI, how can I record this change?
@umitkalender4776
Жыл бұрын
Hello Airton, you should write a script in IO field or you can use Audit option.
@airtonchinaglia8565
Жыл бұрын
@@umitkalender4776 Thanks for the feedback! But, would you have an example that I could use to create my Scrip? I will be very grateful for the help.
@InfeedPC
Жыл бұрын
Merhaba, bu kaydı pdf olarak nasıl kayıt edebiliriz. trend görünümünü pdf olarak screenshot şeklinde kayıt ettirebilir miyiz?
@iqsyb9081
Жыл бұрын
hello! When using the script I get the following problem. When I press the button (on release) on the HMI panel, I get asked to fill in a username and pasword? As far as I know, I need a logon username and pasword but dont know how to set this up... I am trying to transfer the data to my USB stick that is inserted in my USB port of the HMI panel (tp1500 comfort) Thanks!
@aliosmantopkan8339
3 жыл бұрын
EMEĞİNE SAĞLIK EXCELLE İKİ TARİH ve ZAMAN ARALIĞINDA YANİ GEÇMİŞ RAPOR NASIL ALABİLİRİZ?
@serbaotomasyon9092
2 жыл бұрын
reçetenin status durumunu script yazarak nasıl alabiliriz?
@oguzhancakmak-tn4qf
10 ай бұрын
HMI tarafı olmadan ve siemens sitesinden degilde direkt C diskne CSV dosyasını kaydetmek istiyorum yardımcı olur musunuz?
@umitkalender4776
10 ай бұрын
yazabilirsiniz. Dosya path kısmını o şekilde tanımlarsanız olur.
@ramazancan507
Жыл бұрын
Merhaba, csv dosyasına ne zaman veri satırını ekleyeceğimizi nasıl belirliyoruz
@umitkalender4776
Жыл бұрын
Merhaba, burada yazdığımız scriptleri kullanmanıza bağlı aslında. Ben bir butona koydum. O butona basınca kayıt ediyor. Eğerki bir taska bağlarsanız da o zaman yapar.
@spk7054
10 ай бұрын
how to logging tag type real data ?
@aliosmantopkan8339
3 жыл бұрын
iyi günler comfort hmı den yerel ağ ve ya dışarıdan pc SQL servere veri gönderebilirmiyiz teşekkür ederiz
@umitkalender4776
2 жыл бұрын
VBA Scriptler kullnabilirsiniz. support.industry.siemens.com/cs/de/en/view/61883659 . S7 Serisi PLClerde SQL ile ilgili bir kütüphane de mevcut. Bunuda kullnabilirsiniz.
@aliosmantopkan8339
3 жыл бұрын
data logger leri ayrı excell sayfalarına alabilirmiyiz?ve nasıl yapabiliriz?
@umitkalender4776
3 жыл бұрын
Malesef dosya CSV olduğundan oluşturduktan sonra sizin yapmanız lazım
@aliosmantopkan8339
3 жыл бұрын
Scriptleri paylaşabilirmisiniz
@umitkalender4776
Жыл бұрын
Yorumlar kısmında paylaşılmıştır.
@umitkalender4776
3 жыл бұрын
'ADIM 1 Dim fileName, folderName, fileLocation fileName = Year(Now()) & "_" & Month(Now()) & "_" & Day(Now()) & ".csv" folderName = "\Storage Card USB\Logs\" fileLocation = folderName & filename 'ADIM2 Dim fso Set fso = CreateObject("FileCtl.FileSystem") If (fso.Dir(folderName)) = "" Then fso.MkDir folderName End If If Err.Number 0 Then ShowSystemAlarm "Error # " & CStr(Err.Number)& " " & Err.Description Err.Clear End If 'ADIM3 dim fctl Set fctl = CreateObject("FileCtl.File") fctl.Open fileLocation, 8 If Err.Number 0 Then ShowSystemAlarm "Error # " & CStr(Err.Number)& " " & Err.Description Err.Clear End If 'ADIM4 Dim currentPosition, nextPosition currentPosition = fctl.Loc nextPosition = fctl.Seek If currentPosition = 1 And nextPosition = 1 Then fctl.LinePrint "Time, Data Point 1, Data Point 2, Data Point 3, Data Point 4, Data Point 5" End If 'ADIM5 currentTime = Hour(Time) & ":" & Minute(Time) & ":" & Second(Time) dataValues = currentTime & _ SmartTags("DataPoint1") & ", " & _ SmartTags("DataPoint2") & ", " & _ SmartTags("DataPoint3") & ", " & _ SmartTags("DataPoint4") & ", " & _ SmartTags("DataPoint5") fctl.LinePrint dataValues fctl.Close
Пікірлер: 21