Toshiba ASD-G9ETH Switch User Manual


 
68
ICC
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.