16
Technical support / Re:PRINT AND INCOMM keywords
« on: June 16, 2011, 07:30:12 AM »
I have not been able to get the requird result yet.I have explained below what i have done and if you can let me know where i have been going wrong that would be great i have no clue why you say i should use a for loop...
I have attached my ladder logic in the attached diagram.The message1 function sends out PRINT #1 "AT+CMGS="+CHR$(34)+"+44******"+CHR$(34)+CHR$(13) when the input goes to 1.
Then i use a timer of 2 sec to wait for a response from the modem (waiti for the > character).After which message 2 function executes.Message 2 has
A$=INCOMM(1)
B$=CHR$(62)
IF STRCMP(A$,B$)=0 THEN
PRINT #1 "HELLO"+CHR$(26)
ENDIF
This does not seem to work at the moment,however if my message2 function has only PRINT #1 "HELLO"+CHR$(26)
it sends the message hello(it assumes that the > is recieved in this case).
please help
I have attached my ladder logic in the attached diagram.The message1 function sends out PRINT #1 "AT+CMGS="+CHR$(34)+"+44******"+CHR$(34)+CHR$(13) when the input goes to 1.
Then i use a timer of 2 sec to wait for a response from the modem (waiti for the > character).After which message 2 function executes.Message 2 has
A$=INCOMM(1)
B$=CHR$(62)
IF STRCMP(A$,B$)=0 THEN
PRINT #1 "HELLO"+CHR$(26)
ENDIF
This does not seem to work at the moment,however if my message2 function has only PRINT #1 "HELLO"+CHR$(26)
it sends the message hello(it assumes that the > is recieved in this case).
please help