0% found this document useful (0 votes)
19 views1 page

cp341 Empfang Ascii e

Cp

Uploaded by

dndndndn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

cp341 Empfang Ascii e

Cp

Uploaded by

dndndndn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

// ========== Receive =====================================

L 1984 // Hw-Adr CP440


T MW 12

CALL FB 7 , DB7 // receive data


EN_R :=TRUE // Enable Receive, allways active
R :=FALSE // command 'reset', noot used
LADDR :=MW12 // hardware addresse cp341
DB_NO :=60 // db-no araay of received data local
DBB_NO :=20 // byte no araay of received data local (start address)
L_TYP :=
L_NO :=
L_OFFSET:=
L_CF_BYT:=
L_CF_BIT:=
NDR :=M20.1 // 'new data received'
ERROR :=M20.2 // 'communication error detected'
LEN :=MW28 // length of received telegram (in byte)
STATUS :=MW26 // module status cp

// note
// L_TYP := // used only with RK512
// L_NO := // used only with RK512
// L_OFFSET:= // used only with RK512
// L_CF_BYT:= // used only with RK512
// L_CF_BIT:= // used only with RK512

// ========== evaluation ==================================

AN M 20.1 // no data received ?


JC NDDR

SET
S M 20.6 // new telegram received
L MW 28 // store data length
T MW 80

L DB60.DBD 116 // read data and copy to user array


T DB80.DBD 0
L DB60.DBD 120
T DB80.DBD 4

// etc
// etc

NDDR: AN M 20.2 // no communication error ?


JC NERR

L MW 26 // store status in case of error


T MW 82

NERR: BE

// note:
// M 20.6 'new telegramm received' has to be reset by user after extracting the
// data out of the 'array of received data'

You might also like