PLC interface to a PtZ camera

TheWaterboy

Lifetime Supporting Member + Moderator
Join Date
May 2006
Location
-27.9679796,153.419016
Posts
1,922
I am toying with the idea of controlling a Sony PTZ camera with a PLC. Its just a thought at this moment, but has anyone used a PLC serial port to tell a camera to go to specific locations on command?

I can of course use the built-in alarm ports on the camera easily enough, but there are only 4 of those and I may want more positions than that. There is an interface that is available from the surveillance system but it is costly and must be licensed. In then end I may find out that there are only 4 locations that can be stored in the camera so I may be out of luck anyway.

I'll look at this in ernest in the next couple weeks but if anyone has ever done it i would love to know what you learned.
 
I've done it before with Bosch and Pelco but never Sony. Shouldn't be any different though. It can be a little difficult to properly control as youll never get as accurate as a joystick. Usually calling a preposition is a little more user friendly.
 
Calling a preset position is just what I need to do. I can do that with the discrete inputs available, but there aren't enough of them. Its a big area to cover.
 
If you're using Pelco-D protocol, I can probably help you. I can give you the hex data to send for each preset that you program.
 
Hmm, this might not be so much of a pipe dream after all...
The Sony model I'm looking at supports Pelco-D (I don't see Visca listed) but over RS485, not 232. How did you get 485 out of a PLC? the DH port? Do you have PLC code I could look at?
 
I used a ML1100 with an inline 232 to 422 converter. This is the one I had: http://www.kksystems.com/inline-interface-converters/non-isolated/k2.html

Any converter similar to that would work. You need to force RTS or DTS high on the 232 side to provide power to it.

I setup the ML1100 to send ASCII strings as HEX. It takes a bit of fiddling to get the the port setup correctly with carriage returns and such. I don't have the program near me so I can't tell you exactly what I did at the moment. I didn't bother with programming the protocol into the PLC as I was only doing a dozen or so commands. What I did was figure out each command I needed to send, stored those commands in a string ST9 location and programmed buttons on my HMI to send those strings (as HEX) out the serial port. There is likely no need to receive any info from the camera, so don't bother with that. The bulk of my programming went into resetting control blocks for the AWT commands. I found that the serial port hangs very easily and resetting each AWT control block a second or so after sending the hex was the best solution. I've never had an issue since it was completed a few years ago.
 
If you're using Allen Bradley ML series, there is a prefix you need to use in your strings. Pelco D uses FFh as a beginning of message. This is not the same as FF in ASCII. I cannot find what this prefix is at the moment.

http://www.commfront.com/RS232_Examples/CCTV/Pelco_D_Pelco_P_Examples_Tutorial.HTM

This page shows the protocol. I have a program I can email you that will give you all your commands, or I can just send you the hex for whatever you want to do.
 
We did a movie stunt rig with a similar setup using a SoftPLC. It has a set of serial ASCII commands called COMGENIUS that makes it really easy to format the necessary strings without having to use data table or a lot of ladder logic. It also has a native 485 port.
 

Similar Topics

Dear All, I have to do motion control using Rexroth XM21 plc interconnecting stepper with Stepper BSD Card.How to add this technology objects for...
Replies
0
Views
730
Dear Experts, We have two PLC independent PLC panels with two independent controllers , we need to make hardware splitting for some AI and DI...
Replies
2
Views
1,025
Hey there, I would like to communicate to Unreal Engine (PC), to/from an AB PLC. Could someone, please, guide me through the process. Thank...
Replies
15
Views
3,926
Hi Friends, I'm making a PLC operated chocolate vending machine, using a CLICK Basic PLC (C0-00DD2-D) which has 2 x RS232 ports. I'm also using...
Replies
0
Views
1,527
Dear all, I have below mentioned items, 1. Delta PLC DVP24Es2 2. Delta Thermal Module DVP 04TC-E2 3. Thermocouple Type J Now i need to...
Replies
1
Views
1,585
Back
Top Bottom