1
$\begingroup$

I am trying to write a C code for a pan-tilt unit model ptu-d46 using visual studio 2010 in Windows 7, but I can't find any tutorial or reference on how to do so. All the user's manual mentions is that there is a C programmer's interface (model ptu-cpi) available, but it doesn't say where to find it nor how to use. I looked for it on google but couldn't find anything.

There is a command reference manual along with the user's manual, but it only shows the different commands to control the tilt and does not explain how to make a C program that connects to the tilt controller and sends queries to it.

Does anyone please have an idea of where I should look or if there are any open source programs for that. I'm not trying to make a complicated program. I just need it to connect to the tilt controller (the computer is connected via USB cable to the host RS232 of the tilt controller) and makes it nod to say "Yes" and "No" !

$\endgroup$

migrated from stackoverflow.com Jun 5 '13 at 18:52

This question came from our site for professional and enthusiast programmers.

1
$\begingroup$

The command reference manual is here. These commands are sent as ASCII text to the serial interface on the controller. How to send data to a serial port depends on your OS and how the device is attached. On Linux, you'll probably open a device file like /dev/ttyXXX and write to that. I don't know about Windows or MacOS.

$\endgroup$
  • $\begingroup$ Thank you ! I'll try to search more about how to do that in Windows $\endgroup$ – user2446260 Jun 4 '13 at 1:39
0
$\begingroup$

You do not need the PTI-CPU (which is a separate product -- $250) for your application. It's only necessary if you are going to give the PTU instructions more than 10 times per second.

What you just need to do is figure out how to use a serial port in your environment, and send it the commands as described in the manual you already have.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy