Toshiba ICC Multiprotocol Ethernet Interface ASD-G9ETH User Manual

Page 61

Advertising
background image

60

ICC

Where “discrete”

∈[1…65535], “bit” ∈[0…15], and “%” is the modulus operator,

which means that any fractional result (or “remainder”) is to be retained, with
the integer value being discarded (i.e. it is the opposite of the “floor” function).

For clarity, let’s use Equation 1 and Equation 2 in a calculation example. Say,
for instance, that we are going to read coil #34. Using Equation 1, we can
determine that coil #34 resides in register #3, as

⎣3.0625⎦ = ⎣3 r1⎦ = 3. Then,

using Equation 2, we can determine that the bit within register #3 that coil #34
targets is (34-1)%16 = 1, as 33%16 = mod(2 r1) = 1. Therefore, reading coil
#34 will return the value of register #3, bit #1.

Advertising