Remote 4 Channel Vibratory Feed Controller



12 July 2019

Software Notes for Coke Communication Protocol

1. This protocol is based upon communication with an Allen-Bradley Compact Logix 5380 PLC. One master can communicate with one or more slaves via multi-drop configuration. It is envisaged using a Ethernet converter at the slave device to convert from serial for connection to the master device.

2. In this specification the master is always the PLC and the slave(s) is one or more Starflex machines. All messages originate at the master and are replied to by the slave.

3. Master message frame :-

STN [CMD[+NUM] data bytes …] CS CR

Slave reply frame :-

STN [CMD[+NUM] ERR data bytes … ] CS CR

Where:-

STN slave station address 0x30 – 0x39 ; echoed back to master

CMD[+NUM] application specific command for slave to perform ; echoed back to master (2 bytes)

ERR application specific; message received at slave in error or command not performed

CS checksum (1’s complement modulo 256 sum from STN to last data byte)

CR 0x0D (carriage return end of text)

4. The use of CR to qualify start and end of message means that it must not occur anywhere else in the message. All other bytes must therefore be coded as ascii-hex printable characters.

5. Command message overhead is 5 bytes.

6. Reply message overhead is 6 bytes.

Command Number List with Descriptions

Read Commands. Transmit data from slave machine.

• TxLiveStatus (R0) – basic current state read

Where data bytes are as follows:-

STATUS (2) 2 asci-hex digits representing 1 byte

STATUS / CONTROL (Control bits received are returned in Status)

0 RUN STATUS BIT

1 NEW PACK WEIGHT

2 TARE WEIGHT CHANGED STATUS BIT

Data Msg Bytes 2

• TxNewPackWt (R1) – Includes live status.

STATUS (2) ascii-hex

BATCH NO (10) numerical ascii digits

MATERIAL NO (8) numerical ascii digits

SEQUENCE NO (4) numerical ascii digits

NEW PACK WT (6) numerical ascii digits

WEIGHT ATTRIBUTE (2) ascii-hex

0 GOOD WEIGHT

1 REJECT WEIGHT

2 UNDERWEIGHT

3 OVERWEIGHT

TIME STAMP (16) ascii

Data Msg Bytes (48)

• TxNewTareWt (R2) – Includes live status.

STATUS (2) ascii-hex

TARE WEIGHT (6) numerical ascii digits

Data Msg Bytes (8)

Write commands. Receive data by slave machine.

• Rx Product Target Weights (W1) –

BATCH NO (10) numerical ascii digits

MATERIAL NO (8) numerical ascii digits

TARGET WT (6) numerical ascii digits

TARE WEIGHT (6) numerical ascii digits

UNDERWEIGHT LIMIT (6) numerical ascii digits

OVERWEIGHT LIMIT (6) numerical ascii digits

Error Codes. – 0x0 – 0xF (replied as a single ascii-hex byte)

0 = ‘30’ = no error

1 = ‘31’ = invalid command

2 = ‘32’ = format error

Example message. All data expressed as hex bytes.

Master sends status request to slave machine.

31 52 30 4C 0D

31 = STN (address ascii 1)

52 = CMD (command R)

30 = CMD_NUM (command number 0)

4C = checksum (1’s complement of STN to previous byte)

0D = CR

Slave replies no errors and Status byte = 0x03.

31 52 30 30 30 33 B9 0D

31 = STN (address ascii 1)

52 = CMD (command R)

30 = CMD_NUM (command number 0)

30 = no error

30 33 = 0x03

B9 = checksum (1’s complement of STN to previous byte)

0D = CR

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download