Download ELLIPs
Transcript
An intelligent weight controller using Profibus #define WEIGHT CURVE OxBl f* Curve data f* data byte 1 total number of packets [1 .. Nl byte 2 packet number of this packet Il .. NI *f i f (packet number •• 1) byte 3 MSB channel number byte 4 LSB channel number byte 5 MSB sample frequency byte 6 LSB sample frequency MSB number of points byte 7 byte 8 LSB number of points byte 9 MSB data word 1 byte 10 LSB data word 1 byte 11 MSB data word 2 12 byte LSB data word 2 ·· · · · · byte 19 MSB data word 6 byte 20 • LSB data word 6 if (packet number :> 1) byte 3 z M5B data word (packet_number-l)*9+7 byte 4 LSB data word (packet_number-l)*9+7 byte 5 • MSB data word (packet_number-l)*9+S byte 6 LSB data word (packet_number-l)*9+9 byte 19 • MSB data word (packet number-l}*9+15 byte 20 .. LSB data word (packet:number-l)*9+15 *f #define I'" OxB2 f* Weight data *f data byte byte byte byte byte byte 1 2 3 4 5 6 MSB - LSB MSB LSB - MSB LSB cup number cup number weight weight weight weight lowest lowest second second selected channel selected channel lowest selected channel lowest selected channel byte n-l_ MSB weight highest selected channel byte n ~ LSB weight highest selected channel *f /* Additional error messages (see WEIGHT ERROR) ****************************/ Hdefine UNKNOWN COMMAND OxFF - /* unknown command in frame */ Hdefine ILLEGAL=LENGTH OxPE /* Wrong number of bytes in frame*/ 85 ~ ELLIPS