Denon 2309 via RS232 for Newbie
JackWatson
Posts: 3
Hey guys, I'm a recent Programmer I, but this is my first real world implementation of a serial controlled device and I feel like I'm loosing this tiny, little battle.
I'm running this in a basic dev environment, so its just an NI-700 connected to Serial port 1, with a 8400 panel for human input. I've made the control cable, but verified it at least a half dozen times: Pin 5 is ground, Pins 2/3 are Tx/Rx and they do crossover in between, so pin 2 becomes pin 3 and vice versa.
When sending strings, I see both the Tx and Rx LEDs of the 700 light-up, indicating communication, but the receiver remains unresponsive, regardless of its powered state, Standby or On.
I've attached my code.
Thanks for any insight you guys can provide,
--Jack
I'm running this in a basic dev environment, so its just an NI-700 connected to Serial port 1, with a 8400 panel for human input. I've made the control cable, but verified it at least a half dozen times: Pin 5 is ground, Pins 2/3 are Tx/Rx and they do crossover in between, so pin 2 becomes pin 3 and vice versa.
When sending strings, I see both the Tx and Rx LEDs of the 700 light-up, indicating communication, but the receiver remains unresponsive, regardless of its powered state, Standby or On.
I've attached my code.
Thanks for any insight you guys can provide,
--Jack
DEFINE_DEVICE Master = 0:1:0 // NI-700 Controller dvReceiver1 = 5001:1:0 // RS-232, Receiver, Denon 2309-CI, 9600, N, 8, 1 dvTP = 10001:1:0 // MVP-8400 DEFINE_VARIABLE DEFINE_EVENT // Initialize Denon Receiver DATA_EVENT[dvReceiver1] { ONLINE: { SEND_COMMAND dvReceiver1,"'SET BAUD 9600,N,8,1'" SEND_COMMAND dvReceiver1,"'RXON'" } } // Receiver Transports BUTTON_EVENT[dvTP,20] BUTTON_EVENT[dvTP,21] BUTTON_EVENT[dvTP,22] BUTTON_EVENT[dvTP,23] { PUSH: { SWITCH(BUTTON.INPUT.CHANNEL) { CASE 20: SEND_STRING dvReceiver1,"'PWON',$0D" // ON CASE 21: SEND_STRING dvReceiver1,"'PWSTANDBY',$0D" // OFF CASE 22: SEND_STRING dvReceiver1,"'MVUP',$0D" // VOL + CASE 23: SEND_STRING dvReceiver1,"'MVDOWN',$0D" // VOL - } } } DEFINE_PROGRAM
0
Comments
Otherwise, use diagnostics to see what strings are coming back from the receiver, and/or try to talk to it manually via Hyperterminal to make sure your cable is good.
I referenced this in the post, "...the receiver remains unresponsive, regardless of its powered state, Standby or On...", but perhaps that statement hadn't come out as clear as I had intended. My apologies.
Thanks for the quick response, though, I'd hadn't known about trying it via HyperTerminal, for both communication and checking the cable, but it makes sense.
Thanks again.
SEND_COMMAND dvRCVR,"'SET BAUD 9600,N,8,1',13"
Another helpful trick is to monitor what message is being returned by the receiver:
You will be able to view the returned string in the Netlinx Studio 2 output window, once you have connected to the master and enabled Netlinx internal diagnostics messages.
Later you will be able to create parsing routines on the string feedback that you find!
Avophile: Thanks for the response, the code I submitted was just a snippet, as I do parse the buffer and return it to the panel for some "instant gratification."
Also, I was using the Notifications tab, but this time the receiver was just not responding. Actually, it technically never heard the request, so it had nothing to respond to.
Jweather: Thanks for the HyperTerminal suggestion, as its what ultimately led to a working control system. As I was attaching my laptop to the receiver, I turned the receiver around to more accommodate the laptop and noticed the label on the receiver stating "RS232C Straight Cable." After I smacked my head, I fab'd up a new cable with no crossover, opened HyperTerminal, and immediately saw the Master Volume level being sent to my session. Total noob.
Thanks guys.
Would you be willing to share your 2309 code ?
I've just got the same unit - and have recently completed my Programmer 1 too, and would like to see some code for this.
Thanks
Dean.
Paul
You don't need a carriage return for a send_command.
I have one of the HD Radio Denon receivers at home (model number escapes me) It buffers its own commands. It has one of the friendliest serial ports I've ever met.
--John
--John
Not if there is a HOLD. Then strings can be sent multiple times a second depending on your repeat time.
Paul