inpelsa

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 78 total)
  • Author
    Posts
  • in reply to: Calculated Real working unreliable #1101
    inpelsa
    Participant

    Forget it, I didn’t read it well.

    But splitting it as string and then playing with bit operators in a function should work.
    You have some examples of bit-level working on the forum

    Sorry, not able to help you more at this moment.

    in reply to: Calculated Real working unreliable #1100
    inpelsa
    Participant

    Maybe you can use the byteorder field to split it in two channels right in the origin.

    One channel has byteorder “0” and on the other just “1”

    in reply to: Communicator using 100% CPU #1064
    inpelsa
    Participant

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

    Thanks!

    in reply to: Communicator using 100% CPU #1061
    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! 🙂

    in reply to: Communicator using 100% CPU #1058
    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 9 years, 4 months ago by inpelsa.
    • This reply was modified 9 years, 4 months ago by inpelsa.
    in reply to: Firefox left w/ graphs open overtakes RAM #1057
    inpelsa
    Participant

    By the way… there is also something anonying on the table view, if for any reason columns are too wide (numbers with values of ~4 billions) there is no horizontal scroll bar to see columns to the right.

    Even if I choose 0-11h I can only see 0-8 with a 22″ monitor.

    this has a low priority 🙂

    in reply to: Firefox left w/ graphs open overtakes RAM #1054
    inpelsa
    Participant

    New scheme looks quite good!

    Let me know when/where I can download that version!

    in reply to: Communicator using 100% CPU #1053
    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.

    in reply to: Firefox left w/ graphs open overtakes RAM #1044
    inpelsa
    Participant

    Technology never stops 🙂

    Maybe related to jQuery: https://github.com/jquery/jquery/issues/2685

    Through reloading/closing full Table View tab doesn’t release memory on Firefox :/
    If you find a fix while you finish the new API drop me a line please, is a bit anonying restarting web browser every few hours.

    in reply to: Communicator using 100% CPU #1043
    inpelsa
    Participant

    Please send it to me, I can not apply none of the solutions at this time and still happens.

    Please consider about uploading any updates of any type to a public location so others in the community can get them.

    Good and fast job!!

    in reply to: Communicator using 100% CPU #1040
    inpelsa
    Participant

    Small delay or system.doevents() or port checking will help on this 🙂

    Shouldn’t apply delay in case of any error too?

    >I will add the fix in the core of Communicator.
    Where can I get it?

    OK, I will switch to UDP on the production server, but I just fetch data every minute, comm speed is not a problem, cpu hog… as always it is.

    in reply to: Communicator using 100% CPU #1037
    inpelsa
    Participant

    Yes, direct TCP connection is available, but let’s see if we can fix this for other people.

    code is simple… that can mean code is too simple and we are not taking care of some situation (I.E.: OutQueue=40… buffer filled? port not ready?)

    Maybe opening/closing port each time is required (aka freeing port) could be a good idea.

    in reply to: Communicator using 100% CPU #1036
    inpelsa
    Participant

    > (through it has a 10 seconds delay (10000 ms))

    It’s already done, that’s what is weird!

    in reply to: Firefox left w/ graphs open overtakes RAM #1034
    inpelsa
    Participant

    After +- 15 minutes running:
    – 2 computers, Win7 64 bit
    – Each web explorer with 2 tabs: table view + 1 channel graph

    Results on both computers:
    – IE 9.0.8112 x64 3 min CPU 660 MB RAM (100 MB at the beginning)
    – Firefox 45 2 min CPU 395 MB RAM (120 MB at the beginning)
    – Chrome 49.0 40 secs CPU 25 MB RAM (same memory at the beginning) (on the 2nd computer it took 300 MB RAM)

    On all cases, seems that closing/not opening Table View tab solves the problem but… I need it.

    I think it’s clear… 🙂

    PD: Javascript will dispose/collect garbage/free memory if objects/data are not referenced any more (or marked for dispose…) in any means.

    in reply to: Communicator using 100% CPU #1032
    inpelsa
    Participant

    “El nombre de red especificado ya no está disponible.” = Specified network host is not available

    
    2016-04-27 16:03:21 Communication session with the Device 41 "Regulador Trafo-A", type: KpModbus, address: 1
    Request element group "TempActual"
    2016-04-27 16:03:21 Error communicating with the device: Error writing data: El nombre de red especificado ya no está disponible.
    
    2016-04-27 16:03:21 Communication session with the Device 42 "Regulador Trafo-B", type: KpModbus, address: 2
    Request element group "TempActual"
    2016-04-27 16:03:21 Error communicating with the device: Error writing data: El nombre de red especificado ya no está disponible.
    
    2016-04-27 16:03:36 Communication session with the Device 41 "Regulador Trafo-A", type: KpModbus, address: 1
    Request element group "TempActual"
    2016-04-27 16:03:36 Error communicating with the device: Error writing data: El nombre de red especificado ya no está disponible.
    
    2016-04-27 16:03:36 Communication session with the Device 42 "Regulador Trafo-B", type: KpModbus, address: 2
    Request element group "TempActual"
    2016-04-27 16:03:36 Error communicating with the device: Error writing data: El nombre de red especificado ya no está disponible.
    
    2016-04-27 16:03:51 Communication session with the Device 41 "Regulador Trafo-A", type: KpModbus, address: 1
    Request element group "TempActual"
    2016-04-27 16:03:51 Error communicating with the device: Error writing data: El nombre de red especificado ya no está disponible.
    
    2016-04-27 16:03:51 Communication session with the Device 42 "Regulador Trafo-B", type: KpModbus, address: 2
    Request element group "TempActual"
    2016-04-27 16:03:51 Error communicating with the device: Error writing data: El nombre de red especificado ya no está disponible.
    

    Stop communication line: Yes, it becomes low.

    I could understand that sometimes it can fail, but is not acceptable to eat 100% CPU in case it could not connect/transfer data to COM port.

    On the virtual serial port monitor software I can see Communicator is non-stop querying for COM status:

    0000797 00:02:07.33643 Com4   192.168.5.32    10001  WaitOnMask      Pending                   
    0000798 00:02:07.33641 Com4   192.168.5.32    10001  GetCommStatus   Success                   Err 0 WaitImm 0 InQue 0 OutQue 40 EOF 40 Hold 0x0
    
Viewing 15 posts - 46 through 60 (of 78 total)