Display incoming RS232 on touch panel

bia@jdm.dk[email protected] Junior MemberPosts: 20
Hi

What are the easiest way to display incoming RS232 strings, from a specific port - on a textbox on a touch panel ?

I need to make sure that the correct RS232 codes are transmitted from my external equipment....

Comments

  • jjamesjjames AMX Sustaining Engineer Posts: 2,898
    Create a text box on your touch panel, give it a variable text address.

    Parse out the strings coming in (or out) of the device, and send a ^TXT command to the panel.

    example:

    send_command dvTP,"'^TXT-1,0,',s_data";

    Where s_data holds the information you want to see. Just hope there aren't any non-readable characters and it's all ascii. Otherwise, you probably won't get what you want. The best bet though is to turn on notifications and watch incoming and outgoing strings.
  • DHawthorneDHawthorne Junior Member Posts: 4,584
    The trick is not sending strings out too fast ... what a serial port can handle at speed is far more than what a touch panel can handle. If you want it on a per-character basis, like a teletype, you are likely to bring the panel to its knees and lock up the message queue. If you can clearly delineate relatively small blocks of test, wait for the whole thing to come in and send it in one command.
  • freijnenfreijnen Junior Member Posts: 18
    Just use netlinxs device notications to monitor all incoming and outgoing rs232 messages.
    No need for programming a touchpanel...just read all messages in a list in netlinx studio.
    This is a very powerfull tool to debug serial protocol issues.
    You can also use the "control a device" option to send a rs232 message on any port without changing the amx program.
  • vegastechvegastech Junior Member Posts: 369
    Thought it was a good idea...

    This would be a neat feature for an installer to use, if they weren't familiar enough with NS to use device notifications. Consider this - a surround receiver stops responding to control. If an installer had a super-secret installer page to go to, he could bring it up, see the text window for that serial port, try playing with the receiver, and see if strings start to come back. once strings show up again (likely after a reboot - it's happened alot to me. Yay for Denon.), it's all good! However, it sounds like a lot of work for very little gain, now that I'm typing this out! Man, I wasted a lot of typing just to talk myself out of doing something - great....Back to thinking of other bad ideas!
  • viningvining X Member Posts: 4,348
    vegastech wrote: »
    This would be a neat feature for an installer to use, if they weren't familiar enough with NS to use device notifications. Consider this - a surround receiver stops responding to control. If an installer had a super-secret installer page to go to, he could bring it up, see the text window for that serial port, try playing with the receiver, and see if strings start to come back. once strings show up again (likely after a reboot - it's happened alot to me. Yay for Denon.), it's all good! However, it sounds like a lot of work for very little gain, now that I'm typing this out! Man, I wasted a lot of typing just to talk myself out of doing something - great....Back to thinking of other bad ideas!
    It's along the right idea but like you said it's a fair bit of work and just usefull to the tech when he/she is on site. Whether you poll or just send commands when needed who can always notify the user or yourself that comms appear to be down when you get no response. You can simply notify the customer via a pop up and suggest they reboot the "Denon AVR" in your example or send an email or text to yourself or the customer about the problem and possible solution. Unfortunately both those ideas requires the user to do something to immediately correct the problem or they have to wait for a service call (a day or two away) before they're up and running again. The better solution would be to have a controllable power feed to these devices that tend to have issues and then automatically through code you can see comms are down and control the power to the device to force a hard reboot. Hopefully after that comms will return to normal and customer didn't even notice there was a problem at all. You can send yourself an FYI and obviously if comms don't return a message saying there's a problem so you can schedule a service call. You can also notify the customer via pop up or email that there's a problem, your company is aware and will be there shortly (next day or two) to affect repairs. Then your cutomer would be thoroughly impressed.
  • rayglraygl Junior Member Posts: 3
    I found a command that adds text to a text box. Using a large text box, small font and carriage returns I could fill up the page and have them scroll up the page. It showed a good history.

    The command:

    SEND_COMMAND dvTP2,"'^BAT-91,0, ',' ',TP_WORD,' ',TWORD,$0D,$0A" // Adds to text on a page

    Where 91 is the button address number and the zero is just needed.
  • HARMAN_lasthumanHARMAN_lasthuman Junior Member Posts: 11
    freijnen wrote: »
    Just use netlinxs device notications to monitor all incoming and outgoing rs232 messages.
    No need for programming a touchpanel...just read all messages in a list in netlinx studio.
    This is a very powerfull tool to debug serial protocol issues.
    You can also use the "control a device" option to send a rs232 message on any port without changing the amx program.

    These features are also available within the Netlinx master's web interface. If an installer is onsite and doesn't have NetLinx Studio on his laptop he's still able to troubleshoot.
  • John NagyJohn Nagy CineTouch Product Manager Posts: 1,503
    Good point about the features now in the NetLinx web server. If you haven't looked around in it for a year or two, you don't know all it can do. It has MUCH of the STUDIO stuff now built in, on the web. Dig around a while, some of the tabs and buttons aren't entirely intuitive about what lies behind them. Good stuff.
Sign In or Register to comment.