Posted 21 Oct 2022 Sorry its long !! I am recieving text from a GSM modem for text msg Send and receive (SMS) works ok but would be better if I could make use of the start code and end code. This way I could cut down on all the crap that is received when a text arrives. I get this CMTI: "SM",0 I have it stored into D80 and I have that trigger a TXD that sends AT+CMGRD=0 and that tells the GSM to send the msg (The 0 is the current msg in memory) ------ The problem is that there is Carriage Return and Line Feeds in the received msg ---- AS below ((AT+CMGRD=0 +CMGRD: "REC UNREAD","+19028991212","","22/10/20,16:57:54-16" Hello this is the msg OK)) When the PLC sees the carriage return it stops receiving data. And I have no start code or end code setup. (I am using characters received) The way around this is to set a high character count in the RXD (More than the actual msg (More than the msg length) The main issue with that is I get garbage in as the msg gets bigger. Its unreliable. I clear the port after each receive and that helps but still get the odd garbage. (Never get garbage when connected to a terminal prg). Any Ideas???? ps Even the Start Code is unreliable as it will start receiving a few characters late. Rob Share this post Link to post Share on other sites
Posted 21 Oct 2022 Couldn't you setup your end code as "))"? Share this post Link to post Share on other sites
Posted 21 Oct 2022 39 minutes ago, photovoltaic said: Couldn't you setup your end code as "))"? Just one ")" I mean, which would be a value of 29 (hex) Share this post Link to post Share on other sites
Posted 21 Oct 2022 (edited) It stops receiving as soon as it sees any CR LF Never gets to the end code (port 2) Also Port 1 is setup to receive 14 chars. A phone # and location code 9025552565A001 when I send it over and over it will change on of the #s Like instead of 902 it will show 912 Basically the same issue as I have with port 2 I wired the connector up from an example on this site I will find it and past it here. I have had a lot of issues with these omrons. 2 CP1L and one will NOT connect to my NB the other connects works ok Modem PLC 2 - 3 3 - 2 5 - 9 (4,6) (4,5) (7,8) (7,8) Rob Edited 21 Oct 2022 by Robafe Share this post Link to post Share on other sites
Posted 21 Oct 2022 Is there a wiring diagram for hardware flow control? for the serial ports???? Rob Share this post Link to post Share on other sites
Posted 24 Oct 2022 On 10/21/2022 at 3:45 PM, Robafe said: Is there a wiring diagram for hardware flow control? for the serial ports???? Rob Share this post Link to post Share on other sites