Append Record To Citect Device

ZhongJiwei

Member
Join Date
Nov 2013
Location
Singapore
Posts
18
Hello
i want to append a record to a text format device of Citect, but seems that it overwrite the record every time when open the device, i think it comes from the function DevAppend Use wrongly, any one can correct me, many thanks.

FUNCTION HeaterWrite(STRING TagName)
INT hSysLog;
INT nError;
INT ivar;
INT iResult;
INT iRecord;
hSysLog = DevOpen("SysLog",0);
DevAppend(hSysLog);
DevWriteLn(hSysLog,TagName);
ErrSet(1);
//iResult = ivar/0;
DevWriteLn(hSysLog,"data to write");
nError = IsError();
ErrSet(0);
IF nError <>0 THEN
Message("Error", "Failed to write to device.Error" +IntToStr(nError),16);
END
DevClose(hSysLog);
END
 

Similar Topics

I am a beginner with RS Logix and this is kind of a noob question. Every time someone uses my machine, my PLC program will have new data in 3...
Replies
1
Views
903
four modbus registers make up a single DINT Int A Int B Int C Int D Lets day A = 1 Lets say B = 34 Lets say C = 56 Lets say D = 98 this...
Replies
16
Views
3,747
Hi, is there any way to know in the PLC when turns power off and back on again. Because I need to reset a N7 register back to zero when that...
Replies
3
Views
1,739
OK this problem is taking too much time... I have a 1782-JDC RS-232/Devicenet converter which is feeding ASCII strings to a Keyence Micrometer...
Replies
2
Views
2,075
Good People of PLCTALK. I am trying to understand the pass-fail on one of our product lines. I was able to record the Cognex images on the...
Replies
2
Views
230
Back
Top Bottom