Multiple 1063

Supporting 10.7 and up
TheBobOne
Fresh meat
Posts: 1
Joined: Mon Jun 25, 2012 11:23 pm
Contact:

Multiple 1063

Postby TheBobOne » Fri Jul 20, 2012 7:40 am

Hi,
Sorry for my english, I'm french.......okey okey I accept all jokes.....

I've 5 1063 with 5 3319_0 Bipolar, when I use the préférence panel, it's working fine.

I want to drive simultaneous my 5 Steppers. In Objective-C on Mac OSX, I've no problem to build application.

But, I don't really understand the difference between CPhidgetManagerHandle, CPhidgetHandle and CPhidgetStepperHandle.

All my 1063 have a Label already set : MotorX, MotorY, MotorZ, MotorAlpha and MotorBeta
How can I initiate my 5 CPhidgetStepperHandle from the label of each one.

CPhidgetStepperHandle MXStepperHandle;
CPhidgetStepperHandle MYStepperHandle;
CPhidgetStepperHandle MZStepperHandle;
CPhidgetStepperHandle MAlphaStepperHandle;
CPhidgetStepperHandle MBetaStepperHandle;

Thank's in advance for you answer.

Best regards to All

erik
King of the Lab
Posts: 476
Joined: Fri Mar 06, 2009 12:42 pm
Location: Calgary, Canada
Contact:

Re: Multiple 1063

Postby erik » Mon Jul 23, 2012 9:22 am

For each handle, you will want to use CPhidgetStepper_create() and CPhidget_openLabel(), for example

Code: Select all

CPhidgetStepper_create(&MXStepperHandle);
CPhidget_openLabel((CPhidgetHandle)MXStepperHandle, "MotorX");
CPhidgetStepper_create(&MYStepperHandle);
...
...

For more information, you can check out the Getting Started guide for iOS here: http://www.phidgets.com/documentation/Tutorials/Getting_Started_iOS.pdf

CPhidgetHandle is a parent class that all the Phidget handles are derived from (such as the CPhidgetStepperHandle, etc.). It contains all the common variables that any of our USB devices would have, such as the serial number, the type of Phidget, if it is attached, etc.

CPhidgetStepperHandle contains all variables that deal specifically with the PhidgetStepper product line, such as velocity, current position, target position, etc.

CPhidgetManagerHandle can be used to keep track of all the attached Phidget devices, and then you can use the different handles to open specific devices.


Return to “macOS”

Who is online

Users browsing this forum: No registered users and 0 guests