Results 1 to 2 of 2

Thread: Difference between mscomm control in VB and hyperterminal

  1. #1
    Newbie
    Join Date
    Feb 2007
    Posts
    1

    Difference between mscomm control in VB and hyperterminal

    Hi Friends,

    I am new to this forum and I am trying to create an application with mscomm control in VB6.
    I created an serial port application in VB6. It sends some message to an ABB PLC and receives some data from the PLC. The vb application works for 1 cycle. for the second cycle the application does not receive any data, Where as if I check using the hyperterminal connectivity, then it allows 'n' cycles with the similar data.

    Can any one tell me what is the problem and how this can be rectified.

    The following is the portmonitor output.

    411 0.00004867 vb6.exe IRP_MJ_CREATE Serial0 SUCCESS Options: Open
    412 0.00000305 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    413 0.00000119 vb6.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial0 SUCCESS InSize: 1024 OutSize: 512
    414 0.00000327 vb6.exe IOCTL_SERIAL_PURGE Serial0 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR
    415 0.00000109 vb6.exe IOCTL_SERIAL_SET_TIMEOUTS Serial0 SUCCESS RI:-1 RM:0 RC:0 WM:0 WC:5000
    416 0.00000971 vb6.exe IOCTL_SERIAL_GET_BAUD_RATE Serial0 SUCCESS
    417 0.00000166 vb6.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial0 SUCCESS
    418 0.00000133 vb6.exe IOCTL_SERIAL_GET_CHARS Serial0 SUCCESS
    419 0.00000133 vb6.exe IOCTL_SERIAL_GET_HANDFLOW Serial0 SUCCESS
    420 0.00000104 vb6.exe IOCTL_SERIAL_GET_BAUD_RATE Serial0 SUCCESS
    421 0.00000306 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    422 0.00000127 vb6.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial0 SUCCESS
    423 0.00000203 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    424 0.00000145 vb6.exe IOCTL_SERIAL_GET_CHARS Serial0 SUCCESS
    425 0.00000112 vb6.exe IOCTL_SERIAL_GET_HANDFLOW Serial0 SUCCESS
    426 0.00026034 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    427 0.00000856 vb6.exe IOCTL_SERIAL_SET_BAUD_RATE Serial0 SUCCESS Rate: 9600
    428 0.00000366 vb6.exe IOCTL_SERIAL_SET_RTS Serial0 SUCCESS
    429 0.00000377 vb6.exe IOCTL_SERIAL_SET_DTR Serial0 SUCCESS
    430 0.00000260 vb6.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
    431 0.00000125 vb6.exe IOCTL_SERIAL_SET_CHAR Serial0 SUCCESS EOF:1a ERR:0 BRK:0 EVT:0 XON:11 XOFF:13
    432 0.00000325 vb6.exe IOCTL_SERIAL_SET_HANDFLOW Serial0 SUCCESS Shake:80000001 Replace:80000040 XonLimit:256 XoffLimit:256
    433 0.00000155 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    434 0.00002699 vb6.exe IRP_MJ_WRITE Serial0 SUCCESS Length 5: 105..
    435 0.00000192 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    436 0.00000390 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    437 0.01034396 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    438 0.00000177 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    439 0.00000192 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    440 0.00000334 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    441 0.00000161 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    442 0.00000222 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    443 0.01384521 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    444 0.00000150 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    445 0.00000343 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 5: 105..
    446 0.00000130 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    447 0.00000123 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    448 0.00000122 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    449 0.00000164 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    450 0.00000320 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    451 0.00000185 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    452 0.00000233 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    453 8.96522003 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    454 0.00000153 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    455 0.00000283 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 5: ..RTS
    456 0.00000140 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    457 0.00000180 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    458 0.00000123 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    459 0.00000677 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    460 0.00000363 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    461 0.00000180 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    462 0.00000811 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    463 0.01025482 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    464 0.00000180 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    465 0.00000460 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 8: ..CS005.
    466 0.00000138 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    467 0.00000136 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    468 0.00000133 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    469 0.00000174 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    470 0.00000335 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    471 0.00000335 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    472 0.00000257 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    473 2.21559484 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    474 0.00000156 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    475 0.00000322 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 6: .A2453
    476 0.00000125 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    477 0.00000127 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    478 0.00000124 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    479 0.00000620 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    480 0.00000372 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    481 0.00000728 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    482 0.00000415 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    483 0.00818320 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    484 0.00000183 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    485 0.00000378 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 8: ..CC1464
    486 0.00000129 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    487 0.00000132 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    488 0.00000122 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    489 0.00000166 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    490 0.00000326 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    491 0.00000270 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    492 0.00000272 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    493 0.00509449 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    494 0.00000155 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    495 0.00000334 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 8: ..B0483.
    496 0.00000128 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    497 0.00000183 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    498 0.00000123 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    499 0.00000162 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    500 53.85307121 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    501 0.00000246 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    502 0.00000128 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    503 0.00000334 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 1: .
    504 0.00000132 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    505 0.00000123 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    506 0.00000545 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    507 0.00000095 vb6.exe IOCTL_SERIAL_GET_PROPERTIES Serial0 SUCCESS
    508 0.00003146 vb6.exe IRP_MJ_WRITE Serial0 SUCCESS Length 5: 105..
    509 0.00000224 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    510 0.00000524 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    511 0.01047579 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    512 0.00000198 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    513 0.00000158 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    514 0.00000349 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    515 0.00000173 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    516 0.00000262 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
    517 83.99305571 vb6.exe IOCTL_SERIAL_WAIT_ON_MASK Serial0 SUCCESS
    518 0.00000149 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    519 0.00000384 vb6.exe IRP_MJ_READ Serial0 SUCCESS Length 5: 105..
    520 0.00000135 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    521 0.00000122 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    522 0.00000126 vb6.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
    523 0.00002661 vb6.exe IOCTL_SERIAL_SET_WAIT_MASK Serial0 SUCCESS Mask:


    The communication hangs at this point and I have to reset the communication every time.
    I find that similar problems have been faced earlier by others, but still I could not make out the solution.
    Can some one help? I need this urgently to complete my degree project work


    Thanks in advance.

  2. #2
    _
    Join Date
    Mar 2004
    Location
    Little Elm, Texas
    Posts
    13,500
    Moved to the coders corner...

    it's much more likely that you will get a response here rather than the newbie forum.

    Good luck.
    Jan Bennett
    FS: VW MKIV Bezel for 8" Lilliput - 95% Finished

    Please post on the forums! Chances are, someone else has or will have the same questions as you!

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
  •