RS422 on NI700
VladaPUB
as it is !
I need to send Hex code to camera witch is connected to Serial port 1 on NI700 over RS 422 !
Question is how to set port to act like RS422 and not as RS232 and how to send Hex code !
Ugrent
Question is how to set port to act like RS422 and not as RS232 and how to send Hex code !
Ugrent
Comments
-
I think it is SEND_COMMAND device,"'SET BAUD 9600,N,8,1 422 ENABLE'"
The 9600,N,8,1 is only an example. -
No special setting is necessary for 232 and 422 -- all you have to do is use the correct pins on the port and on the device and insure that you set. 485 DISABLE with your set baud command.
We recently used rs422 for a sony evid70 camera and my notes show this connection works:
AMX 1 to CAM 1
AMX 4 to CAM 4
AMX 5 to CAM 5
AMX 6 to CAM 2
AMX 9 to Cam 3
Of course, that may not work for a different camera. I don't believe that there is a standard, or even customary, pinout for RS 422.
If you hook it up and you send it what you know to be good strings and your NI700 shows garbage strings coming back, therre is a good chance that you have the "polarity" of your send and receive inverted. Please, don't ask me how I know this. -
I just re-read my previous message and I'm not sure that I got the basic point worded correctly. At best it was a little sloppy.:
With all AMX serial ports that handle RS232, RS422, and RS485, RS422 and RS232 are enabled with the exact same configuration. That is, for either RS232 or RS422, you send the same set_baud command, whatever is appropriate for the device. 485 needs to be "DISABLE".
I believe that RS232 will actually work with either "485 ENABLE" or "485 DISABLE", though I have not tested this -- not deliberately anyways. RS422 and RS485 are mutually exclusive because they use the same pins(1, 4, 6, and 9) -
VladaPUB wrote:I need to send Hex code to camera witch is connected to Serial port 1 on NI700 over RS 422 !
Question is how to set port to act like RS422 and not as RS232 and how to send Hex code !
Ugrent
to send hex codes: SEND_STRING dvDEVICE,"$01,$A2,$F5,$AB,$23,$02"
You do have to be cautious tho, because some devices really want an ASCII based string of HEX codes, not actually HEX values.
Jeff -
I have example od commands that is written in manual :
88 30 01 FF - Address setting
8X 01 04 00 02 FF - Camera ON (x is camera address number)
8X 01 04 00 03 FF - Camera OFF (x is camera address number)
And when I send that commant I have comunication (i can see on NI 700 that controler do Tx and Rx ) but camera do nothing. -
This is program example, just to address camera and to turn in on and off.
PROGRAM_NAME='Program' (***********************************************************) (* System Type : NetLinx NI700 *) (***********************************************************) (* REV HISTORY: Version 0.1 *) (***********************************************************) DEFINE_DEVICE dvPANEL = 10001:1:0 // Touchpanel dvKamera = 5001:1:1 //Sony Kamera DEFINE_START SEND_COMMAND dvKamera,"'SET BAUD 9600,N,8,1 485 DISABLE'" DEFINE_EVENT BUTTON_EVENT[dvPANEL,1] //CAM ON { PUSH : { SEND_STRING dvKamera, "'8101040002FF'" } } BUTTON_EVENT[dvPANEL,2] // CAM OFF { PUSH : { SEND_STRING dvKamera, "'8101040003FF'" } } BUTTON_EVENT[dvPANEL,3] //CAM ADRESS SET TO 1 { PUSH : { SEND_STRING dvKamera, "'883001FF'" } } DEFINE_PROGRAM
And it does not working . . . . . -
VladaPUB wrote:This is program example, just to address camera and to turn in on and off.
PROGRAM_NAME='Program' (***********************************************************) (* System Type : NetLinx NI700 *) (***********************************************************) (* REV HISTORY: Version 0.1 *) (***********************************************************) DEFINE_DEVICE dvPANEL = 10001:1:0 // Touchpanel dvKamera = 5001:1:1 //Sony Kamera DEFINE_START SEND_COMMAND dvKamera,"'SET BAUD 9600,N,8,1 485 DISABLE'" DEFINE_EVENT BUTTON_EVENT[dvPANEL,1] CAM ON { PUSH : { SEND_STRING dvKamera, "'8101040002FF'" } }
And it does not working . . . . .
Do the SET BAUD in the DATA_EVENT..ONLINE of the Camera device:DEFINE_EVENT[dvKamera] { ONLINE: { SEND_COMMAND DATA.DEVICE,'SET BAUD 9600,N,8,1 485 DISABLE } }By default, the ports working with 38400 baud. In NetLinx, the DEFINE_START section is passed much earlier as the devices are ready to operate, so the command in DEFINE_START in most cases will fail.
Afaik the Sony cameras use hex values:SEND_STRING dvKamera,"$81,$01,$04,$00,$03,$FF"
Regards, -
RS232 Code for EVI Series
On = SEND_STRING CAMERA,"$81,$01,$04,$00,$02,$FF"
Off = SEND_STRING CAMERA,"$81,$01,$04,$00,$03,$FF"
$81 = Camera 1, $82 = Camera 2 etc ; $88 is broadcast to all cameras
Hope this helps
Cheers -
I have tried thad, but nothing is happening. I think that problem is in camera or in comuniction (pinouts, cable....).
Still have a problem ! -
Hedberg wrote:No special setting is necessary for 232 and 422 -- all you have to do is use the correct pins on the port and on the device and insure that you set. 485 DISABLE with your set baud command.
We recently used rs422 for a sony evid70 camera and my notes show this connection works:
AMX 1 to CAM 1
AMX 4 to CAM 4
AMX 5 to CAM 5
AMX 6 to CAM 2
AMX 9 to Cam 3
Of course, that may not work for a different camera. I don't believe that there is a standard, or even customary, pinout for RS 422.
If you hook it up and you send it what you know to be good strings and your NI700 shows garbage strings coming back, therre is a good chance that you have the "polarity" of your send and receive inverted. Please, don't ask me how I know this.
I am also trying to control D70 so ih you can send me some code example that would be great !!! -
rs422 hex and ascii
Hey There,
The rs422 is a symetric connection using 2 wires for tansmitt and two for receive.
Make shure that you have the right wire to the right pin. Most of the time the wires are named as A and B or + and - or TX-,TX+,RX- and RX+. How to find the right wire?
Here is the way TX+: logic 0 = 0v Logic 1= -VCC TX- Logic 0= -VCC Logic 1= 0V.
For the RX line the same level are used for + and-
But how to measure? It's quit simple. Make a small program that repeats sending $FF (1111 1111) and measure between the lines and ground. After that you are sure that you have the right connection.
About the Hex and Ascii value's. There's not difference (with some exeptions).
Ascii A is equal to Hex 41 or decimal 65. So it makes no difference what you send.
But there are exeptions for example it you want to send a value from the extended ASCII set (>127) you'll find strange ascii charaters for it so it's better to send a hex or decimal value. Other example: If you must do a calculation in your string (like a checksum) you must use Hex instead of ASCII because calculation cannot be done on ascii string without a ATOI. Be aware that some protocolls uses PSEUDO HEX. This means that the HEX value's are written as a ASCII string. For example $3E is sending as '3E' or in hex notation as "$33,$45". Some equipment uses this notation like for example BIAMP and it's not the most easy way to program.
Hope this info is usefull to you.
Good Luck
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
