Manual VIPA System 200V
Chapter 6 CP 240 - M-Bus
HB97E - CP - Rev. 11/30
6-15
The PLC application has the following structure:
CALL FC
9
//SYNCHRON_RESET
ADR
:=256
//Module address
TIMER_NR :=T8
//Delay time for CP
ANL
:=M3.0
//CPU start complete
NULL
:=M3.1
//Internal flag
RESET
:=M3.2
//Initialize reset at CP
STEUERB_S:=DB10.DBB260
//Control bits for Send
STEUERB_R:=DB11.DBB108
//Control bits for Receive
U
M
3.0
//as long as Synchron active
BEB
//no processing of CP
CALL FC
100
//M-Bus
communication
Adr_CP
:=256
//Module address
Baud
:=MB100
//Transfer baud rate
C_Field
:=MB101
//Transfer value C field
A_Field
:=MB102
//Transfer value A field
CI_Field :=MB103
//Transfer value CI field
Data
:=MB104
//Transfer telegram length
RET_VAL
:=MW106
//Return value
Senden_Start:=M99.0
//Start order
U M
99.0
//Order
running
BEB
L
MW
106
//Return of send function
L
W#16#2000
//Ready without error
==I
SPB copy
NOP 0
//Error
evaluation
BEA
copy:
L
0
//Delete ready without error
T MW
106
L MB
102
//Participant
address
L
20
//Basic No. for the data-DBs
+I
T
MW
50
//Data block no. for data storage
L 0
//1
st
byte to copy
T
MW
188
//Predefine byte counter
loo:
L
MW
188
//Load byte counter
SLW
3
//x8 is byte address in DB
T MD
184
//Save
address
AUF
DB 11
//Open
receive
buffer
L
DBB
[MD 184]
//Value from receive buffer
AUF DB
[MW
50]
T
DBB
[MD 184]
//Store in data-DB
L MW
188
+1
//Increase
byte
number
T MW
188
L
DB11.DBW 102
//Last byte to copy
<=I
//not all bytes copied yet
SPB loo
//then
resume
UN M
3.0
S
M
3.0
//Set start-up ID
PLC program
OB1
OB 100
Summary of Contents for CP 240 RS232
Page 1: ...Manual VIPA System 200V CP Order No VIPA HB97E_CP Rev 11 30...
Page 2: ...L...
Page 14: ...Chapter 1 Basics Manual VIPA System 200V 1 6 HB97E CP Rev 11 30...
Page 126: ...Chapter 5 CP 240 EnOcean Manual VIPA System 200V 5 32 HB97E CP Rev 11 30...
Page 144: ...Chapter 6 CP 240 M Bus Manual VIPA System 200V 6 18 HB97E CP Rev 11 30...
Page 148: ...Index Manual VIPA System 200V A 4 HB97E CP Rev 11 30 M Stich...