Panasonic Camera? A funky Serial Port? A cautionary tale
feddx
Posts: 183
There is a lot of detail here to avoid wasting people's time and making them pump me for information I should have provided in the first place. So bear with me.
I'm doing a job for a client that wants a new camera. He decides to go with the Panasonic AW-HE870 HD convertible camera using the AW-PH360 Pan/Tilt head. I call the manufacturer to get the protocol guide, and I am happy to see the usual Panasonic code for power on ('#O1',$0d or '#On',$0d), power off ('#O0',$0d or '#Of',$0d), pan ('#PXX',$0d), tilt ('#TXX',$0d), zoom ('#ZXX',$0d), and focus ('#FXX',$0d). Baud rate is 9600, N, 8,1 no flow control. I even mock it up at my desk with Tx, Rx, and GND (note: only 3 wires used), and easily control the camera with a terminal program on my laptop, and control the camera with my test NI-4000 as well. Thorough and straight-forward. I've had no real problems controlling Panasonic Cameras in the past so I think I'm looking at an easy day. Right.
I arrive on site, I connect the camera to the client's NetLinx System (an NI-4000 running the latest non-duet firmware) using a new NXC-COM2 card in the master. I load my altered code and attempt to control the camera. Nothing.
I try to send strings to the device in Studio through the master. Nothing.
I swap pins 2 and 3 just as a precaution, attempt control. Nothing.
Just to see, I connect my laptop to the device, and send the on string. It comes on. I connect back to the restored (straight through as opposed to the null-modem test I wired) wiring from my NetLinx master, and viola! It's panning and tilting like a champ.
After some head scratching, I go on about testing thinking there must be bad mojo, and it was something I did wrong. All is well, the camera is doing exactly what it should, and then I power off the camera. I attempt to power it back up from the NetLinx, and nothing.
I assume that the distance of the RS-232 wiring (~100 feet) may be the problem, so I pull the card out of the Master, and run ICSNet to a NetModule Shell, put the card in the card slot, and place that within 5 feet of the camera. I adjust the rig so I can see the Tx and Rx lights on the card, and commence testing. Again I am unable to power the camera on with the NetLinx.
I reconnect the camera with my laptop and send the power on command. It turns right on. Again I reconnect the camera to the NetLinx Master, this time via the NetModule Shell and Com2 card, and everything works great from the control system. The Master can do everything control wise to this device, and receive feedback while it is on. Even responding with a 'p1' (power state is on) when sending the power on string while it is in the on state (meaning it recognizes the power on command), but if the device is turned off, the NI-4000 cannot power it up. I even went so far as to take the EXACT cable I was using from my laptop to power it on (I built it and I know there are only 3 wires Tx, Rx, & GND) and connect that to several of the AMX's ports to see if I might be missing something. With that cable (~150') I could power it on in a terminal session from the laptop, or using the manufacturer’s software from my laptop, but no matter which port I tried on that AMX master, it wouldn't power on.
Things I attempted to fix this: repeatedly sending the power on command, doubling up on the $0d at the end of the string, adding a $0a at the end of the string, adding a $0d at the beginning of the string (to clear out the camera’s commands), sending only hex characters (even though I've been told repeatedly that the AMX treats an equivalent ASCII Character, a Hex value, and a Decimal value exactly the same), connecting my laptop to the AMX port to ensure that I was indeed sending the correct string information to the device (I was), using the manufacturer’s software to turn on and off the camera and monitoring the output on an AMX port to be sure it was the same as the strings I was sending (it was), using local and remote power were on the NetModule Shell with exactly the same unsuccessful results, adjusting the CHARD and CHARDM values from 10 to 200 in increments of 10 (it's a blast, you should try it), attempting to connect the camera to several ports on 2 different NI-4000 (including my test one running Duet firmware), different cables, XON, XOFF, shorting pins (I was getting desperate), spending hours on the phone with AMX Tech Support, hours on the phone with Panasonic (lots and lots of rewiring and head scratching from both. Really. Lots), connecting into the port and attempting to send the string in PASS mode, and prayer (although I'm sure to most my prayers sounded like a mad man raging out at an unseen enemy). None of these provided me with any new insight, other than there was something just not working correctly.
At the end of the second day (I was also upgrading the system to use a Tandberg C60, so not solely diagnosing this), I finally got a call back from one of my West Coast contacts who is a developer/engineer for this line. After explaining everything I'd done over 2 days, and him offering a few suggestions (baud rate, no flow-control, etc, and then, "...are you SURE you're not using something that is emulating the port? Such as a USB to serial adapter?"), even he was stumped and let me know that I WASN’T losing my tattered mind. He was adamant about the fact that if the device is being controlled from the AMX in it’s on state, there’s no reason that it shouldn’t power on from it’s off state. Especially when the device works flawlessly when controlled from a computer using a terminal program or the manufacturer’s software program.
Why am I going on and on? Because I want some answers. Has anyone else experienced anything like this? With any device?
I’m pretty sure this is a two-fold issue. The first part is that the AW-PH360 in its off state is not as receptive as it is in its on state. It may not be seeing enough voltage potential in the transmission from the serial port of the AMX when it’s off (though while it’s on, it recognizes and responds to the string). This may be uncharacteristic of the model line, but no one from Panasonic is telling me that their equipment may be to blame (Note: When discussing this issue with another programmer, he indicated that this exact scenario happened to him. So it’s not a unique occurrence). The other part of this issue has something with the AMX serial port. It is either not sending enough positive or negative voltage to trigger the camera, or there’s something else going on electronically that I’m unaware of. In any case, after going through many different tests and diagnostic measures, I have no idea why this is happening. I stopped short of using the client’s oscilloscope and monitoring the AMX pulses versus the laptop’s pulses to compare the two and see what was lacking, because I found another solution. But if I had more time, it would have been an option.
Thoughts and comments appreciated. And really, what’s the average installer/designer/programmer to do in this situation? Thank you in advance for taking the time read/reply to this.
I'm doing a job for a client that wants a new camera. He decides to go with the Panasonic AW-HE870 HD convertible camera using the AW-PH360 Pan/Tilt head. I call the manufacturer to get the protocol guide, and I am happy to see the usual Panasonic code for power on ('#O1',$0d or '#On',$0d), power off ('#O0',$0d or '#Of',$0d), pan ('#PXX',$0d), tilt ('#TXX',$0d), zoom ('#ZXX',$0d), and focus ('#FXX',$0d). Baud rate is 9600, N, 8,1 no flow control. I even mock it up at my desk with Tx, Rx, and GND (note: only 3 wires used), and easily control the camera with a terminal program on my laptop, and control the camera with my test NI-4000 as well. Thorough and straight-forward. I've had no real problems controlling Panasonic Cameras in the past so I think I'm looking at an easy day. Right.
I arrive on site, I connect the camera to the client's NetLinx System (an NI-4000 running the latest non-duet firmware) using a new NXC-COM2 card in the master. I load my altered code and attempt to control the camera. Nothing.
I try to send strings to the device in Studio through the master. Nothing.
I swap pins 2 and 3 just as a precaution, attempt control. Nothing.
Just to see, I connect my laptop to the device, and send the on string. It comes on. I connect back to the restored (straight through as opposed to the null-modem test I wired) wiring from my NetLinx master, and viola! It's panning and tilting like a champ.
After some head scratching, I go on about testing thinking there must be bad mojo, and it was something I did wrong. All is well, the camera is doing exactly what it should, and then I power off the camera. I attempt to power it back up from the NetLinx, and nothing.
I assume that the distance of the RS-232 wiring (~100 feet) may be the problem, so I pull the card out of the Master, and run ICSNet to a NetModule Shell, put the card in the card slot, and place that within 5 feet of the camera. I adjust the rig so I can see the Tx and Rx lights on the card, and commence testing. Again I am unable to power the camera on with the NetLinx.
I reconnect the camera with my laptop and send the power on command. It turns right on. Again I reconnect the camera to the NetLinx Master, this time via the NetModule Shell and Com2 card, and everything works great from the control system. The Master can do everything control wise to this device, and receive feedback while it is on. Even responding with a 'p1' (power state is on) when sending the power on string while it is in the on state (meaning it recognizes the power on command), but if the device is turned off, the NI-4000 cannot power it up. I even went so far as to take the EXACT cable I was using from my laptop to power it on (I built it and I know there are only 3 wires Tx, Rx, & GND) and connect that to several of the AMX's ports to see if I might be missing something. With that cable (~150') I could power it on in a terminal session from the laptop, or using the manufacturer’s software from my laptop, but no matter which port I tried on that AMX master, it wouldn't power on.
Things I attempted to fix this: repeatedly sending the power on command, doubling up on the $0d at the end of the string, adding a $0a at the end of the string, adding a $0d at the beginning of the string (to clear out the camera’s commands), sending only hex characters (even though I've been told repeatedly that the AMX treats an equivalent ASCII Character, a Hex value, and a Decimal value exactly the same), connecting my laptop to the AMX port to ensure that I was indeed sending the correct string information to the device (I was), using the manufacturer’s software to turn on and off the camera and monitoring the output on an AMX port to be sure it was the same as the strings I was sending (it was), using local and remote power were on the NetModule Shell with exactly the same unsuccessful results, adjusting the CHARD and CHARDM values from 10 to 200 in increments of 10 (it's a blast, you should try it), attempting to connect the camera to several ports on 2 different NI-4000 (including my test one running Duet firmware), different cables, XON, XOFF, shorting pins (I was getting desperate), spending hours on the phone with AMX Tech Support, hours on the phone with Panasonic (lots and lots of rewiring and head scratching from both. Really. Lots), connecting into the port and attempting to send the string in PASS mode, and prayer (although I'm sure to most my prayers sounded like a mad man raging out at an unseen enemy). None of these provided me with any new insight, other than there was something just not working correctly.
At the end of the second day (I was also upgrading the system to use a Tandberg C60, so not solely diagnosing this), I finally got a call back from one of my West Coast contacts who is a developer/engineer for this line. After explaining everything I'd done over 2 days, and him offering a few suggestions (baud rate, no flow-control, etc, and then, "...are you SURE you're not using something that is emulating the port? Such as a USB to serial adapter?"), even he was stumped and let me know that I WASN’T losing my tattered mind. He was adamant about the fact that if the device is being controlled from the AMX in it’s on state, there’s no reason that it shouldn’t power on from it’s off state. Especially when the device works flawlessly when controlled from a computer using a terminal program or the manufacturer’s software program.
Why am I going on and on? Because I want some answers. Has anyone else experienced anything like this? With any device?
I’m pretty sure this is a two-fold issue. The first part is that the AW-PH360 in its off state is not as receptive as it is in its on state. It may not be seeing enough voltage potential in the transmission from the serial port of the AMX when it’s off (though while it’s on, it recognizes and responds to the string). This may be uncharacteristic of the model line, but no one from Panasonic is telling me that their equipment may be to blame (Note: When discussing this issue with another programmer, he indicated that this exact scenario happened to him. So it’s not a unique occurrence). The other part of this issue has something with the AMX serial port. It is either not sending enough positive or negative voltage to trigger the camera, or there’s something else going on electronically that I’m unaware of. In any case, after going through many different tests and diagnostic measures, I have no idea why this is happening. I stopped short of using the client’s oscilloscope and monitoring the AMX pulses versus the laptop’s pulses to compare the two and see what was lacking, because I found another solution. But if I had more time, it would have been an option.
Thoughts and comments appreciated. And really, what’s the average installer/designer/programmer to do in this situation? Thank you in advance for taking the time read/reply to this.
0
Comments
I only ask as I've had problems controlling devices via a NXC-COM2 ie, not working at all, when the exact cable plugged into a 5001 com port works fine.
I tried both ports on 2 com card and 3 of the integrated ports on their NI-4000, and 2 integrated ports on my NI-4000.
Yes. I checked several ports. All of them sent the string " '#O1',$0d " back to my laptop from the AMX. And as I wrote, when the Camera is in it's on state, it recognizes that command from the AMX and replies with " 'p1',$0d ". It's not a matter of the device receiving the string, it's a matter of HOW the device receives it and WHY the device doesn't recognize it if it's powered off.
I just converted to IR and moved on.
Jeff