14.2.20 SFB 52 - RDREC - Reading record setThe SFB 52 RDREC interface is identical to the FB RDREC defined inthe standard "PROFIBUS Guideline PROFIBUS Communication andProxy Function Blocks according to IEC 61131-3".With the SFB 52 RDREC (read record) you can read a record set with the number INDEXfrom a module that has been addressed via ID. Specify the maximum number of bytesyou want to read in MLEN. The selected length of the target area RECORD should haveat least the length of MLEN bytes. TRUE on output parameter VALID verifies that therecord set has been successfully transferred into the target area RECORD. In this case,the output parameter LEN contains the length of the fetched data in bytes. The outputparameter ERROR indicates whether a record set transmission error has occurred. In thiscase, the output parameter STATUS contains the error information. System dependentthis block cannot be interrupted!The SFB 52 RDREC operates asynchronously, that is, processing covers multiple SFBcalls. Start the job by calling SFB 52 with REQ = 1. The job status is displayed via theoutput parameter BUSY and bytes 2 and 3 of output parameter STATUS. Here, theSTATUS bytes 2 and 3 correspond with the output parameter RET_VAL of the asynchro-nously operating SFCs (see also meaning of REQ, RET_VAL and BUSY with Asynchro-nously Operating SFCs). Record set transmission is completed when the output param-eter BUSY = FALSE.Parameter Declaration Data type Memory block DescriptionREQ INPUT BOOL I, Q, M, D , L,constantREQ = 1:Transfer record setID INPUT DWORD I, Q, M, D, L,constantLogical address of the moduleFor an output module, bit 15 must be set(e.g. for address 5: ID: DW = 8005h).For a combination module, the smaller ofthe two addresses should be specified.INDEX INPUT INT I, Q, M, D, L,constantRecord set numberMLEN INPUT INT I, Q, M, D, L,constantMaximum length in bytes of the record setinformation to be fetchedVALID OUTPUT BOOL I, Q, M, D, L New record set was received and validBUSY OUTPUT BOOL I, Q, M, D, L BUSY = 1: The read process is not yet ter-minated.ERROR OUTPUT BOOL I, Q, M, D, L ERROR = 1: A read error has occurred.STATUS OUTPUT DWORD I, Q, M, D, L Call ID (bytes 2 and 3) or error code.LEN OUTPUT INT I, Q, M, D, L Length of the fetched record set informa-tion.RECORD IN_OUT ANY I, Q, M, D, L Target area for the fetched record set.DescriptionOperating principleParametersVIPA SPEED7 Integrated StandardSystem Function Blocks > SFB 52 - RDREC - Reading record setHB00 | OPL_SP7 | Operation list | en | 18-30 775