Giter VIP home page Giter VIP logo

Comments (4)

aljoshakoecher avatar aljoshakoecher commented on July 21, 2024

Hey @mf093087, you shouldn't use "=" with CLI parameters, so please try it just like this:
java -jar cli-x.x.x-jar -f <PLCopen XML file you want to map> -e <endpointURL of your PLC> -n <root component of the PLC project>. You can also try to wrap your parameters in quotation marks to be sure to not have problems (e.g. when your parameters have spaces)

Currently, all these parameters are required:

  • -f is the file you want to map (looks good in your example)
  • -e is the endpoint of the OPC UA server, which is unfortunately not included in a PLCopen XML file (looks good in your example)
  • n is a root component of a node ID. We used Codesys to write the PLC code and generate the PLCopen XML. Codesys automatically generates node IDs based on the project structure AND a constant root component. Unfortunately, this root part of a node ID is not preserved in the PLCopen XML and thus has to be added with this parameter. You can check your OPC UA server with a client such as UaExpert. I just checked for an example server and found this node ID ns=4;s=|var|CODESYS Control Win V3 x64.Application.PLC_PRG.sensorA. The PLCopen XML contains the structure starting with Application, so in this case you would have to set -n to "ns=4;s=|var|CODESYS Control Win V3 x64".

I have to admint , this parameter is currently a problematic one, because it is error-prone to set and may also be different / not suitable depending on the tool used to generate the PLCopen XML file. Could be that other create a completely different node ID structure and all our assumptions are invalid. We are currently working on simplifying this aspect.

Hope that helps!

from plc2skill.

aljoshakoecher avatar aljoshakoecher commented on July 21, 2024

Hey @mf093087, I have some good news for you. Using Plc2Skill is now much easier because you don't have to pass in the -n parameter anymore. Only -f and -e are required if the PLC and its OPC UA server are running. Plc2Skill will then automatically browse for variables and resolve their nodeIds.

from plc2skill.

aljoshakoecher avatar aljoshakoecher commented on July 21, 2024

You can also pass in a user and password in case the OPC UA server requires an authenticated login.
And in cases where this new logic fails you can still fall back to the "old way" and add a root component of the nodeId manually by passing in -n. Please check out the updated documentation, the latest release is now properly released here.

Let me know if you can work with that 😄

from plc2skill.

aljoshakoecher avatar aljoshakoecher commented on July 21, 2024

Closing this for now. Feel free to reopen or create a new issue in case you have any questions.

from plc2skill.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.