Connection to Ignition OPC Server with a c# client

Hi everyone!

I’m working on a project wich consist of developping a Visual Studio application that will be connected to a PLC throught an Ignition OPC Server.

First I just created a “Simulators Dairy Demo Simulator” in Ignition and I’m trying right know to connect my little C# Client on it and…I’m really struggling to do that.

Here is my code which is trying to get a connection to Ignition:

            Opc.URL url;
            [color=#FF0000]url= new Opc.URL("????"); [/color]       //I don't know what URL I have to put here...                                           
            Opc.Da.Server server = null;
            OpcCom.Factory fact = new OpcCom.Factory();
            server = new Opc.Da.Server(fact, null);

            // connection
            try
            {         
                [color=#FF0000]server.Connect(url, new Opc.ConnectData(new System.Net.NetworkCredential()));[/color]
                _connection = true;
            }
            catch(Exception e)
            {
                Console.WriteLine("{0} Exception caught.", e.Source);
                _connection = false;
            }

Basically I have no idea on what url I have to put to being connected to the Ignition OPC server…

I will be very greateful for help ! :prayer:

Thanks !

Totof

Ignition does not have an OPC-DA server, so I think you’ll need a different library than you’re using. You need something that can do OPC-UA.

The endpoint URL will be something like: opc.tcp://1.2.3.4:4096

Well, the problem is in my Ignition OPC Server Connections there is a OPC UA Server at the beginning as Ignition OPC-UA Server…

I created a OPC-DA COM Connection but is status is ‘fault’ and I’m really stuck now…

Do you know any other C# library used for Ignition?

[quote=“Totof”]Well, the problem is in my Ignition OPC Server Connections there is a OPC UA Server at the beginning as Ignition OPC-UA Server…

I created a OPC-DA COM Connection but is status is ‘fault’ and I’m really stuck now…

Do you know any other C# library used for Ignition?[/quote]

what kevin is saying is that ignition does not support accessing tags(acting as a server) over a opc-da connection. It can only act as a client using opc-da. You will need to find a c# librry that supports opc-ua.

Hi everyone !

I tried something else with this sample opc client which you can find here:

support.industry.siemens.com/cs … 0&lc=en-WW

However when I’m trying to connect, I’ve got this error connection:

“could not add self-signed certificate to certificate store”, what does it mean ? :scratch:

Is it possible that Inductive Automation doesn’t allow other client like visual studio to connect to Ignition OPC Server ?? : :open_mouth: