I have an opc project where i have a group of tags in a parent folder and then a subfolder. When i use the list() method,
it only list the tags in the sub folder and not the parent folder. Is this a bug in the program, or is there another way or method
to list all the tags in the parent folder as well as the sub folder
tags shouldn't be in folders. they should be leaves on branches - which function like nodes, not a traditional folder structure. i realize that you may simply be using the 'folder / file' analogy to describe the 'branch / leaf' scenario - but you must realize that this is the manner in which opc in general functions… it's a node topology, not a folder / file topology.
unfortunately I can't change the way tags have been defined. However, just to better understand, are you saying that the list method returns only the outer most leafs? In other words if i have a node with leafs and a sub node (with some leafs as well) the list method will show only the the leafs in the sub node.
Hopefully I'm not making to complicate.
Thanks in advance
i do believe that is the typical behavior. it depends on what the opc server is actually holding as an addressable level item.
let's say you have a controller with a bit register… B3.
in that bit register are 10 full data words (16 points each)… the full words look like B3:0 through B3:9
inside each word are 16 data bits… the addressable items are now B3:0/0, B3:0/1, B3:0/2… up to B3:0/15 - all the way through B3:9/15
these lower level bits are what the controller intends for the typical programmer to address or use. however, provided you're competent there is no reason why you can't address a whole set of 16 by simply using B3:5 (for example), and addressing at the word level. but just because you can do it in the controller's software does not mean that the controller will present it as a "ready to enjoy" listed item.
likely, you'll just get the outermost leafs.
for floating point (real) numbers, this obviously would have no where to drill down to… but i think you get the idea.
don't rely too much upon 'list' function - any data node or leaf that you can address in the controller software can be addressed via opc (usually). so i would just give a try at reading or writing what it is you intend to send or pull from your controller, and see what the actual result is without trusting 'list' too much.
Both reading and writing work good regardless the "position" of the tag.
Thanks a lot for the advice
no problem. i'm glad you got it working!
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.