Home AMX User Forum AMX Technical Discussion

Newbie question - A little help needed for RS232

Hi there,

I and one more are programming with some AMX equipment connected to a projector, a reciever and a DVD player. The projector we control using IR, but would also like to use by using RS232 as the projector has this possibility.

I can start by saying that we use telnet commands for sending commandos to a NI-3000 controller, and thus using the "pulse" commando. If we are going to use RS232, should we use something other than "pulse"?

And if we have this instruction for commandos available as you can see in the "hex.jpg" attachement. Is this what we can use to send the right signals?

And finally, if we are able to send signals through RS232, is there some way of listening for status or read status of a device? Perhaps through a listener of some sort.

Must excuse for all the dumb questions, but we have no one to teach us in this technology, so everything we do is try and fail:)

Hope someone has the patience to help us.

Thanks in advance
hex.JPG 39.9K

Comments

  • jjamesjjames Posts: 2,908
    Surely someone will help. :D

    First & foremost, what type of projector are you trying to control? Have you tried searching for a module? If you give us the model of the projector, it's possible someone here has used it before.

    To send strings to a device, you would use the keyword SEND_STRING. You'll need to set the baud rate according to the manual / protocol that you have. Then you'll need to complete the string using the manual you've got.
  • oleabakkoleabakk Posts: 8
    Thanks,

    The projector is a Hitachi PJ-TX300 LCD Projector. Haven't found the protocol myself, but perhaps someone has it, or maybe a protocol from another Hitachi projector may be used.
  • oleabakkoleabakk Posts: 8
    Ok,

    Hitachi sent me the RS232 protocol for the projector. So I now got a complete list of commands for the device. See the attached pdf file.

    So all I now need to know is howto send commandos using any send command, and if there is possible to listen to any response.
  • Here's a basic example of using the SEND_STRING with the protocol you posted:
    DEFINE_DEVICE
    
    (*ACTUAL DEVICES*)
    dvProjector      =  5001:1:0		//Hitachi Projector PJ-TX300
    dvTouchpanel     = 10001:1:0            //Touchpanel
    
    DEFINE_EVENT
    
    DATA_EVENT [dvProjector] 
    {
         ONLINE:
          {
             SEND_COMMAND dvProjector,"'SET BAUD 19200,N,8,1'"
          }
    }
    
    BUTTON_EVENT[dvTouchpanel,1]		//Button Press on Touchpanel, Button #1 - Projector 'Off'
    {
      PUSH:
      {
    	SEND_STRING dvProjector, "$BE,$EF,$03,$06,$00,$2A,$D3,$01,$00,$00,$60,$00,$00"
      }
    } 
    

    The feedback is a little more complex and will be in the DEFINE_EVENT section under a DATA_EVENT and you'll need to parse the data once it comes in.

    Hope this helps.

    --John
  • jjamesjjames Posts: 2,908
    Ummm...
    Here's a basic example of using the SEND_COMMAND with the protocol you posted...
    That'd work except . . . if you read my first post I said you must use SEND_STRING. The code you posted will do nothing to the projector's power status.

    So, once again - SEND_STRING for device control (power, input, etc.) and SEND_COMMAND for baud rates, IR on/off timing (if it were an IR device), etc., etc.
  • Corrected!

    Thanks jjames,

    I was in send_command to a module mode in my head... didn't even notice that. Thanks for the catch.

    Above post is now corrected.

    --John
  • jjamesjjames Posts: 2,908
    Thanks jjames,

    I was in send_command to a module mode in my head... didn't even notice that. Thanks for the catch.

    Above post is now corrected.

    --John
    No prob - sorry if I came off brash - after re-reading my post, it didn't sound too nice - but believe me, really am nice! :D
Sign In or Register to comment.