Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Comments & issues
mahesh
Fresh meat
Posts: 3
Joined: Wed May 06, 2015 7:35 am
Contact:

Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Postby mahesh » Wed May 13, 2015 3:41 am

Hiiiii. I have a C programming code. The output of my C code is Roll, Pitch, Yaw etc. I want to send these output parameters to the controller '1065_0 - PhidgetMotorControl 1-Motor' through USB. and an actuator connected to this controller will show its motion.
I read the user guide of this controller and according to user guide I have to install an GUI given by Phidgets and I can operate the controller and actuator by this GUI. But I want to operate the controller and actuator through my C code.
So I want to know can I send my c code outputs to this GUI and GUI will send the output parameters to controller.

frodegill
Phidget Mastermind
Posts: 114
Joined: Thu Mar 04, 2010 2:51 am
Contact:

Re: Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Postby frodegill » Wed May 13, 2015 4:47 am

mahesh wrote:I read the user guide of this controller and according to user guide I have to install an GUI given by Phidgets and I can operate the controller and actuator by this GUI. But I want to operate the controller and actuator through my C code.

Not sure what UI you're talking about, but you have full control of the 1065_0 from the C API.

mahesh
Fresh meat
Posts: 3
Joined: Wed May 06, 2015 7:35 am
Contact:

Re: Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Postby mahesh » Wed May 13, 2015 6:39 am

Thanx. Please check below link to get detailed description about this GUI.
http://www.phidgets.com/docs/1065_User_Guide

User avatar
mparadis
Site Admin
Posts: 715
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Postby mparadis » Wed May 13, 2015 8:34 am

The GUI example you're using in the Phidget Control Panel is originally written in C#. If you want to modify it, you need to download the C# examples and merge your program with it. The file you're looking for is "MotorControl-full".

Of course, as frodegill pointed out, you have access to all of the same commands for controlling the motor, so it may be easier to write it into your existing program.

mahesh
Fresh meat
Posts: 3
Joined: Wed May 06, 2015 7:35 am
Contact:

Re: Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Postby mahesh » Fri May 15, 2015 6:57 am

Thanx for your support. Now I got a clear idea about sending of data from my C code to controller.
Next thing I want to ask is can I get a acknowledgement signal from the controller '1065_0 - PhidgetMotorControl 1-Motor' regarding the motor/ actuator status? For e.g. if I am giving a command from my C code to controller to rotate the motor. once rotation of motor is done is it possible to get a acknowledgement signal from the controller so that my C code would get information that motor has reached to its steady state position.

User avatar
mparadis
Site Admin
Posts: 715
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Postby mparadis » Fri May 15, 2015 7:18 am

If you want to be able to know the real position of the motor, (especially if you're employing a control system as you've implied) then you need to use a motor that has an encoder attached or buy an encoder separately and attach it. The encoder sits on the rear shaft of the motor and can read its real position. The 1065 has an encoder input port to connect it to. You can set up an event handler so whenever this position changes, your program will launch a handler function and run some code.

For an example of how to implement a basic PID control system with the 1065, check out this application note.

User avatar
Patrick
Lead Developer
Posts: 3176
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Interfacing with 1065_0 - PhidgetMotorControl 1-Motor

Postby Patrick » Fri May 15, 2015 8:42 am

You need to listen for the velocity change event - this streams back real time motor data.

-Patrick


Return to “General”

Who is online

Users browsing this forum: DenStoxy and 3 guests