Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tito

Pages: 1 2 [3] 4
31
Technical support / ADC simulation
« on: August 20, 2012, 08:56:50 AM »
Hi I do try out ADC function by using variable resistor 5K.
I just assume this

Temp C          Voltage         ADC
-20C               0                  0
+200C            5                  4096

By linear relationship
(T+20)/(200 +20) =(A-0)/(4096-0)
T = (A/4096)*220 - 20

while try with value A=0 , i do get T = -20C and when A=4096 then T = 200C. mathematically correct

In my custom function i do wrote as
B = ADC(1) *220 - 20

When i do adjust the variable to minimum end, do get -20C but in maximum end i do get 900C instead of 220C. May i know what cause the error. Thanks


32
Technical support / Re:How to receive sms and delete
« on: August 19, 2012, 09:26:31 AM »
Hi, Its seems something missing, doesn't work. Please do advice.

FOR I = 1 to 256
 
  IF INCOMM(1) < 0 EXIT: ENDIF
NEXT

33
Technical support / Re:How to receive sms and delete
« on: August 17, 2012, 01:13:43 PM »
Hi, Currently i did swap my ports and its works, where RS 485 to PC and COMM 1 to GSM modem. But i would like to know the configuration for as mention above.

While trying out using "PAUSE" command and read out the INPUT$(1) for few times, i did get various results as follows:-
\OA
\OA0K
\OA0K
\0AAT+CPMS?
PMS?
\0A+CPMS: "SM",7,40,"SM",7,40,"SM,7,40
203

From bottom, number 2 is correct results. May i know why i am getting this. Do i have to flush the com buffer every time before send command?

34
Technical support / Re:How to receive sms and delete
« on: August 17, 2012, 09:31:30 AM »
 ;D hi, I am back. i did manage get RS232 to RS485 converter. Before step further to previous question, i couldn't send sms out. My setting are:-
1) jumper in Auto-turnaround
2) supply 12VDC
3) RS485(+) goes to RS485(+) in FMD 88-10
4) RS485(-) goes to RS485(-) in FMD 88-10
5) Cable I do use my fabricated cable
6) GSM modem connected with RS232 to RS485 converter.

code:-

SetBaud 2,9

Print #2 "AT+CMFG=1"
Print #2 "AT+CMGS="+CHR$(34)+"+6XXXXXXX"+ CHR$(34)
Print #2 "thank God Hello" + CHR$(26)
SETLCD 1,1,"Thank God"

35
Cheers.  ;D

36
Hi thanks,
My intention is to monitor changes happen in ladder and send command in serial port to notify.

37
Technical support / how to monitor changes in input and output in ladder
« on: August 15, 2012, 10:06:01 AM »
Hi,  I need to monitor the changes in input and output in ladder. At sametime how I force my output to on or close
Please do advice. Thank you.

38
Technical support / Re:How to receive sms and delete
« on: August 14, 2012, 12:37:44 PM »
Hi thanks you for given points on debug method. I am new for d board and TBASIC . On C# I did completed for SMS on server app.

I have to monitor online to determine incoming string. ?Comm 1 has to hook up with PC for on line monitoring and Comm 2 connect to GSM modem by using RS 485 converter. I don't have RS 485 with me currently. Have to order online and might take couple of days. Will post the outcome later

Thanks.

39
Technical support / Re:How to receive sms and delete
« on: August 13, 2012, 09:29:41 PM »
Hi, I get the information but

Example in hyperterminal

AT+CPMS?
example i get this
+CPMS: "SM",2,40,"SM",2,40,"SM",2,40
'empty row then
OK

then when i try out
SETBAUD 1,9
Print #1 "AT+CPMS?"
delay 50
A$=INPUT$(1)
delay 50
 i=1
for i = 1 to 70
      delay 50
      if ASC(A$,i)=44
         exit
     endif
next
j=i
j=j+1
for j = j to 70
     delay 50
     if ASC(A$,j)=44
         exit
     endif
next
B$ = mid$(A$,i+1,j-i-1)

Print #1 "AT+CMGS="+CHR$(34)+"+6XXXXXXX"+CHR$(34)
Print #1 B$ +CHR$(26)

I do receive "blank" SMS.After continuously on / off input 1 (i do use on/off switch to input 1 to trigger the function) switch give me all kind of incorrect data expect once "2".
I just want to make sure that i receive correct data before processing.

Even i did try to get Len(A$), reply sms subsequently shows :
1) 1
2) 22
3) 3
4) 2
5) 1
6) 3 etc...

just for info in C# i do receive in this format:-
"AT+CPMS?\r\r\n+CPMS:\"SM\",2,40,\"SM\",2,40\r\n\r\nOK\r\n"
 ???

40
Technical support / Re:How to receive sms and delete
« on: August 13, 2012, 10:03:59 AM »
Hi,

SETBAUD 1,9
Print#1 "AT+CPMS?"
A$ =INCOMM(1)       ' where A$ = +CPMS:"SM",2,40.... (from GSM)
B$ = ","

While 1
   C$ = MID$(A$,i,1)
   delay 50
   if STRCMP(B$,C$) = 0 then
      j = i
      While 1
           i = i +1
           D$ = MID$(A$,i,1)
           if STRCMP( B$,D$)=0 exit : endif
      endwhile
   exit
   endif
   i =i +1
endwhile

E$ = MID$(A$,j+1,i-j+1)

I get 2 indicates no of sms received. Is there i can simplify this.

41
Technical support / Re:How to receive sms and delete
« on: August 12, 2012, 08:58:39 AM »
Hi,

I am going to check my incoming message after interval 2 minutes.
1) After 2 minutes i am going to send command "AT+CPMS?"
    which will help me to indicate the number of SMS received.
The reply will be after send this command is:-
+CPMS:"SM",2,40.... where 2 indicates no of SMS received. I did assign string variable A$ to command receive and take out the no of SMS receive and assign to integer variable A.

A$ = Print#1 "AT+CPMS?"
i = 1
While 1
      B$ = MID$( A$,i,1)
     i=i+1
     If(B$ = ",")  goto @10 : ENDIF
ENDWHILE

@10 A = MID$(A$,i,1)

Please do advice me up to this stage first.
How i can debug this to make sure what i get in A, B$ and A$. Do i need to do convert data type in TBASIC.

Then i can catch up the remaining. Thanks

42
Technical support / How to receive sms and delete
« on: August 11, 2012, 11:37:46 AM »
Hi, my intention is to check incoming sms with interval of 2 minutes with FMD88-10 and receiving sms through wavecom gsm modem.

After 2 minutes  interval execute AT commands = "AT+CMGL=ALL"
stored in DM then delete "AT+CMGD=1,3"

Please do advise how to start,  

Print #1 "AT+CMGD=1,2"+CHR$(13)

Thanks

43
Technical support / Re:Sending SMS using AT+Commands
« on: August 11, 2012, 10:04:21 AM »
Hi, i did the connection as this

2 - 3
3 - 2
5 - 5 instead of 9 to 9

Finally i did fabricate the cable from summary DB15 to DB 9

DB 15                     DB9
2                            2
6                            3
7+8 (short)
9                            5
11+12(short)

its works perfectly. Thanks for your supports

44
Technical support / Sending SMS using AT+Commands
« on: August 10, 2012, 11:47:18 AM »
Hi, I do manage to Send & Receive SMS through Hyperterminal by using WAVECOM GSM modem with standard cable. While trying in FMD88-10 no respone on sending SMS which i try out initially,
My GSM modem setting as follows:-
BaudRate = 115200, Databits =8, Party = none, Stop bits = 1

The code as follows:-

SETBAUD 1,9
Print #1 "AT+CMGS="+CHR$(34)+"+6XXXXXXXX"+CHR$(34)
Print #1 "TESTING SMS" +CHR$(26)


i do manage to transfer the program into board. Without power off on i do pull out the usb - serial cable from board and plug in GSM serial cable.

In my coding by triggering input 1 will directly execute my custom function to send sms.

The GSM cable DB15 to DB9 i did fabricate myself on this configuration due to my standard cable female to female at serial port.

DB9       DB15
2            6
3            3
5            9


45
Technical support / Re:How to open serial port in basic coding
« on: August 10, 2012, 11:25:04 AM »
 :) Thank you.

Pages: 1 2 [3] 4