Why do I get an error code ( Invalid value in the length field of the control block ) 2003 Hex on my MBP_MSTR block in Unity Pro?
The most common reason for this error code is way the Control and Databuf elements were configured.
The Control pin must be configured as a array of Integers of at least 9 components long.
The Databuf pin must be configured as an array the length of the data that is to be read and/or written by the MBP_MSTR block.
In this example:
The MBP_MSTR is reading 20 registers from a local Modbus Plus slave PLC so a derived datatype was created Data_Storage_Type of length 0..19 or 20.
The Control type was created of type INT length 0..9 or 10.
Next create two variables one of each type and locate them to a %MW (4X) address.
Link these variables to the corresponding pins on the MBP_MSTR block, re-build the application, load the application to a controller, and the error code will be gone.