Python script on macOS -> USB -> HUB0000_0 -> PSU1000_0.
PSU1000_0 is connected to port 0 on HUB0000_0.
The following code (from examples provided) works fine.
Code: Select all
def turn_on(port):
digitalOutput = DigitalOutput()
digitalOutput.setIsHubPortDevice(True)
digitalOutput.setHubPort(port)
digitalOutput.openWaitForAttachment(5000)
digitalOutput.setDutyCycle(1)
time.sleep(3)
digitalOutput.close()
turn_on(0)
Code: Select all
def turn_on(port):
digitalOutput = DigitalOutput()
digitalOutput.setIsHubPortDevice(True)
digitalOutput.setHubPort(port)
digitalOutput.openWaitForAttachment(5000)
digitalOutput.setDutyCycle(1)
turn_on(0)
What am I doing wrong? It is my understanding that setting duty cycle to 1 should turn PSU1000_0 on. Then I could do stuff with a device connected and powered by it. Once I'm done, I should be able to set the duty cycle to 0 thus turning PSU1000_0 off.
I tested this from Phidget Control Panel and clicking on duty cycle slider turns connected PSU1000_0 on and off as expected.