DRV_UPLD: Upload from SERCOSdrive
(Original Document)
Function Description
This function block uploads information from a SERCOS drive to the PLC.
Additional parameters EN and ENO may be configured.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL DRV_UPLD_Instance (S:=UPLOAD_SA1, R:=Reset,
    SA_ID:=SA1, MAX_REGS:=75, MFB:=MFB, REG_CNT=>TOTAL_REGS,
    DATA_BLK=>DataUp)
Representation in ST
Representation
DRV_UPLD_Instance (S:=UPLOAD_SA1, R:=Reset,
    SA_ID:=SA1, MAX_REGS:=75, MFB:=MFB, REG_CNT=>TOTAL_REGS,
    DATA_BLK=>DataUp) ;
Parameter Description
Description of input parameters:
Parameter
Data Type
Meaning
S
Rising input starts the upload from the drive.
R
BOOL
Resets block and prevents upload (It halts the upload at the end of the current step).
SA_ID
Axis ID for the SercosAxis to be uploaded.
MAX_REGS
Maximum number of registers that may be uploaded (Each IDN consumes 3 registers plus one for overhead. If absent or zero, a default maximum of 601 registers is used.).
Description of in-output parameters:
Parameter
Data Type
Meaning
MFB
Must be connected to the MMFStart block of 200 registers.
Description of output parameters:
Parameter
Data Type
Meaning
Q
BOOL
True when upload has completed (reset by R).
ERROR
INT
First error code that is generated during configuration.
REG_CNT
UDINT
Number of Registers actually used to hold uploaded data.
DATA_BLK
ARRAY [4 .. n] of UDINT
Array for storage of uploaded data (n must be ≥ number of IDNs uploaded * 3 + 1).
Example
When UPLOAD_SA1 turns on, the drive parameters are uploaded from SA1 and placed in the DataUp Array that is assigned at output pin DATA_BLK. The first register in the data block has the number (n) of IDNs that were uploaded. The next (n) registers have the IDN numbers. Following the IDN numbers is the IDN data. The data section of the register data block is in a REAL format and the data contained in these registers are raw (unconverted) values.
The length of the register data block is: Number of IDNs uploaded * 3 + 1
Runtime Errors
For a list of all error codes and values of the block, refer to Tables of Error Codes for the Motion Library.