Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def asi_address(start, length):
- """
- Yields the logical address together with ASi address
- look here: http://www.brix.de/elektrik/sps/asi_s7_cp342.html
- """
- n = 0
- for byte in range(start, start + length):
- for bit in range(4, 8):
- yield ('{}.{}'.format(byte, bit), n)
- n += 1
- for bit in range(0, 4):
- yield ('{}.{}'.format(byte, bit), n)
- n += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement