Jump to content

phidgets ObjectCreate problem


atzoref
 Share

Recommended Posts

Hi,

I have this code for connection with Phidgets Device:

;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 7_64, Win XP_32)

But for some reason the AutoIt crush on other computer with Win 7_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?

Thanks

Link to comment
Share on other sites

I assume the required software isn't installed on this machine.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Google is your best friend :)

I found the solution here:

It was finally something with the " Phidget21COM.dll " which for some reason wasn't registered on the PC.

So for using the COM interface, Before you can use the COM interface to Phidget21COM it needs to be "registered" This is maybe should be done automatically when you install the Phidget drivers but I done it manually.

To register the COM interface:

1. Open a command prompt (As administrator)

2. Change directory (using CD) to the directory that contains Phidget21COM.dll in the program files

3. Type "regsvr32.exe Phidget21COM.dll" and press enter

And then the problem doesn't happen and he success to run the ObjCreate.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...