Giter Club home page Giter Club logo

Comments (3)

kyle-github avatar kyle-github commented on July 22, 2024

Are you closing the tags when you are done with plc_tag_destroy()?

If you have many tags, it is better to have logic that looks like this:

  1. open all tags.
  2. wait for plc_tag_create() calls to finish and all tags to go into PLCTAG_STATUS_OK state.
  3. read from all tags, async: plc_tag_read(tag[i],0).
  4. wait for reads to complete.
  5. get data from tags.
  6. repeat as long as you want to continue reading.
  7. delete tags.

This is the most efficient way to do this.

The library does not change the value of the tag handle. If it is becoming NULL, then something in your code is overwriting it or there is a memory overwrite problem somewhere. Take a look at the data_logger example program in the examples. Can you modify it to do something similar to what you want to do?

from libplctag.

kyle-github avatar kyle-github commented on July 22, 2024

Is this still a problem. If so, please provide a test case. If not, please let me know and I will close the issue. Thanks.

from libplctag.

kyle-github avatar kyle-github commented on July 22, 2024

Please reopen this if you see it again.

from libplctag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.