Script in Wonderware Intouch...

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
I wrote a DataChange Script, datachange on the tag $Minute as test.

DIM Reportheader AS MESSAGE;
Reportheader = "Rapport Datum en Tijd: " + $DateString + ";" + $TimeString;

FileWriteMessage("C:\rapport_" + $DateString + ".csv", -1, Reportheader, 1);



No file is created. Any ideas ?

Thanks,
Kind regards,
Combo
 
DateString

The problem is DateString =>
8/02/2012 format in the filename is not allowed...
I'm searching for a solution.
 
it's prpbably the / signs

try breaking out the day, month, and year seperately and build your file name from there.
 
:)

I wrote it like this:
This works :)
Thanks.

Code:
DIM Record AS MESSAGE;
DIM Away AS REAL;
DIM RecAway AS MESSAGE;
DIM Dag AS MESSAGE;
DIM Maand AS MESSAGE;
DIM Jaar AS MESSAGE;

Dag = Text($Day,"#");
Maand = Text($Month,"#");
Jaar = Text($Year,"#");

Away = Totalizer - PREV_TOTAL;
PREV_TOTAL = Totalizer;

RecAway = Text(Away, "Geloosde dagtotaal: ###.## m³");

Record = $DateString + ";" + $TimeString + ";" + ";" + RecAway;

FileWriteMessage("C:\" +  Jaar + "_" + Maand + "_" + dag + "_Rapport" + ".csv", -1, Record, 1);
try breaking out the day, month, and year seperately and build your file name from there.
 

Similar Topics

Hello all, I have programmed a script in InTouch which will increment a value (lets say "tag1") from 0 to 10000 within a given interval. This...
Replies
18
Views
5,914
Dear Sirs, I’m writing a script for Intouch 10 that would generate the alarm in case PLC goes into STOP. Alarm is supposed to set when some value...
Replies
5
Views
23,473
Hi all, Currently delving into Wonderware/Aveva System Platform for the first time, and I'm trying to set up a script to automatically write to...
Replies
3
Views
928
I have an older application that seems to rely on ICTMOUSE.DLL. I cannot locate this script extension using good ole google ANYWHERE! Would anyone...
Replies
4
Views
1,985
Hey I was needing help with some alarm scripting in Woderware System Platform. What would be the best way to write a script to auto acknowledge...
Replies
2
Views
2,542
Back
Top Bottom