Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

"incorrect" using of PLCHandler

eugenee
2017-04-13
2017-04-14
  • eugenee - 2017-04-13

    Hello!

    Description: there is a connection from my App to PLC through PLCHandler (v3.5.8.0)
    Then i make call SyncReadVarsFromPlc(char ppszSymbols,...) several (or many) times which allocates variable list(s).
    And each time I
    accidentally forget to call SyncReadVarsFromPlcReleaseValues()**
    I understand that I am totally wrong, but when I close the connection to PLC the following can be seen:
    1) in case of OEM HARDWARE PLC (ARM,CoDeSyS Runtime 3.5.SP6, QNX 6.5.0) - CPU Usage is up to 100%, established network connections to PLC are still working, new network connections are failed; such runtime behavior lasts in proportion to the number of SyncReadVarsFromPlc calls; then (after runtime release and clean resources?) PLC returns to normal working state.
    2) in case of CODESYS Control Win V3 SoftPLC(Windows 7x64, CoDeSyS 3.5.SP6) - CPU Usage of ServiceControl.exe (Service for starting/stopping the services of CODESYS Control Win V3 and CODESYS Gateway Service V3) is up to 30%, established network connections to SoftPLC are still working, new network connections are failed; normal working state of ServiceControl.exe may be restored only after service restart.

    Solution is clear - to call SyncReadVarsFromPlcReleaseValues.
    But why does runtime make so high CPU Usage during resource cleanup of the closed PLCHandler connection?

     
  • gingomkc - 2017-04-14

    Si

    Inviato dal mio Y100_Plus utilizzando Tapatalk

     

Log in to post a comment.