|
<< Click to Display Table of Contents >>
Using the N3 or B3 Parameter |
All numerical N and B parameters can store a number between 0 (zero) and 65535. When the address, or offset, in an Area exceeds the maximum value in the N4 or B4 parameter, the N3 or B3 parameter must be used to complement this exceeding portion.
Also, when using a String data type and its maximum size must be informed, the N3 or B3 parameter must be used to complement the exceeding portion.
Thus, the N3 or B3 and N4 or B4 parameters must be thought as composed by 2 (two) bytes. For this Driver, the highest portion of the N3 or B3 parameter is the String Length, and the lowest portion is the highest byte of the Address value, or offset, according to the next figure.

N3 or B3 and N4 or B4 parameters
Therefore, the value of Address, or offset, is composed by a 24-bit numerical value, with the entire N4 or B4 parameter plus the lowest half of the N3 or B3 parameter. If the value of Address, or offset, is lower than 65535, the lowest half of the N3 or B3 parameter must be configured with the value 0 (zero). Otherwise, this value must be separated into 3 (three) bytes, the 2 (two) lowest bytes are the value to fill in the N4 or B4 parameter and the highest byte is the value to fill in the lowest half of the N3 or B3 parameter.
The value of String Length is composed by a numerical value with 8 (eight) bits, as explained earlier, on the highest part of the N3 or B3 parameter. If the configured type is not String or if users want to use the default maximum length of a String as configured on the configuration window of this Driver, filling this portion of the parameter can be disregarded and left in 0 (zero).
1.Address with value 100000: 100000 = 186A0h » 01 86 A0 » N3 or B3 = 1; N4 or B4 = 86A0h = 34464.
2.String with length 100 and Address lower than 65535: 100 = 64h » N3 or B3 = 6400h = 25600; N4 or B4 = Address.
3.String with length 100 and Address 100000: 100 = 64h; 100000 = 0186A0h » N3 or B3 = 6401h = 25601; N4 or B4 = 34464.