2-825
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
SD Memory Card Instructions
2
FileWrite
3 :
FileWrite_instance(
Execute :=TRUE,
FileID :=Fid,
WriteBuf:=OutDat[0],
Size :=UINT#4);
IF (FIleWrite_instance.Done=TRUE) THEN
Stage:=INT#4;
END_IF;
IF (FileWrite_instance.Error=TRUE) THEN
Stage:=INT#99;
END_IF;
4 :
FileClose_instance(
Execute:=TRUE,
FileID :=Fid);
IF (FileClose_instance.Done=TRUE) THEN
Operating:=FALSE;
END_IF;
IF (FileClose_instance.Error=TRUE) THEN
Stage:=INT#99;
END_IF;
99 :
Operating:=FALSE;
END_CASE;
END_IF;
// File ID
// File ID
// Write buffer
// Number of elements to write: 4 bytes
// Normal end
// Error end
// Normal end
// Error end
// Processing after error end.
// Close file.
// Write file.