CoDeSys OPC server with SIMULATION3 interface

Stefan
2016-02-18
2016-02-24
  • Stefan - 2016-02-18

    I'm trying to get the Codesys opc server to work together with a simulated codesys v3 program.
    The OPC user guide suggests this should work, but i can't get it running.

    I have a simple project:
    1 codesys control win v3 device
    simple program with a few booleans / integers and a timer
    1 global variable which increments every cycle (as suggested somewhere in the forums)
    a symbol table

    when I run the code, and I configure the OPC server with a GATEWAY3 interface, and 127.0.0.1 as plc address, i can see my tags with Matrikon Explorer
    when I simulate the code, and I configure the OPC server with a SIMULATION3 interface and project name pointing to the .xml document (incl. path), i can see the plc in Matrikon Explorer, but no application, program or tags appear.

    I guess i'm missing something?

     
  • drdolittle - 2016-02-22

    I have a similiar issue using SIMULATION3. I am a new user to CoDeSys, running CODESYS Control Win V.3.5 SP8.

    I have read the OPC manual, and have added a symbol file and have selected my variables, and set up the OPC-server to load the xml symbol file using an absolute file name. Then I compile and run the program.

    I have tried both running the OPC server as a server and as just as a regular application, as specified in the manual.

    When I go into the Matrikon OPC explorer, I see the OPC server and I see the that PLC-name that I have given, but Matrikon is unable to find any tags.

    I have also tried as the OP said, to set the simulator as GATEWAY3 and specify both the local IP-address and the PLC name, but to no avail.
    OPCServer.log then gives:
    (22.02.2016, 10:16:13.371) [PLC1_Test]: CPLCHandler: Reconnect[7]: STATE_PLC_NOT_CONNECTED: tries to open channel...
    (22.02.2016, 10:16:27.458) **** ERROR: [PLC1_Test]: CPLCComBase3: <-Open() Could not resolve nodename <127.0.0.1>

    IMG: codesys opc problem screenshot.png

     

    Related

    Talk.ru: 7

  • eschwellinger

    eschwellinger - 2016-02-24

    Hi,
    1. why not using the real plc, which comes with CODESYS Installation
    2. why not using OPCUA - less administration effort! - NO OPC Server needed everything is embedded in the PLC Runtime (Control Win or Control RTE)

    BR
    Edwin

    IMG: startplc.jpg

     
  • drdolittle - 2016-02-24

    Edwin Schwellinger hat geschrieben:
    Hi,
    1. why not using the real plc, which comes with CODESYS Installation
    2. why not using OPCUA - less administration effort! - NO OPC Server needed everything is embedded in the PLC Runtime (Control Win or Control RTE)
    BR
    Edwin

    You will have to bear with me if I this is a little over my head, I am a new user of CoDeSys.

    1. I do not understand what you mean by "real opc". Do mean use the physical hardware instead of simulation mode, because that is not feasible in my case, but perhaps you mean something else?

    2. I am running Control Win so I do have the the OPC UA server as you said. I can press the button you point to but then what? Where can I see my tags (I have never used OPC UA.)

     
  • eschwellinger

    eschwellinger - 2016-02-24

    Zitat:
    1. I do not understand what you mean by "real opc". Do mean use the physical hardware instead of simulation mode, because that is not feasible in my case, but perhaps you mean something else?

    yes I mean you have a real plc running which run on the same pc where you execute CODESYS... so you have everything what you need.

    BR
    Edwin

    IMG: OPCUA_ControlWin.jpg

    OPCUA.project [48.79 KiB]

     

Log in to post a comment.