Write operation record to SD card
This FP instruction writes data recorded by the operation recording function of the configuration number specified by s1_nNumber to a CSV file, which is stored on the SD card in the OPH0–OPH7 folder (depending on the used configuration number). This folder is created automatically on the SD card.
Input
Specifies the configuration number in the range from 0–7
Specifies whether the records should be written in ascending or descending order of their time stamp:
FALSE: ascending
TRUE: descending
Specifies the language number defined in the “Operation recording” configuration:
0: language 0
1: language 1
Specifies the behavior after writing to the SD card:
FALSE: recorded data are not cleared
TRUE: recorded data are cleared
When this instruction is being executed, the system variable sys_bIsSDMemoryAccessActive is set to TRUE. When writing to SD card has finished, sys_bIsSDMemoryAccessActive is set to FALSE again.
When this instruction is being executed, the system variable sys_bIsSDMemoryAccessDone is set to FALSE. When the recorded data has been written to the SD card, sys_bIsSDMemoryAccessDone is set to TRUE again.
When this instruction has been successfully executed, the system variable sys_bIsSDMemoryAccessError is set to FALSE. When writing the recorded data to SD card was not successful, sys_bIsSDMemoryAccessError is set to TRUE.
Instead of using this instruction, you can also send the command from a web page created with Control Web Creator. Refer to the Web Server Function Manual for details.
if an unset configuration number has been specified.
if the specified configuration number is outside the permissible range.
if the area specified using the index modifier exceeds the limit.
if a value specified for a parameter is outside the permissible range.
if an unset configuration number has been specified.
if the specified configuration number is outside the permissible range.
if the area specified using the index modifier exceeds the limit.
if a value specified for a parameter is outside the permissible range.
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
bWrite: BOOL:=FALSE;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 7 ;
NETWORK_BODY
B(B_CONTACT,,bWrite,5,1,7,3,R);
B(B_F,FP_OPERATION_RECORDING_WRITE_TO_SD!,,14,0,34,7,,?DEN?Ds1_nNumber?Ds2_bTimeDescending?Ds3_nLanguage?Ds4_bClearRecordedDataAfterWriting?AENO);
B(B_VARIN,,0,12,2,14,4,);
B(B_VARIN,,FALSE,12,3,14,5,);
B(B_VARIN,,1,12,4,14,6,);
B(B_VARIN,,TRUE,12,5,14,7,);
L(1,0,1,7);
L(1,2,5,2);
L(7,2,14,2);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
END_NET_WORK
END_BODY
If DF(bWrite) Then
FP_OPERATION_RECORDING_WRITE_TO_SD(s1_nNumber := 0, s2_bTimeDescending := FALSE,
s3_nLanguage := 1, s4_bClearRecordedDataAfterWriting := TRUE);
End_if;