6
6-22
FM 351 Positioning Function Module
EWA 4NEB 720 6001-02
The following shows you a calling example for the function FC REFPT.
STL Explanation
A Write fct_R; // No new function start.
JC REFP; // Call FC REFPT.
L L#1000;
T DB_ABS.SETTING_REFERENCE_POINT; // Enter reference point
// in channel DB.
S Start_write fct; // Set start parameters.
S Write fct_R; // Write job being processed.
REFP: CALL REFPT( // CALL FC REFPT.
DB_NO := DB_ABS,
RET_VAL := Error code_write fct,
DATA_ERR := Data error,
JP_REFPT := DUE_S_L,
IN_REFPT := Start_write fct);
O Start_write fct; // Start bit is still set
O DUE_S_L; // or write funct. still runs.
JC NWE;
R Write fct_L; // Write funct. terminated.
ON BR; // Communication error.
O Data error; // Data error.
S Disp_err_write fct; // Display error dur. write fnct.
NWE:
The table shows the symbols for the calling example.
Symbols Absolute
(example)
Comment
Start_write function
M 31.2
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Start parameter for write function.
Disp_err_write fct
M 13.3
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Display “Error during write function”.
Data error
M 31.4
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Data error.
ÁÁÁÁÁÁÁÁ
DB_ABS
ÁÁÁÁ
DB 1
ÁÁÁÁÁÁÁÁÁÁÁÁ
Channel DB for FM 351.
ÁÁÁÁÁÁÁÁ
DB_ABS.SETTING_REF-
ERENCE_POINT
ÁÁÁÁ
DB1.DBD56
ÁÁÁÁÁÁÁÁÁÁÁÁ
Reference point coordinates.
DUE_S_L
M 31.3
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Data transfer for write function running.
Error code_write fct
MW 34
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
RET_VAL of the SFC WR_REC.
Write fct_L
M 31.0
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Write function running.
REFPT
FC 1
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
FC for setting reference point.
Calling Example
Symbols
Programming the FM 351