Home AMX User Forum AMX Technical Discussion

Feed back issue with 232++

Here I am facing a problem with one AXB-RS232++ box. I am using this to control a LCD. I assign the device no as 85:1:1 and set the baud rate 9600,8,n,1 in the box. In my program I created a buffer to process the feedback. I can able to ontrol the LCD but I am not getting any feed back to my buffer. But I noticed that the RX LED on the box is lighting up when I am sending a quarry to the LCD. Also I did a loop back test. Even in the notification option I can see the strings passing to the LCD but can?t see the strings coming back to the box. I tested this LCD with my master control serial port and its working fine.

I tried with another 232++ but the result is same any can anyone help me to fix this?

Comments

  • ericmedleyericmedley Posts: 4,177
    Binu wrote: »
    Here I am facing a problem with one AXB-RS232++ box. I am using this to control a LCD. I assign the device no as 85:1:1 and set the baud rate 9600,8,n,1 in the box. In my program I created a buffer to process the feedback. I can able to ontrol the LCD but I am not getting any feed back to my buffer. But I noticed that the RX LED on the box is lighting up when I am sending a quarry to the LCD. Also I did a loop back test. Even in the notification option I can see the strings passing to the LCD but can?t see the strings coming back to the box. I tested this LCD with my master control serial port and its working fine.

    I tried with another 232++ but the result is same any can anyone help me to fix this?

    Please post the code where you populate the buffer. Perhaps the problem is there.
  • toddttoddt Posts: 28
    The AXB-232's seem to come with some programming in the. I have had this problem before and found that it is best to send the ZAP command to them. I as a norm create an Data event for the device and send the ZAP command everyting it come online. You will get return data once you have ZAP'd the box.
  • toddttoddt Posts: 28
    Here is a sample as to how I write the zap command.

    DATA_EVENT [device]
    {
    ONLINE :
    {
    SEND_COMMAND device,'ZAP!'
    SEND_COMMAND device,'RXON'
    }
    }
  • BinuBinu Posts: 49
    Code

    This is the code

    PROGRAM_NAME='LCD'

    DEFINE_DEVICE

    LCD = 85:1:1

    TP = 10001:1:1


    DEFINE_CONSTANT

    DEFINE_TYPE

    STRUCTURE cLCDSTATUS
    {
    INTEGER POWER
    CHAR SOURCE[15]
    }

    DEFINE_VARIABLE

    cLCDSTATUS LCDSTAT[5]

    CHAR LCD_BUFFER [512]


    DEFINE_LATCHING

    DEFINE_MUTUALLY_EXCLUSIVE


    DEFINE_START

    CREATE_BUFFER LCD,LCD_BUFFER

    DEFINE_EVENT

    DATA_EVENT[LCD]
    DATA_EVENT[LCD]
    {
    ONLINE:
    {
    //SEND_COMMAND DVLCD1,"'SET BAUD 9600,N,8,1,485 DISABLE'"
    WAIT 50
    {
    //POWER_OFF_ALL_LCDS()
    }

    }
    OFFLINE:
    {

    }
    STRING:
    {
    SELECT
    {
    ACTIVE(FIND_STRING(LCD_BUFFER,"$58,$00,$01,$02,$91,$03,$EF",1)):
    {
    CLEAR_BUFFER LCD_BUFFER
    LCDSTAT[1].SOURCE = 'SVIDEO'
    LCDSTAT[1].POWER = 1
    }
    ACTIVE(FIND_STRING(LCD_BUFFER,"$58,$00,$01,$02,$91,$06,$F2",1)):
    {
    CLEAR_BUFFER LCD_BUFFER
    LCDSTAT[1].SOURCE = 'HDMI'
    LCDSTAT[1].POWER = 1
    }
    ACTIVE(FIND_STRING(LCD_BUFFER,"$58,$00,$01,$02,$91",1)):
    {
    CLEAR_BUFFER LCD_BUFFER
    LCDSTAT[1].POWER = 1
    }
    ACTIVE(FIND_STRING(LCD_BUFFER,"$58,$00,$01,$02,$A1",1)):
    {
    CLEAR_BUFFER LCD_BUFFER
    LCDSTAT[1].POWER = 1
    }
    ACTIVE(FIND_STRING(LCD_BUFFER,"$58,$00,$01,$02,$00,$01,$5C",1)):
    {
    CLEAR_BUFFER LCD_BUFFER
    LCDSTAT[1].POWER = 0
    }


    }
    }
    }

    BUTTON_EVENT[TP,1]//P ON
    {
    PUSH:
    {
    SEND_STRING LCD, "$58,$80,$02,$02,$80,$01,$5D"
    }
    }
    BUTTON_EVENT[TP,2]// P OFF
    {
    PUSH:
    {
    SEND_STRING LCD, "$58,$80,$02,$02,$00,$00,$DC"
    }
    }
    (***********************************************************)
    (* THE ACTUAL PROGRAM GOES BELOW *)
    (***********************************************************)
    DEFINE_PROGRAM
    WAIT 20
    {
    SEND_STRING LCD, "$58,$80,$00,$00,$00"
    }
  • BinuBinu Posts: 49
    ZAP!

    Thanks the ZAP! command works fine Thankd for the support
  • toddttoddt Posts: 28
    Great!! Glad that I could help!! Happy Holidays!!
Sign In or Register to comment.