Sunday, October 9, 2011

PLC Response with the Vision PLC





The PLC Response includes the similar 3 sections as the Request, such as footer, header, and details.
Notes
1. Within the bytes of PLC response 6 and 7 are switched.
2. It recognizes the request by adding 80(hex) to the number of control (byte 12 within the Header) when the PLC reacts.
Commands of Binary
There are 3 potential commands that may be concerned with the Format of Binary:
• Read Data Tables
• Write Data Tables
• Read Operands

Command # 77 Read Operands
A message of single can, via this control, interpret data from operands. The number of control, 77, is included in byte #12 in the header of message; the requests of data are included in the Details section. You can comprise multiple requests of data within the Details section. The requests of data may be for operands different types; the operands may be neighboring to vectorial or non-vectorial. Nevertheless, note that a single data demand can not request of data for more than one type of operand.

The requests of data have to be organized within the Details section as follows:
3. Integer (16-bit)
4. Float/Long/DW/ (32-bit)
5. Bit data (MBs, Inputs, etc.)

Bytes 18-19 grip the data requests number in the message. You have to comprise the address of every operand to be interpret to read the non-vectorial operands values. You have to specify the first element address to interpret the values of vectorial operands. The operand type value is in byte #2. The returned value size for the operand is specified as well. To specify that the operands are vectorial, put in 128 (80 hex) to the type of operand

The list below explains how operands may be set into data requests.
Longs (non-vectorial) ML56
Integers (vectorial) 9 MIs starting at MI198
Bits (non-vectorial) MB27, MB26, MB25, MB9, MB2
Integers (non-vectorial) MI56, MI45, MI2, MI0

The operands are placed in requests of data refer to the following principals:
• One request for MB27, MB26, MB25, MB9, MB2 (note that even though the last three MBs perform form a vector, they have been demanded as particular entities and therefore are set as individual MBs.
• One demand for the vector beginning from MI198 with a length of 9.
• One demand for ML56.
• One demand for MI0, MI2, MI45, MI56.
If another MIs vector is asked for, this new vector will comprise an extra request, consequently rising the requests number to 5.


Labels:

Newer Post Older Post Home

You may also like these ebook:

Get Free PLC eBook directly sent to your email,
and email subscription to program-plc.blogspot.com




We hate SPAM. Your information is never sold or shared with anyone.

Your Email Will Be 100% Secured !