PhidgetException 0x34 (Device not Attached) VINT HUB0000_0
Posted: Tue Feb 18, 2020 5:03 pm
I am developing with c#.net and I am having some problems when solution start, The application show:
PhidgetException 0x34 (Device not Attached) VINT HUB0000_0
This can happen for a number of common reasons. Be sure you are opening the channel before trying to use it.
If you are opening the channel, the program may not be waiting for the channel to be attached.
If possible use openWaitForAttachment. Otherwise, be sure to check the Attached property of the channel before trying to use it.
Could anyone help me please, I'm new with phidget controls.
So I show them some code that I have developed...I am using VINT HUB0000_0
Thanks a lot
PhidgetException 0x34 (Device not Attached) VINT HUB0000_0
This can happen for a number of common reasons. Be sure you are opening the channel before trying to use it.
If you are opening the channel, the program may not be waiting for the channel to be attached.
If possible use openWaitForAttachment. Otherwise, be sure to check the Attached property of the channel before trying to use it.
Could anyone help me please, I'm new with phidget controls.
So I show them some code that I have developed...I am using VINT HUB0000_0
Code: Select all
private void Maincontrol_Load(object sender, EventArgs e)
{
TempSensor0 = new VoltageRatioInput();
TempSensor0.Attach += TempSensor0_Attach;
TempSensor0.Detach += TempSensor0_Detach;
TempSensor0.Error += TempSensor0_Error;
TempSensor0.SensorChange += TempSensor0_SensorChange;
//Set addressing parameters
TempSensor0.IsHubPortDevice = true;
TempSensor0.HubPort = 0;
TempSensor0.Channel = 0;
LimitSwitch = new DigitalInput();
LimitSwitch.StateChange += LimitSwitch_StateChange;
LimitSwitch.Attach += LimitSwitch_Attach;
LimitSwitch.Detach += LimitSwitch_Detach;
LimitSwitch.Error += LimitSwitch_Error;
//Set addressing parameters
LimitSwitch.HubPort = 3;
SolenoidValve = new DigitalOutput();
SolenoidValve.Attach += SolenoidValve_Attach;
SolenoidValve.Detach += SolenoidValve_Detach;
SolenoidValve.Error += SolenoidValve_Error;
//Set addressing parameters
SolenoidValve.IsHubPortDevice = true;
SolenoidValve.HubPort = 2;
try
{
// Open Phidgets
TempSensor0.Open();
TempSensor0.SensorType = Phidget22.VoltageRatioSensorType.PN_1124;
LimitSwitch.Open();
SolenoidValve.Open();
SolenoidValve.DutyCycle = 1;
}
catch (PhidgetException)
{
TempSensor0.Close();
LimitSwitch.Close();
SolenoidValve.Close();
throw;
}
}