RS-232 Control for Panasonic TH42PWD8UK
ericthompson
Posts: 28
Hey everyone. I am really struggling here. I am pretty new to AMX programming, and I simply trying to talk to the plasma. I am using "Control a Device" in Netlinx. I have notifications on, and every time I send a string, I get a hex-based response, but it doesn't do what it is told. Each responsce is different, but it has never been the ER401 as the manual says. According to AMX tech support, I should be entering things correctly, but here it is, because something has to be wrong.
I am sending the command to to Device: 5001 Port: 6 System:1. The string radio button is chosen and the String Expressions box is checked. Here is the entry for a few commands that should work according to the manual and AMX.
"$02,'PON',$03"
POWER ON
"$02,'IMS:SL2',$03"
SWITCH TO INPUT 2
What is incorrect here?
Eric
I am sending the command to to Device: 5001 Port: 6 System:1. The string radio button is chosen and the String Expressions box is checked. Here is the entry for a few commands that should work according to the manual and AMX.
"$02,'PON',$03"
POWER ON
"$02,'IMS:SL2',$03"
SWITCH TO INPUT 2
What is incorrect here?
Eric
0
Comments
You can set the baud rate by using Control a Device also. Same D:P:S. Message type = "Command" Uncheck "String Expressions. And then send the following string:
SET BAUD 9600,N,8,1 485 DISABLE
I thought I tried that. As a matter of fact. I changed the port speed of the other ports to 9600. Originally this device was on port 5. During my discussion with AMX, I seemed to lose communication. I would send a command and see the red light on Port 5, but it would not light up the yellow light for receiving a response. I switched it to port 6, thinking something must be wrong with port 5. I did check it, and it was incorrect. It was set to 38400,N,8,1 485 DISABLED. I set the baud to 9600,N,8,1, 485 DISABLED, and now it acts just like port 5. And sure enough when I changed both ports 5 and 6 to 38400, I do get a response from the device, but it is obviously wrong since nothing works. Everything in the manual says it should be set to 9600 as you suggested...
What else could it be? Crossed wires?
Eric
The commands you are using look correct according to the doc.
Power On
"$02,'**PON',$03"
Power Off
"$02,'**POF',$03"
I haven't controlled the plasma you have but maybe the manual is wrong? I've seen protocol documented incorrectly before. It might be worth a shot to try these two commands and see if it gets you anywhere.
I tried the ** addition...no luck unfortunately, but thanks. I am using a cat-5 cable with green for Pin 2 on both sides, green/white for pin 3 on both sides, and orange for pin 5 on both sides, making it straight through, right? I am only using the 3 pins on both sides. I am not shorting pins 7 and 8 on the plasma side. I received a memo from Panasonic saying it was not necessary to short them out, but he was using a PC to make the connection and not a control system. Should that matter?
Why would it give a response at 38400 baud, but not at 9600 baud?
Eric
Good question. It's a garbled response though, correct? That's why I thought it might be a baud rate setting. Hopefully someone who has experience with your plasma can chime in.
I don't know hex well enough to call it gibberish, but it certainly isn't the ER401 response as the manual says it should be. Here are a few examples, that it returns.
I entered "'x135x',13" (a Vidikron code entered into the Panasonic)
Response
Line 214 :: String From [5001:5:1]-[$7F$BD$BB$B5$7F$ED] - 23:18:12
I entered "$02,'PON',$03"
Response
Line 216 :: String From [5001:5:1]-[$FBoo$FB] - 23:19:00
I entered PON (string expression box unchecked for this one)
Response
Line 217 :: String From [5001:5:1]-[_oo] - 23:19:20
How bout sending it a correctly formatted packet but a wrong command, something like:
"$02,'WTF',$03"
and see what it returns.
Well, in the last post on a correct format and command it returned,
Line 216 :: String From [5001:5:1]-[$FBoo$FB] - 23:19:00
With your example it returned,
Line 221 :: String From [5001:5:1]-[$FBw$FB] - 23:35:23
So I guess the question is what is $FB and what is the middle response supposed to say?
Also, do you have a program loaded in the NI Master that has a CREATE_BUFFER or DATA_EVENT with a string handler for the RS-232 port? That will assure that RXON gets triggered. Or you can send the RXON command from control a device.
No, the program is extremely simple at this point, but yes, I just unplugged it from the plasma, and I did still get a response. It is a crimped RS-232 cable that my installer made. The ground wire on the plasma side (male cable) is loose and can come out of the end. However, it does seem to be seated well if pushed back in. Would that still be it? a bad ground? If so, I'll have to fix it tomorrow.
I did pull out all three pins to inspect them. Only the ground has a suspect connection, but like I said it still seems to have a solid contact even though it is not solidly crimped.
On the controller side (female, obviously), I did not removed the wires, but they seem well seated.
"02, 'PON', 03"
no $.
Up to 9, 0x is the same as $0x...
Once you get beyond that, you better know which number system you're using.
- Chip
You may want to try these 2 options
Option 1) Send_String D:P:S,"'PON'"
Option 2) Send_String D:P:S,"$9F,$80,$60,$4E,$00,$CD"
These have worked for me. Also make sure Baud is setup correct on the port.
Hope this helps