Page 1 of 1

power plug (digital output) not turning off

Posted: Tue Aug 15, 2023 12:37 pm
by johnsayeau
Hello,

I have a simple script that I am trying to use to power a device on and off again. I am using a vint hub0001_0 and a psu 1000_0 plug

I am sure this used to work but now it supplies power to the device when I do “p.setDutyCycle(1)” or “p.setState(True)” but when I set the duty cycle to 0 or the state to False power is still supplied to the device through the plug. This is on a Mac . The same thing occurs when I try using the phidgets control panel.

Here is the script:

from time import sleep, time
from Phidget22.Devices.DigitalOutput import *

def init_power_plug():
digitalOutput0 = DigitalOutput()
digitalOutput0.setIsHubPortDevice(True)
digitalOutput0.setHubPort(0)
digitalOutput0.openWaitForAttachment(5000)
#digitalOutput0.setDutyCycle(1)
return digitalOutput0

p = init_power_plug()
p.setDutyCycle(1.0)
sleep(1)
p.setDutyCycle(0.0)

Thanks, John.

Re: power plug (digital output) not turning off

Posted: Tue Aug 22, 2023 8:46 am
by Patrick
Will it switch off from the Phidget control panel? Does it switch off when you unplug it?