![Balluff BIS Series Скачать руководство пользователя страница 48](http://html1.mh-extra.com/html/balluff/bis-series/bis-series_manual_3613914048.webp)
33
33
english
The BCC block check is formed as an EXOR of the serially transmitted binary characters of
the telegram block. Example: Read 128 bytes starting at address 13.
The command line without BCC is: 'L 0013 0128 10'
The BCC is formed:
'L
= 0100 1100
EXOR
0
= 0011 0000
EXOR
0
= 0011 0000
EXOR
1
= 0011 0001
EXOR
3
= 0011 0011
EXOR
0
= 0011 0000
EXOR
1
= 0011 0001
EXOR
2
= 0011 0010
EXOR
8
= 0011 1000
EXOR
1
= 0011 0001
EXOR
0'
= 0011 0000
EXOR
Block check result:
BCC
= 0100 0100
= 'D'
If necessary, termination using block check BCC can be replaced with a special ASCII charac-
ter. This is:
– Carriage Return 'CR'
Example:
Read 128 bytes starting at address 13.
The command line with 'CR" as a terminator is then: 'L 0013 0128 10 CR'
Variant for
terminating with 'CR'
instead of BCC
Function Description BIS M-81_ / PC
Reading / Writing over the serial interface
BCC Block Check
M-81_854610_E_0703.p65
34
english
34
Data within angle brackets are control characters.
Values inside apostrophes represent the respective character(s) in ASCII code.
1) The Quit command is not permitted at this point.
2) <ACK> '0' is returned as acknowledgement if there is no error, or <NAK> + 'Error No.' if an error occurs.
Read from data carrier with block size select
Write to data carrier with block size select
Task
Data flow
Com-
mand
Start
address of
first byte to
be set
Number of
bytes to be
sent
End Acknow-
ledge 2)
Start
trans-
mission
Data (from start
address to start
a no. of
bytes)
End
Acknow-
ledge 2)
Read
from host
system to
BIS
'L'
A3 A2 A1 A0
'0 0 0 0'
to
memory
capacity -1
L3 L2 L1 L0
'0 0 0 1'
to
memory
capacity
'1'
'0'
BCC
or
'CR'
<STX>
from BIS
to host
system
<ACK>'0'
or <NAK>
+ Error-No.
D1 D2 D3 ... Dn
BCC
or
'CR'
1)
Write
from host
system to
BIS
'P'
A3 A2 A1 A0
'0 0 0 0'
to
memory
capacity -1
L3 L2 L1 L0
'0 0 0 1'
to
memory
capacity
'1'
'0'
BCC
or
'CR'
<STX>
D1 D2 D3 ... Dn
BCC
or
'CR'
from BIS
to host
system
<ACK>'0'
or <NAK>
+ Error-No.
<ACK>'0'
or <NAK>
+ Error-No.
1)
1)
Telegram Structure and Examples
Reading / Writing over the serial interface