Comments (3)
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:
- open all tags.
- wait for plc_tag_create() calls to finish and all tags to go into PLCTAG_STATUS_OK state.
- read from all tags, async: plc_tag_read(tag[i],0).
- wait for reads to complete.
- get data from tags.
- repeat as long as you want to continue reading.
- 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.
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.
Please reopen this if you see it again.
from libplctag.
Related Issues (20)
- Symbol ID Addressing and quote request for additions to the library HOT 11
- Message packing on OmronNJ/NX beyond max response size HOT 2
- Standalone website to host documentation HOT 4
- Write is not working for SINT and USINT (1 byte) datatype for Omron NX/NJ PLC HOT 5
- MSR is not working for modbus_tcp protocol using libplctag library HOT 3
- MinGW timeapi.h issue HOT 4
- ASP.Net error HOT 2
- Parsing of port/link pairs is not correct in all cases HOT 5
- ControlNet is limited to 504 byte request/response packet sizes HOT 1
- Read/writing OmronNJ/NX TIME and DATE_AND_TIME data HOT 14
- Support data files for input and output without the data file numbers HOT 1
- Support for Omron NX/NJ variable listing HOT 214
- Packet sizes for Omron do not match documentation
- More exposure of internal tag information needed to solve BOOL array problem HOT 1
- Known Omron problems
- Support Omron-style fragmented reads and writes
- split Omron code out from generic/Rockwell CIP code.
- redo start_read()/start_write() to use data segment descriptors.
- Refactor the existing CIP/Rockwell code to eliminate more of the duplication and split out common versus specific code.
- Document all attributes in one place
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libplctag.