Feed back issue with 232++
Binu
Posts: 49
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?
I tried with another 232++ but the result is same any can anyone help me to fix this?
0
Comments
Please post the code where you populate the buffer. Perhaps the problem is there.
DATA_EVENT [device]
{
ONLINE :
{
SEND_COMMAND device,'ZAP!'
SEND_COMMAND device,'RXON'
}
}
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"
}
Thanks the ZAP! command works fine Thankd for the support