background image

MC150

8.3.1 Protocol structure

Field

Value

Function

EOT

04 H

End Of Transmit

AD1

ascii

Unit address, MSByte

AD2

ascii

Unit address, LSByte

STX

02 H

Start of TeXt

C1,C2

ascii

Level code = 20 : Level 1

21: Level 2

C3,C4

ascii

Parameter code = 00…99

DATA

n byte 

ascii

Process data

ETX

03 H

End of TeXt

BCC

ascii

Block Check Character

ENQ

05 H

ENQuiry

NAK

15 H

Not Acknowledge

ACK

06 H

Acknowledge

NOTE:

BCC

 (block-check-character) is a character used 

for   check   the   correct   transmission.   It   is 
generated   by   XOR-ing   characters   C1,   C2,   C3, 
C4, DATA and ETX (including). If BCC < 20 Hex, 
BCC must be added up with 20 Hex, this avoids 
BCC   to   have   values   in   the   range   of   control 
character values.

DATA

  field   can   contain   any   number   of 

numerical characters, a sign and can be filled 
up with zeros. All DATA are sent in ASCII Code.

8.3.2 Send data from Master to Slave

PC 

 MC150

EOT AD1 AD2 STX

C1

C2

C3

C4

DATA

ETX BCC

When transmission is correct slave replies with ACK 
in any other cases with NAK.
MC150 

 PC

ACK

or

NAK

All parameters sent to the slave are stored in a data 
buffer.   Parameters   have   to   be   activated   by   the 
"activate parameter" command (see chap. 8.3.4).

Example:

Sets the parameter P01 = 100 (unit address = 11). 
PC 

 MC150

EOT AD1 AD2 STX C1 C2 C3

C4

ascii

1

1

2

1

0

1

Hex

04

31

31

02

32

31

30

31

DATA

ETX BCC

ascii

1

0

0

Hex

31 30 30

03

30

MC150 

 PC

ACK

ascii

Hex

06

8.3.3 Receive data from slave

PC 

 MC150

EOT AD1 AD2 STX C1 C2 C3 C4 ENQ

The correct reception of the string is acknowledged 
with the following message:
MC150 

 PC

STX C1 C2 C3 C4

DATA

ETX BCC

The reception of a incorrect string is followed by a 
negative acknowledgment like:
MC150 

 PC

STX

C1

C2

C3

C4

EOT

in any other cases with “NAK”:
MC150 

 PC

NAK

Example:

Read actual value (unit address = 11).
PC  MC150

EOT AD1 AD2 STX C1 C2 C3 C4 ENQ

ascii

1

1

2

1

9

9

Hex

04

31

31

02 32 31 39 39

05

If actual value = 12 acknowledge message will be:
MC150  PC

STX C1 C2 C3 C4

DATA

ETX BCC

ascii

2

1

9

9

1

2

Hex

02 32 31 39 39 31

32

03

23

MAN MC150 I_E 1.7

15

www.lika.it

www.lika.biz

Summary of Contents for MC150 series

Page 1: ...voltage power cables e g drive cables Install EMC filters on sensor power supply if needed Avoid mounting sensor near capacitive or inductive noise sources such as relays motors and switching power s...

Page 2: ...Pin 4 N max 100 mA Pin 5 P E 5 2 CON2 connections sensor input Pin Function 1 GND 2 24Vdc J1 left power supply 24Vdc 12Vdc J1 left power supply 115Vac 230Vac 5Vdc J1 right any power supply 3 A 4 A see...

Page 3: ...ss to setup menus Push F key to enter setup push to select Func 1 or Func 2 push E to scroll parameters push F to exit setup Admissible value range for each parameter is listed as follows min value ma...

Page 4: ...estore default value see chapter Default parameter 6 2 1 P07 Function of the push buttons 0 6 The function of the and the E buttons in operating mode can be selected 0 no functions 1 E will set actual...

Page 5: ...6 Output configuration 0 1 0 static output 1 with output dwell time see P17 and P18 P17 Output 1 dwell time 0 2 50 Enter output dwell time between 0 and 2 50 seconds P16 must be 1 Default value 0 P18...

Page 6: ...ion in sec P62 must be 1 Default value 1 00 P99 Actual value for RS232 99999 999999 This parameter shows the actual value for serial transmission via RS232 Interface if parameter P62 0 NOTE In order t...

Page 7: ...smission is correct slave replies with ACK in any other cases with NAK MC150 PC ACK or NAK All parameters sent to the slave are stored in a data buffer Parameters have to be activated by the activate...

Page 8: ...the following data string will be transmitted MC150 printer AD1 AD2 DATA LF CR xx xx xx 0A Hex 0D Hex The MC150 is sending its serial address followed by the actual value and Line Feed LF and Carriage...

Reviews: