Hi Jens - my concern is that the XML return would be similar to the other one. I'd encourage you to find someone that's successfully used this board with the EDS server. But that said, I've been thinking about what might be happening with the data returned. Hopefully, some of the real programmers here can help explain what I'm about to try to explain using the proper language!
There are 8 relays on the board. If we assign an enumerated value to each relay like so:
- Code: Select all
list_of_relays = [
('P7',128),
('P6',64),
('P5',32),
('P4',16),
('P3',8),
('P2',4),
('P1',2),
('P0',1)
]
and then if (and it's a big if) the returned data reports the combined relay states as a value between 0 - 255 (status_count), then I can tell you which relays are active using something like this:
- Code: Select all
active_relays = []
for relay in list_of_relays:
if (status_count - relay[1]) >= 0:
active_relays.append(relay[0])
status_count = status_count - relay[1]
print active_relays
So for example, if status_count = 123, I can tell that it's relays ['P0', 'P1', 'P3', 'P4', 'P5', 'P6'] that are active (64+32+16+8+2+1 = 123).
All of this is conjecture and wishful thinking, mind you. I have no proof that this is how it actually works. Without concrete proof that your proposed board is supported and the server provides useful XML output--I can make no guarantees.
Dave