Bug Report - Failed setting voltage range VCP1000_0

Supporting 2.7 and 3.2+
Post Reply
ktritz
Fresh meat
Posts: 1
Joined: Sat Feb 17, 2018 1:45 pm
Contact:

Bug Report - Failed setting voltage range VCP1000_0

Post 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)
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Bug Report - Failed setting voltage range VCP1000_0

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests