N 153, Code configuration of the transmitted device type, Example 3: read serial number – Baumer N 153 User Manual
Page 24

N 153
www.baumer.com
24
Example 1 : Read version number
SOH
Adr
Cmd
Data
EOT
CRC
Transmission
01h
20h
58h
56h
04h
D8h
SOH
Adr
Cmd
Data
Version number = 2.00
EOT
CRC
Response
01h
20h
58h
56h
20h
32h
30h
30h
04h
FAh
Beispiel 2: Read device type (device type = N 153; firmware = 01)
SOH
Adr
Cmd
Data
EOT
CRC
Transmission
01h
20h
58h
54h
04h
DCh
SOH
Adr
Cmd
Data
Type
EOT
CRC
Response
01h
20h
58h
54h
93h
81h
04h
26h
Code configuration of the transmitted device type:
1 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 = 93 81 hex
┬ ──────┬────── ┬ ───────┬─────
│ │ │ └─────── software no. 01h = firmware 01
│ │ └──────────────── permanent 1
│ └────────────────────────── device type 13h = N 153
└────────────────────────────────── permanent 1
Example 3: Read serial number
SOH
Adr
Cmd
Data
EOT
CRC
Transmission
01h
20h
58h
53h
04h
D2h
SOH
Adr
Cmd Data
Coded serial number = 07090EA4
EOT
CRC
Response
01h
20h
58h
53h
30h
37h
30h
39h
30h
3Eh
3Ah
34h
04h
20h
Code configuration of the transmitted serial number:
The Low-Nibble (lower 4 bits of a byte) of the 8 data bits received equal together a 4 byte value comprising the
serial number.
The serial number is composed by date and time of production. Since also the seconds are coded and by as-
signing only one number per second the serial number is unique.
Example: Serial number for 01.06.2005 16:58:36 = 15 83 0E A4 hex
X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X bit position
J J J J J J M M M M T T T T T h h h h h m m m m m m s s s s s s content
0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 Example = 15 83 0E A4 hex
─────┬───── ────┬──── ────┬──── ─────┬───── ──────┬────── ─────┬─────
│ │ │ │ │ └─────── seconds
10
0100 = 24h = 36d
│ │ │ │ └──────────────────── minutes
11
1010 = 3Ah = 58d
│ │ │ └───────────────────────────────── hours
1
0000 = 10h = 16d
│ │ └────────────────────────────────────────────
day
0
0001 = 01h = 01d
│ └────────────────────────────────────────────────────── month
0110 = 06h = 06d
└─────────────────────────────────────────────────────────────────
year
00
0101 = 05h = 05d
│
01.06.05 16:58:36 <──────┘