Applies To: |
|
Summary: | ||
|
Solution: |
Firstly, the Block parameter has
an effect on the size of requests made by the IOserver to the
driver, but will not
directly set its size. Setting a value of Block to 100 will NOT limit the request size to 100 bytes. The Block parameter actually defines the size of the BIGGEST GAP (in bytes) that the IOserver will accept before blocking two variable tags in a single request... not the size of the REQUEST itself. EXAMPLE: It is easier to understand the effect of the Block parameter when using a protocol as simple as MODBUS. Let us consider a project that contains ONLY registers 40001, 40061 and 40100. The GAPs between the variable addresses are of size 59 words (118 bytes) and 38 words (76 bytes). 1- If block=250 (default), then the 3 registers WILL be read in a single request (of size: 200 bytes). The two gaps in the variable database are smaller than 250 bytes. 2- If you decrease the value of Block to 50, then the three registers will NOT be blocked, and three READ requests (each of size: 2 bytes) will be sent out. This is because the two gaps in the variable database are greater than 50 bytes. 3- If you set Block to 130, the three registers WILL be blocked together (1 READ request of size 200 bytes), as the value of Block (130 bytes) is bigger than each and every of the GAPS in the variable database (118 and 76 bytes). In this instance, the request size is bigger than the value defined in Block. 4- If you set Block to 100, then 2 registers (40061 and 40100) will be blocked together (one READ request of size: 80 bytes) and 40001 will be read on its own (a second READ request of size: 2 bytes), as the value of Block (100) is bigger than 76 but smaller than 118. Notes: 1- In the case of MODBUS/MODNET, you can have a direct impact on the request size by setting MaxBits to your desired value... Please read Q5449 for a common trap on this latter parameter. However, for most drivers, there is no MaxBits parameter, so Block is the only parameter that may be tuned. 2- In the case of tag-based drivers (such as OPC), the tags are blocked by OIDs. More information is available in Q4074. |
Keywords: |
MaxBits, Request size too big, MODNET,
Blocking, MODBUS |
Related Links
Attachments