Page 1 of 1

Bug Report - Failed setting voltage range VCP1000_0

Posted: Sat Feb 17, 2018 1:57 pm
by ktritz
Trying to set the voltage range for the VCP1000_0 to anything other than 10 gives a PhidgetException, error code 21, invalid argument.

In[1]: import Phidget22.Devices.VoltageInput as VI

In[2]: v = VI.VoltageInput()

In[3]: v.open()

In[4]: v.getVoltageRange()
Out[4]: 10

In[5]: v.setVoltageRange(9)
Traceback (most recent call last):

File "<ipython-input-5-3b43f60bfb79>", line 1, in <module>
v.setVoltageRange(9)

File "C:\ProgramData\Anaconda3\lib\site-packages\Phidget22\Devices\VoltageInput.py", line 397, in setVoltageRange
raise PhidgetException(result)

PhidgetException: 21

In[6]: v.setVoltageRange(10)
(works fine)

Re: Bug Report - Failed setting voltage range VCP1000_0

Posted: Sat Feb 17, 2018 6:03 pm
by mparadis
If you go to the product page for the VCP1000 and go to the API tab, you'll find that the only valid values for VoltageRange on the VCP1000 are 10 (0xa) and 4 (0x4), which correspond to the 40V and 312.5mV ranges respectively.