phidgets ObjectCreate problem

Any hardware type questions or problems for all other Phidget devices.
arnoldgarcia
Fresh meat
Posts: 1
Joined: Mon Oct 14, 2024 12:45 am

phidgets ObjectCreate problem

Post by arnoldgarcia »

Hello,
Hi,


I have this code for connection with Phidgets Device:


Code: Select all

;Phidget initialization code goes here
  Global $oPhid1,
$oPhidEvents
  $oPhid1 =
ObjCreate("Phidget21COM.PhidgetInterfacekit")
  $oPhid1.Open()

 
  $oPhid1.WaitForAttachment(3000)
  If NOT $oPhid1.IsAttached
Then
     MsgBox(0, "Error", "Phidget Device not
attached")
  GUICtrlSetState($cbWithoutMux, $GUI_CHECKED)
 
;Exit
  EndIf

 
  $oPhidEvents = ObjEvent($oPhid1, "phid1_")
It works good for me on 2 computer (Win 10_64, Win XP_32)

But for some reason the AutoIt crush on other computer with Win 10_64.


C:\Users\user\Desktop\ManagerTester\includes\ConnectionControllerFunctions.au3 (78) : ==> Variable must be of type "Object".:

$oPhid1.Open()

$oPhid1^ ERROR


It get error on this command:

$oPhid1.Open()


Because probably it doesn;t make an object on this line:

$oPhid1 = ObjCreate("Phidget21COM.PhidgetInterfacekit")


Why it may happens just on this PC?
kickoffform
Fresh meat
Posts: 2
Joined: Sun Apr 13, 2025 7:46 pm

Re: phidgets ObjectCreate problem

Post by kickoffform »

Hi, I have the same problem. Can someone explain it to me?
Thanks in advance
kickoffform
Fresh meat
Posts: 2
Joined: Sun Apr 13, 2025 7:46 pm

Re: phidgets ObjectCreate problem

Post by kickoffform »

kickoffform wrote: Sun Apr 13, 2025 8:22 pm Higoogle baseball, I have the same problem. Can someone explain it to me?
Thanks in advance
Sorry, can anyone help with this?
Last edited by kickoffform on Thu Apr 17, 2025 8:42 pm, edited 1 time in total.
ordertower
Fresh meat
Posts: 1
Joined: Thu Sep 18, 2025 1:10 am

Re: phidgets ObjectCreate problem

Post by ordertower »

The fact that the error only appears on a Windows 10_64 PC suggests that the Phidget21 COM library may not be installed or properly registered on that machine. In AutoIt, if ObjCreate returns 0, the variable will not be an object, resulting in an error when calling .Open(). Double check your Phidget21 drivers/COM library installation.