GithubHelp home page GithubHelp logo

ivs-kuleuven / mtcs-models Goto Github PK

View Code? Open in Web Editor NEW
0.0 8.0 3.0 462 KB

Models of the Mercator Telescope Control System, written in the Ontoscript DSL.

License: GNU General Public License v3.0

CoffeeScript 98.65% Shell 0.01% Python 1.34%

mtcs-models's Introduction

MTCS-models

Models of the Mercator Telescope Control System, written in a DSL (Domain Specific Language) called Ontoscript.

Ontoscript is available at: https://github.com/IvS-KULeuven/Ontoscript

When the models are executed, they are converted into json-ld files.

These json-ld files can be read by OntoManager: https://github.com/IvS-KULeuven/OntoManager

OntoManager is a web-based application that provides convenient access to the models. It can be used to

  • query the models
  • convert the models into web-pages (e.g. for documenting system requirements, electric systems, software, ...)
  • convert software models into source code (Python and IEC61131-3 to be imported by TwinCAT)
  • analyze the models by reasoning (requires SPIN API by TopBraid)

mtcs-models's People

Contributors

wimpessemier avatar jperezpadilla avatar gertraskin avatar

Watchers

James Cloos avatar  avatar Bram Vandoren avatar Rik Huygen avatar Wim De Meester avatar  avatar  avatar  avatar

mtcs-models's Issues

Ontomanager generating code. XML file structure

To be checked on Testing-Ontomanager brach:
https://github.com/IvS-KULeuven/MTCS-models/tree/Testing-Ontomanager

Updating the software.coffee file for a subsystem, for example "services" subsystem. The
compiling or generating code process works fine in OntoManager, then the new XML file is loaded into the PLC software and compiled without errors.
The "problem" is that after starting the PLC, running the new version, it lost the configuration about this subsystem, the config variables related with "services".
Entering in the "Config" tab we can see that most those variables are at 0.0 and checkboxes at "False".
It seems to be related with the struct of the config section in the XML file generated by Ontomanager. Twincat and PLC XML parser seems to be sensitive to variables' order.

I'll try to explain my tests:

  • This is the sequence of the first test:
    Starting with a PLC code (TwinCAT) that works correctly.
    Generating "mtcs_services" model in Ontomanager.
    Loading this new generated model in TwinCAT.
    Compiling all in TwinCAT and sending to PLC.
    It works, although with small errors because it "losses" several configuration data in
    config tab. Inserting manually these data everything works perfectly.
    Removing services.xml file in the PLC
    Saving XML file from config tab.
    Everything works fine, even after restarting, etc.

  • Second test, to try to find the cause of the problem:
    Generating again "mtcs_services" from exactly the same source coffeescript model in
    Ontomanager.
    Loading this new generated model in TwinCAT.
    At this step I already can see that the STRUCT of the ServicesWestControllerConfig has changed, two of the five variables have swapped the order.
    Compiling in TwinCAT and sending to PLC.
    As before, It looses data in config tab for West controller (This example)

Here a screeshot of TwinCAT after loading mtcs_services.XML file for the two previous tests.
The variables' order in the STRUCT is different.
Ontomanager-Models-Issue-01

Therefore, could generated code be different, even being generated from an identical source?
Comparing two XML files generated by Ontomanager from the same source:
TREE VIEW
Ontomanager-Models-Issue-02
XSL VIEW
Ontomanager-Models-Issue-03

Finally, this is the section of software.coffee file for mtcs_services dealt in this example, that is the source code for generating the XML file.
I think the XML file should always take this order to generate the XML file:
Ontomanager-Models-Issue-04

Conclusions and Questions:

  1. I think the system is sensitive to variables' order in the config structure.
    I can understand it and this has not be an important issue. We can loose the config if we change the variable's order or inserting new ones.

  2. Why is Ontomanager generating the XML file with a more or less random order for the variables inside of a Struct ? I think that it behavior is new.

  3. What is different?
    I don't know what things make sense. I only list things that can be different respect to a year ago,

  • Ontomanager is running in a virtual machine which was moved to other server in the last January. Was it updated or changed?
  • Has been Ontomanager changed? I think no.
  • Does Ontomanager need external software, as Java or coffee script installed in the computer?
    If so, is it different after the update in January?
  1. Any other idea will be welcome.

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.