FP_LOGTRACE_START

Start data recording

This FP instruction requests to start the data recording operation (“Logging”/“Trace”) for the number specified by n_Number.

Parameters

Input

n_Number (WORD, INT, UINT)

Data recording number 0–15

e.g. SYS_LOG0SYS_LOG15

Remarks

  • For starting the data recording operation, request the start after confirming that the data recording done flag (sys_bIsLog0DataRecordingDone, sys_bIsLog1DataRecordingDone, ...) has turned to TRUE.

  • It takes a few milliseconds to a few seconds to start the data recording operation.

  • There is no problem if a start request is made while the data recording operation is being started or in startup processing.

  • Instead of using the instruction FP_LOGTRACE_START, you can also start the data recording operation automatically by checking “Start when changing to RUN mode” in the “Data recording” window.

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if a request is made to stop LOGn during startup processing

  • if the area specified using the index modifier exceeds the limit.

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if a request is made to stop LOGn during startup processing

  • if the area specified using the index modifier exceeds the limit.

sys_BlsLog0OperationErrorsys_BlsLog15OperationError
  • if a request is made to stop LOGn during startup processing

  • if the area specified using the index modifier exceeds the limit.

Example

POU header

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
		bDataRecordingLog0Start: BOOL:=FALSE;
		bDataRecordingLog0TakeSample: BOOL:=FALSE;
		bDataRecordingLog0Stop: BOOL:=FALSE;
		iDataRecordingValue1: INT:=0;
		iDataRecordingValue2: INT:=0;
		iDataRecordingValue3: INT:=0;
		iDataRecordingValue4: INT:=0;
		iDataRecordingValue5: INT:=0;
	END_VAR

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 4 ;
        NETWORK_BODY
B(B_CONTACT,,bDataRecordingLog0Start,7,1,9,3,R);
B(B_F,FP_LOGTRACE_START!,,20,0,32,4,,?DEN?Dn_Number?AENO);
B(B_VARIN,,SYS_LOG0,18,2,20,4,);
L(1,2,7,2);
L(9,2,20,2);
L(1,0,1,4);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 4 ;
        NETWORK_BODY
B(B_F,FP_LOGTRACE_STOP!,,20,0,31,4,,?DEN?Dn_Number?AENO);
B(B_VARIN,,SYS_LOG0,18,2,20,4,);
B(B_CONTACT,,bDataRecordingLog0Stop,7,1,9,3,R);
L(1,2,7,2);
L(9,2,20,2);
L(1,0,1,4);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 4 ;
        NETWORK_BODY
B(B_F,FP_LOGTRACE_SAMPLE!,,20,0,32,4,,?DEN?Dn_Number?AENO);
B(B_VARIN,,SYS_LOG0,18,2,20,4,);
B(B_CONTACT,,bDataRecordingLog0TakeSample,7,1,9,3,);
L(1,2,7,2);
L(9,2,20,2);
L(1,0,1,4);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF DF(bDataRecordingLog0Start) THEN
    FP_LOGTRACE_START(SYS_LOG0);
END_IF;
IF DF(bDataRecordingLog0Stop) THEN
    FP_LOGTRACE_STOP(SYS_LOG0);
END_IF;
IF (bDataRecordingLog0TakeSample) THEN
    FP_LOGTRACE_SAMPLE(SYS_LOG0);
END_IF;

Modified on: 2019-12-14Feedback on this pagePanasonic hotline