Sep 27, 2005 #1 C cyw1984 Member level 2 Joined Sep 6, 2005 Messages 45 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,643 About Visual Basic6 and RS232 ASCII communication **broken link removed** If I want to send the value (ASCII) to 8051 series port VB block input: 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 . . . . . . . 29.93 29.94 29.95 29.96 29.97 29.98 29.99 30.00 RS232 transmit : 0000 0001 0002 0003 0004 0005 0006 . . . 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 If i want display 0-30 with 0.00 (ACSII)..... How can I write the VB software , It need to write 3000 structure????
About Visual Basic6 and RS232 ASCII communication **broken link removed** If I want to send the value (ASCII) to 8051 series port VB block input: 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 . . . . . . . 29.93 29.94 29.95 29.96 29.97 29.98 29.99 30.00 RS232 transmit : 0000 0001 0002 0003 0004 0005 0006 . . . 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 If i want display 0-30 with 0.00 (ACSII)..... How can I write the VB software , It need to write 3000 structure????
Sep 27, 2005 #2 T thedesolatesoul Junior Member level 3 Joined Jul 6, 2004 Messages 26 Helped 2 Reputation 4 Reaction score 0 Trophy points 1,281 Activity points 275 Hope this works for you Code: for A=1 to 3000 M=chr(A) while len(chr(A))<4 M= "0" & M wend MsComm1.Output=M next What I'm not sure about is how long you should wait before sending the next data. [/code]
Hope this works for you Code: for A=1 to 3000 M=chr(A) while len(chr(A))<4 M= "0" & M wend MsComm1.Output=M next What I'm not sure about is how long you should wait before sending the next data. [/code]
Sep 28, 2005 #3 C cyw1984 Member level 2 Joined Sep 6, 2005 Messages 45 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,643 thedesolatesoul said: Hope this works for you Code: for A=1 to 3000 M=chr(A) while len(chr(A))<4 M= "0" & M wend MsComm1.Output=M next What I'm not sure about is how long you should wait before sending the next data. [/code] Click to expand... Um....if I send a new values.....the sending data is updated immediately.... THX
thedesolatesoul said: Hope this works for you Code: for A=1 to 3000 M=chr(A) while len(chr(A))<4 M= "0" & M wend MsComm1.Output=M next What I'm not sure about is how long you should wait before sending the next data. [/code] Click to expand... Um....if I send a new values.....the sending data is updated immediately.... THX
Sep 28, 2005 #4 J jcarlos Junior Member level 2 Joined Mar 9, 2004 Messages 23 Helped 1 Reputation 2 Reaction score 0 Trophy points 1,281 Activity points 218 Hi, You can try to send a string message through the serial port, like this MSComm1.Output = "29.87" and then you can see this string into your microcontroller system. Further messages can be sent following this approach. Best Regards
Hi, You can try to send a string message through the serial port, like this MSComm1.Output = "29.87" and then you can see this string into your microcontroller system. Further messages can be sent following this approach. Best Regards