HMP2020 questions (related to config hw-model and protocol)
{
"version": "1.0",
"options": {},
"devices": {
"PS": {
"hw-type": "PS",
"hw-model": "$MODEL",
"communication": {
"protocol": "$PROTOCOL",
"port": "/dev/ttyACM0"
}
}
},
"channels": {
"high-current": {
"hw-type": "PS",
"device": "PS",
"channel": 1,
"program": {
"maxvoltage": 32,
"maxcurrent": 5
}
},
"low-current": {
"hw-type": "PS",
"device": "PS",
"channel": 2,
"program": {
"maxvoltage": 32,
"maxcurrent": 5
}
}
}
}
When $MODEL is set to RS_HMPXXXX
, I get this error
(labRemote) [pixdaq@itkpix-daq-05 ~]$ python ps.py
[ERROR] : Unknown power supply: ROHDE&SCHWARZ,HMP2020,101608,HW50010003/SW2.62
Traceback (most recent call last):
File "ps.py", line 8, in <module>
PS = hw.getPowerSupplyChannel('high-current')
RuntimeError: Unknown power supply: ROHDE&SCHWARZ,HMP2020,101608,HW50010003/SW2.62
so on @eressegu 's suggestion, I switch to SCPIPs
and it works fine (skipping the check). Why is the check needed? Is there a way to get it to work from python? The PowerSupplyRegistry is not exposed (is that on purpose)?
Additionally, how do I determine the right communication protocol to use? There's no distinct keywords to distinguish between the ones implemented in labRemote. I just scan through all possibilities until one works... but this certainly can't be appropriate?