Communicator using 100% CPU

Forum Home Forums Communicating with Devices Modbus Communicator using 100% CPU

This topic contains 21 replies, has 2 voices, and was last updated by Mikhail Mikhail 3 years, 5 months ago.

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #1053
    inpelsa
    inpelsa
    Participant

    Sorry, no, I mean I already have a long delay configured for that line (and attempts are done in that basis) but it keeps accesing all the time the COM port and thus taking the whole CPU.

    #1055
    Mikhail
    Mikhail
    Moderator

    I need somehow to reproduce the problem on my PC. Do you have any idea how to do it?

    #1058
    inpelsa
    inpelsa
    Participant

    sure!, several ways:

    – give you direct access to the computer running communicator (i.e.: teamviewer) to do ANY tests

    – Install lantronix virtual serial COM port software on your computer and connect to my device over the Internet

    – Install that software and connect virtual port to one real port on your computer (like a bridge), not sure if you will be able to reproduce same behaviour

    – know what is going on giving you more info.

    This is the log from lantronix monitor when it eats 100% CPU:

    
    0013168 00:00:00.28818 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013169 00:00:00.28820 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013170 00:00:00.28821 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013171 00:00:00.28824 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013172 00:00:00.28825 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013173 00:00:00.28827 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013174 00:00:00.28829 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013175 00:00:00.28831 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013176 00:00:00.28833 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013177 00:00:00.28834 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013178 00:00:00.28837 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013179 00:00:00.28839 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013180 00:00:00.28841 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013181 00:00:00.28842 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013182 00:00:00.28844 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013183 00:00:00.28846 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013184 00:00:00.28848 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013185 00:00:00.28850 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013186 00:00:00.28852 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013187 00:00:00.28853 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013188 00:00:00.28855 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013189 00:00:00.28857 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013190 00:00:00.28859 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013191 00:00:00.28860 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013192 00:00:00.28863 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013193 00:00:00.28864 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013194 00:00:00.28866 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013195 00:00:00.28868 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013196 00:00:00.28870 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013197 00:00:00.28871 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013198 00:00:00.28873 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 24 EOF 24 Hold 0x0
    0013199 00:00:00.28876 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0013200 00:00:00.28877 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    

    And this one when it works perfectly:

    
    0000525 00:00:19.81120 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000526 00:00:19.82294 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000527 00:00:19.83545 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000528 00:00:19.84065 Com4   192.168.5.32    10001  DataReceive     Success                   Displaying 7 of 7 bytes received: 01 04 02 00 00 B9 30
    0000529 00:00:19.84066 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000530 00:00:19.84066 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000531 00:00:19.89137 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0   C????       P C?????$,?????C????LY????        ??????  C????
    0000532 00:00:19.89141 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000533 00:00:19.89142 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0  ?
    ???????????
    ? ?????????  ????  ??????  ????I?????pS?????  ???
    0000534 00:00:19.89142 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000535 00:00:19.90203 Com4   192.168.5.32    10001  Read            Success                   Displaying 5 of 5 bytes read: 01 04 02 00 00
    0000536 00:00:19.90325 Com4   192.168.5.32    10001  SetTimeouts     Success                   RdInt -1, RdMult 0, RdConst 0, WrMult 0, WrConst 5000   ?+?????                        ?? ???       ?? ???        X%,????
    0000537 00:00:19.90327 Com4   192.168.5.32    10001  Read            Success                   Displaying 2 of 2 bytes read: B9 30
    0000538 00:00:20.12230 Com4   192.168.5.32    10001  Purge           Pending                   Mask 0x0000000A: TxAbort No, RxAbort Yes, TxClear No, RxClear Yes                       ?? ???       ?? ???        
    0000539 00:00:20.12231 Com4   192.168.5.32    10001  Purge           Pending                   Mask 0x00000005: TxAbort Yes, RxAbort No, TxClear Yes, RxClear No                       ?? ???       ?? ???        
    0000540 00:00:20.12233 Com4   192.168.5.32    10001  Write           Success                   Displaying 8 of 8 bytes written: 01 04 02 70 00 01 31 A9
    0000541 00:00:20.12238 Com4   192.168.5.32    10001  DataTransmit    Success                   Displaying 8 of 8 bytes transmitted: 01 04 02 70 00 01 31 A9
    0000542 00:00:20.20119 Com4   192.168.5.32    10001  DataReceive     Success                   Displaying 7 of 7 bytes received: 01 04 02 00 00 B9 30
    0000543 00:00:20.20119 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000544 00:00:20.20119 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000545 00:00:20.23650 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0   C????       P C?????$,?????C????LY????        ??????  C????
    0000546 00:00:20.23654 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000547 00:00:20.23655 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0  ?
    ???????????
    ? ?????????  ????  ??????  ????I?????pS?????P$?t
    0000548 00:00:20.23656 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000549 00:00:20.25296 Com4   192.168.5.32    10001  SetTimeouts     Success                   RdInt -1, RdMult 0, RdConst 0, WrMult 0, WrConst 5000  RxClear No                       ?? ???       ?? ???        
    0000550 00:00:20.25300 Com4   192.168.5.32    10001  Read            Success                   Displaying 5 of 5 bytes read: 01 04 02 00 00
    0000551 00:00:20.30157 Com4   192.168.5.32    10001  SetTimeouts     Success                   RdInt -1, RdMult 0, RdConst 0, WrMult 0, WrConst 5000   ?+?????                        ?? ???       ?? ???        
    0000552 00:00:20.30160 Com4   192.168.5.32    10001  Read            Success                   Displaying 2 of 2 bytes read: B9 30
    0000553 00:00:20.59400 Com4   192.168.5.32    10001  Purge           Pending                   Mask 0x0000000A: TxAbort No, RxAbort Yes, TxClear No, RxClear Yes                       ?? ???       ?? ???        
    0000554 00:00:20.59402 Com4   192.168.5.32    10001  Purge           Pending                   Mask 0x00000005: TxAbort Yes, RxAbort No, TxClear Yes, RxClear No                       ?? ???       ?? ???        
    0000555 00:00:20.59404 Com4   192.168.5.32    10001  Write           Success                   Displaying 8 of 8 bytes written: 01 04 02 71 00 01 60 69
    0000556 00:00:20.59408 Com4   192.168.5.32    10001  DataTransmit    Success                   Displaying 8 of 8 bytes transmitted: 01 04 02 71 00 01 60 69
    0000557 00:00:20.59546 Com4   192.168.5.32    10001  SetTimeouts     Success                   RdInt -1, RdMult 0, RdConst 0, WrMult 0, WrConst 5000 ???? ??????? ??????? ????.2?????.2???????            "
    0000558 00:00:20.59548 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000559 00:00:20.62014 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000560 00:00:20.64790 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000561 00:00:20.67363 Com4   192.168.5.32    10001  DataReceive     Success                   Displaying 7 of 7 bytes received: 01 04 02 00 00 B9 30
    0000562 00:00:20.67363 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000563 00:00:20.67364 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000564 00:00:20.67409 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0 r Yes, RxClear No                       ?? ???       ?? ???        
    0000565 00:00:20.67413 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000566 00:00:20.67414 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0   C????       P C????0
    ??????C????LY????        ??????  C????
    0000567 00:00:20.67415 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000568 00:00:20.67426 Com4   192.168.5.32    10001  Read            Success                   Displaying 5 of 5 bytes read: 01 04 02 00 00
    0000569 00:00:20.68057 Com4   192.168.5.32    10001  SetTimeouts     Success                   RdInt -1, RdMult 0, RdConst 0, WrMult 0, WrConst 5000   ?+?????                        ?? ???       ?? ???        ?dj????
    0000570 00:00:20.68060 Com4   192.168.5.32    10001  Read            Success                   Displaying 2 of 2 bytes read: B9 30
    0000571 00:00:20.88311 Com4   192.168.5.32    10001  Purge           Pending                   Mask 0x0000000A: TxAbort No, RxAbort Yes, TxClear No, RxClear Yes                       ?? ???       ?? ???        
    0000572 00:00:20.88312 Com4   192.168.5.32    10001  Purge           Pending                   Mask 0x00000005: TxAbort Yes, RxAbort No, TxClear Yes, RxClear No                       ?? ???       ?? ???        
    0000573 00:00:20.88315 Com4   192.168.5.32    10001  Write           Success                   Displaying 8 of 8 bytes written: 01 04 02 72 00 01 90 69
    0000574 00:00:20.88319 Com4   192.168.5.32    10001  DataTransmit    Success                   Displaying 8 of 8 bytes transmitted: 01 04 02 72 00 01 90 69
    0000575 00:00:20.88507 Com4   192.168.5.32    10001  SetTimeouts     Success                   RdInt -1, RdMult 0, RdConst 0, WrMult 0, WrConst 5000 ????? ??????? ??????? ????.2?????.2????Q??            "
    0000576 00:00:20.88509 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000577 00:00:20.89617 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000578 00:00:20.92155 Com4   192.168.5.32    10001  Read            Success                   0 bytes were read.
    0000579 00:00:20.96266 Com4   192.168.5.32    10001  DataReceive     Success                   Displaying 7 of 7 bytes received: 01 04 02 00 00 B9 30
    0000580 00:00:20.96267 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000581 00:00:20.96267 Com4   192.168.5.32    10001  WaitRxChar      Success                   
    0000582 00:00:21.00012 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0   C????       P C????p?^?????C????LY????        ??????  C????
    0000583 00:00:21.00026 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000584 00:00:21.00030 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 7 OutQue 0 EOF 0 Hold 0x0   C????       P C????p?^?????C????LY????        ??????  C????
    0000585 00:00:21.00035 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000586 00:00:21.01043 Com4   192.168.5.32    10001  Read            Success                   Displaying 5 of 5 bytes read: 01 04 02 00 00
    0000587 00:00:21.01737 Com4   192.168.5.32    10001  SetTimeouts     Success                   RdInt -1, RdMult 0, RdConst 0, WrMult 0, WrConst 5000   ?+?????                        ?? ???       ?? ???        ?^????
    0000588 00:00:21.01740 Com4   192.168.5.32    10001  Read            Success                   Displaying 2 of 2 bytes read: B9 30
    

    do you want to connect to the computer or port?

    • This reply was modified 3 years, 5 months ago by inpelsa inpelsa.
    • This reply was modified 3 years, 5 months ago by inpelsa inpelsa.
    #1061
    inpelsa
    inpelsa
    Participant

    If I close the COM port from the virtual COM software manager the error appears.

    Seems it doesn’t check if COM port is open/valid/available and doesn’t waits delay time if any error happened.

    Adding that check and reconnecting should correct it! 🙂

    #1063
    Mikhail
    Mikhail
    Moderator

    Thanks!
    I will try to “Install lantronix virtual serial COM port software on your computer and connect to my device over the Internet”.

    If I can’t connect then try to “direct access to the computer running communicator (i.e.: teamviewer) to do ANY tests”

    Let’s continue on the next week, OK?

    #1064
    inpelsa
    inpelsa
    Participant

    OK, but better implement first what I said few minutes ago 🙂

    Thanks!

    #1107
    Mikhail
    Mikhail
    Moderator

    Solved. Will be published in the next version.

Viewing 7 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic.