Comments (3)
What you are after is program scoped tags, I thought I had that in the README, but it appears that I do not. It's like this:
Program:ProgramName.TagName
So let's say your program name is "Line1" and your tag name is "ProductCount". It would look like this:
Read("Program:Line1.ProductCount")
from pylogix.
Definitely a step in a the right direction as this is what I was looking for. I am fairly new to PLCs so I need a bit more help.
Currently I have my main Program which we'll call Program. After this, I have numerous Tasks each with different phase types. And then within the phase types, I have several instances. And each of those phase instances I have scope tags I am looking to reference.
So really I am structured as such:
1.Program
2.Tasks
Phase Type
Phase
Tag I need
Is it possible to reference the Tag I need with this structure?
Thank you.
from pylogix.
I see, so I guess I first should have asked if the tag you are after is a local tag to the Equipment Phase, or it is one of the automatically generated phase tags.
For tags local to the Equipment Phase, these are treated the same as Program Scoped tags, so the syntax that I illustrated before will work.
For tags that are generated when crating an Equipment Phase, those appear to exist in the controller scope. So let's say I created a EP called "Line1". If I look in the controller scoped tag database, I will see a tag called Line1 and it will have the data type PHASE. I can the "Running" tag for line 1 by reading "Line1.Running". Or state by reading "Line1.State".
One thing that may help you is by going into the controller tags, looking right above the tag window for the "Scope" drop down. This will let you view all of the tags in your program according to the scope that they are created in. This may help you with where they exist and how you need to access them. Any tag that is not located in the controller scope will need to be accessed with the format I used in my first reply.
Hopefully that makes sense, if not, let me know where I can clarify.
from pylogix.
Related Issues (20)
- Unknown Error 255 on Multi-Write when including a string HOT 6
- read tag from 80 sets of plc HOT 22
- Double read packets? HOT 6
- cannot import name 'Adapter' from 'pylogix' HOT 23
- Tag Write falsely reports Success HOT 7
- "Forward open failed" when trying to read tags from Berghof PLC HOT 8
- .GetDeviceProperties always returns DeviceType of "None" HOT 5
- Issues connecting to emulate HOT 7
- micro850 connection HOT 5
- Return data gets jumbled up on a multi write when the tags don't exist. HOT 13
- The return value is different when using a multi write compared to a single write for a string. HOT 4
- cannot get a tag list HOT 3
- Is it possible to inhibit a periodic task? HOT 2
- pylogix - returning a tag list as a row of values HOT 7
- PLC REAL values HOT 5
- Pylogix - compare a previously acquired tag list with the current one HOT 5
- Discover does not work while running pylogix in docker HOT 10
- Invalid Continuation Byte HOT 5
- Abnormal code termination. HOT 8
- Do I need to use routing? HOT 20
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 pylogix.