03-21-2011 08:51 AM
I have created my own OPC server for simulation purposes. If I create an I/O server and select my OPC server I can then "create bound variable" in which I can browse my OPC tags which are all in there. I use another program which makes use of property nodes to acquire a list of paths to these tags. The list is empty. I noticed that when I run the "NI Distributed System Manager" I can see the I/O Server but the sub tree doesn't show my tags. If I got them to show up in "NI DSM" then I could get a list of tag paths. Does anyone know why my tags would show up in the "created bound variable" window and not the "NI DSM" window? I have tried deploying the library that the I/O server is in but this doesn't work.
Thanks
Matt
03-23-2011 05:09 PM
Matt:
What property nodes does your program use to determine the paths to the tag?
It sounds like there are two "domains" that we're working with in this system. One is the OPC tags your server is publishing. The other is the Shared Variable Engine and the variables it is publishing.
When you've created an I/O Server (I assume you selected "OPC Client") you have to right-click the I/O server and create bound variables. The dialog that pops up will allow you to browse through the OPC server's published tags to select the ones you want to bind your variables to.
Once you create and publish those bound variables, you have a set of shared variables whose values are bound to those OPC tags, but which are being published over the Shared Variable Engine.
DSM will be able to see the shared variables, but not the OPC tags that they are bound to. If you don't have bound variables, you won't see your OPC tags from DSM. All you will see in DSM are shared variables.
Hope that helps out a bit! Let me know if I was completely off the mark in understanding your issue.
03-24-2011 08:25 AM
Thanks for the reply Charris,
I have two OPC servers. One is the simulator and one that I connect to at a remote location which required some OPC client software (some service in windows registry which I am not familiar with). All I know is that I can browse all tags on the remote OPC server by first creating an I/O server (yes I use OPC client) and selecting "create bound variables". Before I bind any shared variables to OPC tags I can go into DSM and see all the tags that are not yet shared variables.
When I try doing this with the simulator, I first create the I/O server before I can browse all the tags in "create bound variables". But this time when I go to the DSM, they are not listed under the I/O server. This is just an observation.
My real problem is that I use this piece of code found on the NI website to get a list of tags (URLs). This code works with the remote OPC server but not with the simulator.
I don't really understand the code. All I know is that if I input the name of the library and the name of the I/O server as well as the path to the PC, it brings back a list of URLs pointing to tags. Maybe there is something in this VI you can help with.
Thanks
Matt
03-25-2011 02:22 PM - edited 03-25-2011 02:22 PM
Matt:
When you refer to the "Simulator," do you mean that you're using NI OPC Servers with simulated channels in it?
Are the two OPC Servers (the actual one and the simulator) running on the same computer?
I'm still a bit confused about your system/network topology layout. Would you be willing to classify everything?
i.e.
Computer 1: OPC Server, simulated OPC server, DSM
Computer 2. LabVIEW, DSM
On computer 2, using DSM, I can see OPC tags from "OPC Server" on computer 1, but not "simulated OPC server" on computer 1.
On computer 1, using DSM, I can see both.
Something like that? Sorry to make it so complicated, I just want to make sure I've got everything straight
03-25-2011 02:37 PM
I have a customer in a different city. They gave me OPC software. I installed it and used it to browse their instruments (tags). Then they gave me a simulator (which they wrote half fast (ie not tested or used in industry)). I used the attached VI to get a list of all available URLs on their instrument. Now I am trying to get a list of all available URLs on their simulator.
03-25-2011 02:54 PM
Apparently for the simulator, the customer used Visual Basic to write an OPC server application which adds a service to the registry. Then he uses Labview to write values to the URLs that are now set up. I would give you the simulator but it's kind of a pain to setup.
Hope this helps.
Matt
03-28-2011 11:37 PM
Matt:
How confident are you in the simulator?
Can any OPC clients work with/see tags on the simulator? If we have tested NI software and code that communicates with a commercial OPC server package remotely, I don't see why it shouldn't communicate with an OPC server locally, too. Is there any way we can confirm (with something non-NI if possible) that the simulator is indeed publishing the tags we expect it to?
Do you have a copy of the NI OPC Quick Client you could try it with? It's in the "National Instruments\NI OPC Servers" folder in the Start Menu if you have it.
03-29-2011 08:10 AM
I used Matrikon OPC Explorer and can view all tags in the simulator.
03-29-2011 08:31 AM
In the VI I posted: Get Tag List.vi when I highlight execution I can see that in step "4. Get all the items in the process" it gives an error:
-1967362038
Property Node (arg1) in Get Tag List.vi
So for me, logically I go into the DSM and can see the simulator called "CemSim" with no tags in the tree under it. In my real OPC server I have branches and can see all available tags in DSM.
03-29-2011 09:27 AM
I can use OPC Quick Client to browse all tags as well. Ok, I will give you the simulator. In the attached zip file there are 2 folders, one being the OPC server simulator and the other being the Labview project that writes to the simulator tags.
Setup:
1. copy the "Northern Dynamic" folder to: C:\Program Files\Common Files
2. run the file C:\Program Files\Common Files\Northern Dynamic\SLIK-DA4\opc_CemSim5.exe
3. Click register and Start server buttons (keep this app opened)
4. open Simulator project file and run the panel.vi
5. click on the buttons near the bottom and if the graph starts displaying data this means that the simulator is working.
From here you can try to figure out why the "Get Tag List.vi" won't bring back a list of all available tag URLs even though the tags show up in the "create bound variable" setup as well as NI Opc Quick Client and Matrikon OPC explorer.
Thanks a lot. I appreciate your help. I should also mention that we pay for premium support so if you can't figure it out then I will be calling engineering for help.
Thanks again.
Matt