Sonsivri

Electronics => Projects => Topic started by: papy_bidouille on September 08, 2017, 07:07:25 19:07



Title: camera RS485
Post by: papy_bidouille on September 08, 2017, 07:07:25 19:07
I want to control the zoom of a samsung SNZ-6320P camera by 2 buttons via rs485. The protocol supports are RS-485 protocol
Samsung-T / E, Pelco-P / D, Panasonic, Honeywell, AD, Vicon, Bosch, GE
someone knows the sequence to send to zoom in and out
big thanks in advance


Title: Re: camera RS485
Post by: UncleBog on September 09, 2017, 09:14:15 09:14
Plenty of information on the Pelco protocol on the internet, see https://www.codeproject.com/Articles/8034/Pelco-P-and-D-protocol-implementation-in-C (https://www.codeproject.com/Articles/8034/Pelco-P-and-D-protocol-implementation-in-C) for commands and coding examples.


Title: Re: camera RS485
Post by: papy_bidouille on September 18, 2017, 08:26:46 08:26
Hello,
μP pic 16F628 interface SN75176
I use the SAMSUNG-T protocol but I can not communicate with the camera. here the code I use (simple code) someone can tell me what's wrong.
  in simulation under proteus it seems to work
joint protocol samsung-T
big thanks


Title: Re: camera RS485
Post by: Wilksey on September 18, 2017, 10:55:15 10:55
Silly question,

Are you using an RS485 transceiver IC?

Also -
The baud rate is set to 4800 in the code, manual shows 9600, has the BR been changed on the camera?

I don't see any serial receive code, if you don't read from the port will this not cause a buffer overrun and shut down the UART from working until it is cleared?  Can't remember how CCS handles it.


Title: Re: camera RS485
Post by: papy_bidouille on September 18, 2017, 05:53:28 17:53
ont peut,  je pense envoyer seulement des ordres sans reponse tous les 70ms minimun comme indique en debut de doc du protocol .4800Bd c'est pour aller plus loin la camera l'accepte et est regle pour cela.joint simulation sous proteus
merci


Title: Re: camera RS485
Post by: Wilksey on September 18, 2017, 09:22:21 21:22
And again in English?


Title: Re: camera RS485
Post by: papy_bidouille on September 19, 2017, 08:27:19 08:27
sorry i did not pay attention
can i think i send only orders with no response every 70ms minimun as indicated in the beginning of doc of the .4800Bd protocol is to go further the camera accepts it and is set for it.joint simulation under proteus
thank you


Title: Re: camera RS485
Post by: Wilksey on September 19, 2017, 10:21:06 10:21
Ok, but you haven't really answered any of my questions have you?


Title: Re: camera RS485
Post by: token0 on August 02, 2018, 01:45:18 01:45
the sequence to send to zoom in and out

For Pelco D protocol:

Code:
Zoom +: FF 01 00 20 00 00 21
Zoom -: FF 01 00 40 00 00 41

Bytes:
1. Sync byte, it is always 0xFF;
2. Address of device (PTZ of camera in your case) on RS485/482;
3. First byte of standard Pelco-D commands;
4. Second byte of standard Pelco-D commands;
5. First data byte #00 to #3F — typically controls left-right (positive and negative) pan speed;
6. Second data byte #00 to #3F — typically controls up-down (positive and negative) pan speed;
7. Checksum: eight-bit sum from second to sixth bytes.