KM002102G MDW Serial Protocol From Version 6 06 Xx

Embed Size (px)

DESCRIPTION

клавиатура

Citation preview

  • Service Book KM002102G

    version 6.06.xxSerial protocol for MDW

  • PIOVAN adopts a policy of on-going development.

    With the exception of information required by law, the general information (or diagrams) featured in this document may depict models and/or versions different to the one you have purchased. This will in no way alter the validity or applicability of the information provided.

  • 1. MODBUS PROTOCOL FOR PIOVAN EQUIPMENT (MDW)1.1. Electronic interfaceThe electronic interface installed on the Piovan Micro Processor controller is RS485. The serial communication line can linkup to 31 slaves. The wiring between the serial communication line and the Piovan Micro Processor controller is donethrough screw terminals.

    1.2. Network configurationMOD-BUS protocol is suitable for a 1-master / 255-slave network. The number of possible slaves can be limited by the elec-tronic interface used.The Piovan Micro Processor controller works as a slave.

    1.3. Transmission formatThis protocol uses a binary method, composed as follows:1 start bit, 8 data bits, 1 parity bit (optional), 1 stop bit.The communication speed can be selected from among 1200, 2400, 4800, 9600 and 19200 baud.

    1.4. Communication procedureThe communication can be started only from the master unit. The slave unit can transmit only after a query from the master.The general format of the master / slave transmission is the following:

    The slave recognizes the transmission of a query frame when the time between two characters is greater than 3 T.U.(T.U. = time unit = necessary time to transmit one character).

    1.5. Function code 1 and 2: reading of "n" bitThese function codes are used by the master unit to request the value of a certain number of bits, that represent the statusof the slave unit.

    The slave answers the following:

    Range ByteSlave address 1

    Function code 1

    Data n

    Error check (crcl6) 2

    Range Byte

    Slave address (1-255) 1

    Function code (01-02) 1

    Bit starting address (high byte) 1

    Bit starting address (low byte) 1

    Number of bits (high byte) 1

    Number of bits (low byte) 1

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (01-02) 1

    Byte count 1

    Data n

    Error check (crcl6) 21 - G ENGLISH

  • The "data" field indicates the bit requested: the bit with lower address is the bit 0 of the first byte, the next is the bit 1 andso on.The possible bit necessary to complete the last byte must be put at 0.

    1.6. Function code 3 and 4: reading of n wordThese function codes are used by the master unit to read a group of words (16 bit) which contains the value of the variableof the slave unit.

    The slave answers the following:

    The "data" field indicates the requested words in the following format: high byte of the first word, low byte of the first word,high byte of the second word, and so on.For addresses not implemented, the "data" field will show 8000h.

    1.7. Function code 5: bit writingBy using this command, the master unit can change the status of one bit of the slave unit.

    The slave answers the following:

    "Data" field = 0 to reset the bit

    Range ByteSlave address (1-255) 1

    Function code (03-04) 1

    Word starting address (high byte) 1

    Word starting address (low byte) 1

    Number of word (high byte) 1

    Number of word (low byte) 1

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (03-04) 1

    Byte count 1

    Data n

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (05) 1

    Bit address (high byte) 1

    Bit address (low byte) 1

    Data 2

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (05) 1

    Bit address (high byte) 1

    Bit address (10w byte) 1

    Data 2

    Error check (crci6) 22 - GENGLISH

    = FF00h to set the bit

  • 1.8. Function code 6: word writingBy using this command, the master unit can change the status of one word of the slave unit.

    The slave answers the following:

    1.9. Function code 15: writing of "n" bitBy using this command, the master unit can change the status of one or more bits of the slave unit.

    The slave answers the following:

    Range ByteSlave address (1-255) 1

    Function code (06) 1

    Word address (high byte) 1

    Word address (low byte) 1

    Data 2

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (06) 1

    Word address (high byte) 1

    Word address (low byte) 1

    Data 2

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (i5) 1

    Bit starting address (high byte) 1

    Bit starting address (low byte) 1

    Number of bits (high byte) 1

    Number of bits (low byte) 1

    Number of data bytes 1

    Data n

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (15) 1

    Bit starting address (high byte) 1

    Bit starting address (low byte) 1

    Number of bits (high byte) 1

    Number of bits (low byte) 1

    Error check (crc16) 23 - G ENGLISH

  • 1.10. Function code 16: writing of n wordBy using this command, the master unit can change the state of one or more words of the slave unit.

    The slave answers the following:

    NOTES: "Broadcast" address

    When using writing codes 5 and 6, the address 0 of the slave units is allowed. In this case all the slavesconnected accept the command but do not give any answer.

    Words formatEvery time the information transfer is made by using 2 byte (1 word of 16 bit), the first byte transmitted isthe most significant. For the negative numbers is used the "two complement" format.

    Error replyThe slave unit can find out errors in the master query.If the "error check" is incorrect or the function code is not implemented, the slave does not send any an-swer to the master.If other errors are detected on query frame, the slave replies forcing at "1" the bit 7 of the byte "Functioncode" and gives an error code.

    Error reply

    List of error code

    Range ByteSlave address (1-255) 1

    Function code (16) 1

    Word starting address (high byte) 1

    Word starting address (low byte) 1

    Number of words (high byte) 1

    Number of words (low byte) 1

    Number of data bytes 1

    Data n

    Error check (crc16) 2

    Range ByteSlave address (1-255) 1

    Function code (16) 1

    Word starting address (high byte) 1

    Word starting address (low byte) 1

    Number of words (high byte) 1

    Number of words (low byte) 1

    Error check (crc16) 2

    Range ByteSlave address 1

    Function code (+80h) 1

    Error code 1

    Error check (crc16) 2

    Meaning Error #.illegal data address 2

    illegal data value 3

    illegal number of data 94 - GENGLISH

    the bit or word indicated cannot be modified 10

  • Answer timeThe slave replies from 2 ms to 700 ms after the end of a query. (That is detected counting the receivedbytes).

    Decimal digits/ negative numbersIn case of transmission of decimal digits and/or negative numbers, please see example.Example:Number to transmit 205.6 -----------> 2056 is transmittedNumber to transmit -12.50 ----------> -1250 is transmitted

    WORDSAddress Description Type Digits M.U. Notes

    2,7 COMMENT OF RECIPE IN PROGRESS R/W

    9 working SET of station 1 R xx,x %

    10 working SET of station 2 R/W xx,x %

    11 working SET of station 3 R/W xx,x %

    12 working SET of station 4 R/W xx,x %

    13 working SET of station 5 R/W xx,x %

    14 working SET of station 6 R/W xx,x %

    15 Alarm mode and calculation type of station 1 R/W x 1

    16 Alarm mode and calculation type of station 2 R/W x 2

    17 Alarm mode and calculation type of station 3 R/W x 3

    18 Alarm mode and calculation type of station 4 R/W x 4

    19 Alarm mode and calculation type of station 5 R/W x 4

    20 Alarm mode and calculation type of station 6 R/W x 4

    21 number of process recipe turbo-cycles R/W

    22 rotation time of process recipe mixer R/W xxx s

    23 weight of process batch R/W xx.x kg**

    24,25 weight of process mixture R/W xxxxx hg

    26 % added to station 2 for slr1 R/W xx.x

    27 % added to station 2 for slr2 R/W xx.x

    28 maximum instantaneous total production R xxxx kg/h

    29 mdw controls R*/W 8

    30 mdw controls R*/W 9

    50 mdw state R 10

    51 1..16 alarms R 11

    52 17..32 alarms R 12

    53 33..48 alarms R 13

    54 state of digital inputs R 15

    55 state of digital outputs R 16

    56 or alarms R 17

    63,64 Weight of material dosed on station 1 R xxxxx,x g

    65,66 Weight of material dosed on station 2 R xxxxx,x g

    67,68 Weight of material dosed on station 3 R xxxxx,x g

    69,70 Weight of material dosed on station 4 R xxxxx,x g

    71,72 Weight of material dosed on station 5 R xxxxx,x g

    73,74 Weight of material dosed on station 6 R xxxxx,x g

    75 49..56 alarms R 31

    100 remote flag R/W 75 - G ENGLISH

    * from version 6.06.09** in g from version 6.06.06

  • 400,401 station 1 totalizator R xxxxx,xxx kg 36

    402,403 station 2 totalizator R xxxxx,xxx kg 36

    404,405 station 3 totalizator R xxxxx,xxx kg 36

    406,407 station 4 totalizator R xxxxx,xxx kg 36

    408,409 station 5 totalizator R xxxxx,xxx kg 36

    410,411 station 6 totalizator R xxxxx,xxx kg 36

    412,413 balance weight value R xxxxx,x g

    414 % of material dosed on station 1 R xx,x

    415 % of material dosed on station 2 R xx,x

    416 % of material dosed on station 3 R xx,x

    417 % of material dosed on station 4 R xx,x

    418 % of material dosed on station 5 R xx,x

    419 % of material dosed on station 6 R xx,x

    456,457 Weight of material to dose on station 1 R xxxxx,x g

    458,459 Weight of material to dose on station 2 R xxxxx,x g

    460,461 Weight of material to dose on station 3 R xxxxx,x g

    462,463 Weight of material to dose on station 4 R xxxxx,x g

    464,465 Weight of material to dose on station 5 R xxxxx,x g

    466,467 Weight of material to dose on station 6 R xxxxx,x g

    468,469 number of produced batches R xxxxxxxx

    Address Description Type Digits M.U. Notes6 - GENGLISH

  • NOTES

    Note 1 Variable Description

    1. [ON] read-only alarm

    2. [ON]+[STOP] alarm and doser stop

    Note 2.1 Variable Description

    From v 6.06.03: IF THE EXCHANGING FLAG OF STATIONS 2, 3 IS OFF (note 30)

    1. [ON][TOT] read-only alarm and percentage referring to batch

    2. [ON]+[STOP][TOT] alarm and doser stop and percentage referring to batch

    3. [ON]+[2->1][TOT] alarm, dosage trans. to station 1 and percentage referring to batch

    4. NOT APPLICABLE

    5. [ON][1] read-only alarm and percentage referring to station 1

    6. [ON]+[STOP][1] alarm and doser stop and percentage referring to station 1

    7. [ON]+[2->1][1] alarm, dosage trans. to station 1 and percentage referring to station 1

    Note 2.2 Variable Description

    From v 6.06.03: IF THE EXCHANGING FLAG OF STATIONS 2, 3 IS ON (note 30)

    1. [ON][TOT] read-only alarm and percentage referring to batch

    2. [ON]+[STOP][TOT] alarm and doser stop and percentage referring to batch

    3. [ON]+[2->1][TOT] alarm, dosage trans. to station 1 and percentage referring to batch

    4.[ON]+

    [BATCH->1][TOT]

    alarm, whole batch trans. to station 1 and percentage referring to batch

    5. [ON][1] read-only alarm and percentage referring to station 1

    6. [ON]+[STOP][1] alarm and doser stop and percentage referring to station 1

    7. [ON]+[2->1][1] alarm, dosage trans. to station 1 and percentage referring to station 1

    8. [ON]+[BATCH->1][1]Up to v 6.06.02: alarm, whole batch trans. to station 1 and percentage referringto station 1

    9. [ON][1+2] read-only alarm and percentage referring to the addition [1+2]

    10. [ON]+[STOP][1+2] alarm and doser stop and percentage referring to the addition [1+2]

    11. [ON]+[2->1][1+2] alarm, dosage trans. to station 1 and percentage referring to addition [1+2]

    12. [ON]+[BATCH->1][1+2] alarm, trans. of whole batch to station 1 and percentage referring to addition [1+2]7 - G ENGLISH

  • Note 3.1 Variable Description

    From v 6.06.03: IF THE EXCHANGING FLAG OF STATIONS 2, 3 IS OFF (note 30)

    1. [ON][TOT] read-only alarm and percentage referring to batch

    2. [ON]+[STOP][TOT] alarm and doser stop and percentage referring to batch

    3. [ON]+[3->1][TOT] alarm, dosage trans. to station 1 and percentage referring to batch

    4.[ON]+

    [BATCH->1][TOT]

    alarm, whole batch trans. to station 1 and percentage referring to batch

    5. [ON][1] read-only alarm and percentage referring to station 1

    6. [ON]+[STOP][1] alarm and doser stop and percentage referring to station 1

    7.

    [ON]+[BATCH->1][1]

    Up to v 6.06.02: alarm, whole batch trans. to station 1 and percentage referringto station 1

    [ON]+[3->1][1] From v 6.06.03 on: alarm, dosage trans. to station 1 and percentage referring tostation 1

    8.

    [ON]+[3->1][1] Up to v 6.06.02: alarm, dosage trans. to station 1 and percentage referring tostation 1

    [ON]+[BATCH->1][1]

    From v 6.06.03 on: alarm, whole batch trans. to station 1 and percentage refer-ring to station 1

    9.

    Up to v 6.06.00: NOT APPLICABLE

    [ON][1+3] From v 6.06.01 on: read-only alarm and percentage referring to the addition[1+3]

    10.

    Up to v 6.06.00: NOT APPLICABLE

    [ON]+[STOP][1+3]

    From v 6.06.01 on: alarm and doser stop and percentage referring to the addi-tion [1+3]

    11.

    Up to v 6.06.00: NOT APPLICABLE

    [ON]+[3->1][1+3] From v 6.06.01 on: alarm, dosage trans. to station 1 and percentage referring toaddition [1+3]

    12.

    Up to v 6.06.00: NOT APPLICABLE

    [ON]+[BATCH->1][1+3]

    From v 6.06.01 on: alarm, trans. of whole batch to station 1 and percentagereferring to addition [1+3] 8 - GENGLISH

  • Note 3.2 Variable Description

    From v 6.06.03: IF THE EXCHANGING FLAG OF STATIONS 2, 3 IS ON (note 30)

    1. [ON][TOT] read-only alarm and percentage referring to batch

    2. [ON]+[STOP][TOT] alarm and doser stop and percentage referring to batch

    3. [ON]+[3->1][TOT] alarm, dosage trans. to station 1 and percentage referring to batch

    4. NOT APPLICABLE

    5. [ON][1] read-only alarm and percentage referring to station 1

    6. [ON]+[STOP][1] alarm and doser stop and percentage referring to station 1

    7. NOT APPLICABLE

    8. [ON]+[3->1][1] Up to v 6.06.02: alarm, dosage trans. to station 1 and percentage referring tostation 1

    Note 4 Variable Description

    1. [ON][TOT] read-only alarm and percentage referring to batch

    2. [ON]+[STOP][TOT] alarm and doser stop and percentage referring to batch

    3.[ON]+

    [BATCH->1][TOT]

    alarm, whole batch transfer to station 1 and percentage referring to the batch

    4. NOT APPLICABLE

    5. [ON][1] read-only alarm and percentage referring to the station 1

    6. [ON]+[STOP][1] alarm and doser stop and percentage referring to the station 1

    7. [ON]+[BATCH->1][1] alarm, whole batch trans. to station 1 and percentage referring to the station 1

    8. NOT APPLICABLE

    9. [ON][1+3] read-only alarm and percentage referring to the stations 1+3

    10. [ON]+[STOP][1+3] alarm and doser stop and percentage referring to the stations 1+3

    11.

    Up to v 6.06.02: NOT APPLICABLE

    [ON]+[BATCH->1][1+3]

    From v 6.06.03 on: alarm, whole batch transfer to station 1 and percentagereferring to stations 1 + 3

    12.

    [ON]+[BATCH->1][1+3]

    Up to v 6.06.02: alarm, whole batch transfer to station 1 and percentage referringto stations 1 + 3

    From v 6.06.03 on: NOT APPLICABLE9 - G ENGLISH

  • Note 7 Description

    0. local

    1. remote

    Note 8 (bit) Description (commands only)

    0. changed material start

    1. alarms acknowledge

    2. totalizators reset

    3. alarms reset

    4. unchanged material start

    Note 9 (bit) Description (commands only)

    0. stop

    Note 10 (bit) Description

    0. stop state

    1. running state

    2. pause state

    3. local check state

    4. calibration state

    5. good production flag

    6. doser in stop request10 - GENGLISH

  • Note 11 (bit) Alarm Description

    0. 1 material minimum level on station 1

    1. 2 material minimum level on station 2

    2. 3 material minimum level on station 3

    3. 4 material minimum level on station 4

    4. 5 material minimum level on station 5

    5. 6 material minimum level on station 6

    6. 7 material flow failure on station 1

    7. 8 material flow failure on station 2

    8. 9 material flow failure on station 3

    9. 10 material flow failure on station 4

    10. 11 material flow failure on station 5

    11. 12 material flow failure on station 6

    12. 13 deviation of station 1 dosage

    13. 14 deviation of station 2 dosage

    14. 15 deviation of station 3 dosage

    15. 16 deviation of station 4 dosage11 - G ENGLISH

  • Note 12 (bit) Alarm Description

    0. 17 deviation of station 5 dosage

    1. 18 deviation of station 6 dosage

    2. 19 weighing system reading error

    3. 20 wrong functioning of lower slide gate

    4. 21 printer not ready

    5. 22 end of production (production preset)

    6. 23 volumetric functioning of the doser

    7. 24 safety devices intervention

    8. 25 too low working set for station 1

    9. 26 too low working set for station 2

    10. 27 too low working set for station 3

    11. 28 too low working set for station 4

    12. 29 too low working set for station 5

    13. 30 too low working set for station 6

    14. 31 component not dosed by station 1

    15. 32 component not dosed by station 2

    Note 13 (bit) Alarm Description

    0. 33 component not dosed by station 3

    1. 34 component not dosed by station 4

    2. 35 component not dosed by station 5

    3. 36 component not dosed by station 6

    4. 37 wrong functioning of weigh pan

    5. 38 dosage without station 2

    6. 39 dosage with station 1 only

    7. 40 mixer motor breakdown

    8. 41 lacking batch (start again)

    9. 42 overweight on weighing cell

    10. 43 scanty doser steadiness

    11. 44 dosage without station 3

    12. 45 prealarm for maintenance of station 1

    13. 46 prealarm for maintenance of station 2

    14. 47 prealarm for maintenance of station 3

    15. 48 prealarm for maintenance of station 412 - GENGLISH

  • Note 15 (bit) Description

    0. hopper material level on station 1

    1. hopper material level on station 2

    2. hopper material level on station 3

    3. hopper material level on station 4

    4. hopper material level on station 5

    5. hopper material level on station 6

    6. mixer material level

    7. material level below lower slide gate

    8. safety devices

    9. lower level on regrind accumulation tank

    10. higher level on regrind accumulation tank

    11.

    12.

    13.

    14.

    15.

    Note 16 (bit) Description

    0. dosage control of station 1

    1. dosage control of station 2

    2. dosage control of station 3

    3. dosage control of station 4

    4. dosage control of station 5

    5. dosage control of station 6

    6. mixer control

    7. weighing slide gate control

    8. lower slide gate control

    9. siren control

    10. alarm exit control

    11.

    12.

    13.

    14.

    15. 13 - G ENGLISH

  • Note 17 (bit) Description

    0. any alarm

    1. one alarm is present

    Note 30 (bit) Description

    1. 0 = station 2,3 in standard operation

    1 = station 2,3 in reverse operation

    Note 31 (bit) Alarm Description

    16. 49 prealarm for maintenance of station 5

    17. 50 prealarm for maintenance of station 6

    18. 51 alarm for maintenance of station 1

    19. 52 alarm for maintenance of station 2

    20. 53 alarm for maintenance of station 3

    21. 54 alarm for maintenance of station 4

    22. 55 alarm for maintenance of station 5

    23. 56 alarm for maintenance of station 6

    Note 36 (bit) Description

    - To zero the totalizators, use the MODBUS 29 address. 14 - GENGLISH