Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: mscomm32 help.

  1. #1
    Variable Bitrate
    Join Date
    Sep 2004
    Posts
    440

    mscomm32 help.

    I'm working on my VFD7000 software (www.hnetinc.com under software). I'v found out that mscomm32 for some reason wont let me send more than 15 ascii letters or numbers at once and I need to be able to send more than that. For the test I'm sending data with it like this.

    vfdCom.Output = "1234567890abcdefghij"

    Comm settings are:
    38400,n,8,1

    Thanks for the help in advance.

  2. #2
    Phone Control Moderator zorro's Avatar
    Join Date
    Mar 2004
    Location
    Munich, Germany
    Posts
    1,902
    Usually you set the .OutputBufferSize property of the control.
    Since the default setting of MSCOMM is 512 bytes, it could be that your receiving device doesn't support more then 15 characters at once. You may check that.
    This also could be a handshaking issue.
    Skinning to go... VisualDesigner2!

  3. #3
    Variable Bitrate
    Join Date
    Sep 2004
    Posts
    440
    I doubble checked to make sure that the vfd can handle that much data and it can handle 20 with no problem. I'v also tryed changing the outputbuffer to 1024 but that dosnt help eather. I also checked into the handshaking by using hyperterminal to send 20 chars and made sure to remember the handshaking it used. I then made sure and set my comm32 controler to the same thing and it still dosnt want to work.

  4. #4
    Phone Control Moderator zorro's Avatar
    Join Date
    Mar 2004
    Location
    Munich, Germany
    Posts
    1,902
    Can you explain what exactely happens after the 15th char?
    Skinning to go... VisualDesigner2!

  5. #5
    Variable Bitrate
    Join Date
    Sep 2004
    Posts
    440
    Well in the small test it just sends 15 then nothing is displayed on the vfd. If I run my software and set it to display a winamp song name for example it will display all 20 chars but the last 5 seem to be random letters. I'v surched around but couldent find much.

  6. #6
    Phone Control Moderator zorro's Avatar
    Join Date
    Mar 2004
    Location
    Munich, Germany
    Posts
    1,902
    I can hardly believe that this is because of the MSComm control.

    Go to http://www.sysinternals.com and download the "Port Monitor". It's a free tool and you can trace everything that is outgoing and incoming from or to a COM port.
    Skinning to go... VisualDesigner2!

  7. #7
    Variable Bitrate
    Join Date
    Sep 2004
    Posts
    440
    Thanks this should help figure out what is going on with it. I can't realy think of what else it coulabe considering I'v sent the data as simply as I can and I get the same basic result. I guess this will help see whats going on. Of corse I will have to wate to get home from work before I can test it out.

  8. #8
    Variable Bitrate
    Join Date
    Sep 2004
    Posts
    440
    Here is the log file. As you can see there is a difference in the way hyperterminal and my software sends the data to the port. I'm not sure why it is making any difference though. Coulden't find the attatch file button so here is the text.

    2 0.00742224 hypertrm.exe IRP_MJ_CREATE VCP0 SUCCESS Options: Open
    3 0.00001386 hypertrm.exe IOCTL_SERIAL_SET_QUEUE_SIZE VCP0 SUCCESS InSize: 8192 OutSize: 8192
    4 0.00000248 hypertrm.exe IOCTL_SERIAL_CONFIG_SIZE VCP0 SUCCESS Size: 0
    5 0.00000148 hypertrm.exe IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
    6 0.00000165 hypertrm.exe IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
    7 0.00000146 hypertrm.exe IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
    8 0.00000130 hypertrm.exe IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
    9 0.00000138 hypertrm.exe IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
    10 0.00000129 hypertrm.exe IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
    11 0.00000129 hypertrm.exe IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
    12 0.00000128 hypertrm.exe IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
    13 0.00066370 hypertrm.exe IOCTL_SERIAL_SET_BAUD_RATE VCP0 SUCCESS Rate: 38400
    14 0.00097487 hypertrm.exe IOCTL_SERIAL_SET_DTR VCP0 SUCCESS
    15 0.00097406 hypertrm.exe IOCTL_SERIAL_SET_LINE_CONTROL VCP0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
    16 0.00000144 hypertrm.exe IOCTL_SERIAL_SET_CHAR VCP0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13
    17 0.00195148 hypertrm.exe IOCTL_SERIAL_SET_HANDFLOW VCP0 SUCCESS Shake:80000009 Replace:80000080 XonLimit:80 XoffLimit:200
    18 0.00000159 hypertrm.exe IOCTL_SERIAL_SET_TIMEOUTS VCP0 SUCCESS RI:10 RM:0 RC:0 WM:0 WC:5000
    19 0.00094416 hypertrm.exe IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RLSD ERR
    20 62.97265914 hypertrm.exe IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
    21 62.97272452 hypertrm.exe IRP_MJ_READ VCP0 CANCELLED Length 80
    22 0.00074096 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 1
    23 0.00000726 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    24 0.00094864 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 2
    25 0.00000311 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    26 0.00095499 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 3
    27 0.00000316 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    28 0.00095872 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 4
    29 0.00000266 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    30 0.00095842 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 5
    31 0.00000277 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    32 0.00095796 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 6
    33 0.00000263 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    34 0.00095954 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 7
    35 0.00000302 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    36 0.00095887 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 8
    37 0.00000288 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    38 0.00095776 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 9
    39 0.00000279 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    40 0.00095845 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 0
    41 0.00000257 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    42 0.00095883 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 1
    43 0.00000296 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    44 0.00095871 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 2
    45 0.00000251 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    46 0.00095790 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 3
    47 0.00000304 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    48 0.00095868 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 4
    49 0.00000265 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    50 0.00096030 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 5
    51 0.00000271 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    52 0.00147317 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 6
    53 0.00000275 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    54 0.00072735 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 7
    55 0.00000434 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    56 0.00099269 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 8
    57 0.00000295 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    58 0.00087606 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 9
    59 0.00000455 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    60 0.00095860 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 0
    61 0.00057133 hypertrm.exe IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RLSD ERR
    62 0.00000922 hypertrm.exe IOCTL_SERIAL_PURGE VCP0 SUCCESS Purge: TXABORT RXABORT
    63 0.00000810 hypertrm.exe IRP_MJ_CLEANUP VCP0 SUCCESS
    64 0.11017314 hypertrm.exe IRP_MJ_CLOSE VCP0 SUCCESS
    65 0.00791635 VB6.EXE IRP_MJ_CREATE VCP0 SUCCESS Options: Open
    66 0.00088282 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    67 0.00000169 VB6.EXE IOCTL_SERIAL_SET_QUEUE_SIZE VCP0 SUCCESS InSize: 1024 OutSize: 512
    68 0.00000712 VB6.EXE IOCTL_SERIAL_PURGE VCP0 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR
    69 0.00000161 VB6.EXE IOCTL_SERIAL_SET_TIMEOUTS VCP0 SUCCESS RI:-1 RM:0 RC:0 WM:0 WC:5000
    70 0.00000193 VB6.EXE IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
    71 0.00000204 VB6.EXE IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
    72 0.00000153 VB6.EXE IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
    74 0.00000167 VB6.EXE IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
    73 0.00065363 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    75 0.00000186 VB6.EXE IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
    76 0.00000147 VB6.EXE IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
    77 0.00000138 VB6.EXE IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
    78 0.00000129 VB6.EXE IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
    79 0.00153235 VB6.EXE IOCTL_SERIAL_SET_BAUD_RATE VCP0 SUCCESS Rate: 38400
    80 0.00195251 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    81 0.00000225 VB6.EXE IOCTL_SERIAL_CLR_RTS VCP0 INVALID PARAMETER
    82 0.00193413 VB6.EXE IOCTL_SERIAL_SET_DTR VCP0 SUCCESS
    83 15.98119787 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
    84 0.00097337 VB6.EXE IOCTL_SERIAL_SET_LINE_CONTROL VCP0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
    85 0.00000155 VB6.EXE IOCTL_SERIAL_SET_CHAR VCP0 SUCCESS EOF:1a ERR:0 BRK:0 EVT:0 XON:11 XOFF:13
    86 0.00194836 VB6.EXE IOCTL_SERIAL_SET_HANDFLOW VCP0 SUCCESS Shake:80000001 Replace:80000000 XonLimit:256 XoffLimit:256
    87 0.00000604 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    88 0.00110108 VB6.EXE IRP_MJ_WRITE VCP0 SUCCESS Length 1: .
    89 0.00000345 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    90 0.00000252 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    91 0.00000192 VB6.EXE IOCTL_SERIAL_GET_PROPERTIES VCP0 SUCCESS
    92 0.00087770 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    93 0.00181072 VB6.EXE IRP_MJ_WRITE VCP0 SUCCESS Length 20: 12345678901234567890
    94 0.00000521 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
    95 0.00189737 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    96 0.00000321 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    97 0.00000193 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    98 0.00000170 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    99 0.00000667 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
    100 0.00090692 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    101 0.00000326 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    102 0.01995878 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
    103 0.00092289 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    104 0.00000375 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
    105 0.00000000 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0

  9. #9
    What can I say? I like serial. Curiosity's Avatar
    Join Date
    Mar 2004
    Location
    Florence Yall, BFKY
    Posts
    2,684
    Try slowing it down. Send 1 byte at a time or each character of the string in a loop. The LCD display probably has a small buffer and is getting too far behind trying to display it all. If the 1 char at a time loop is still too fast, you may need a Sleep() between each char, but small like even 1ms.

  10. #10
    Variable Bitrate
    Join Date
    Sep 2004
    Posts
    440
    Well I guess I'm going to have to look up some tutorials on how to get individual charectures out of a var so i can send them one at a time in a loop.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •