Giter Site home page Giter Site logo

Comments (4)

peterbryntesson avatar peterbryntesson commented on July 30, 2024 2

@suneetnangia sounds good - make a draft implementation.

from iot-edge-opc-plc.

koepalex avatar koepalex commented on July 30, 2024 1

@suneetnangia sounds really good, I like the idea

from iot-edge-opc-plc.

peterbryntesson avatar peterbryntesson commented on July 30, 2024

I suggest the following settings:

  • SlowNodeMinValue, SlowNodeMaxValue
  • FastNodeMinValue, FastNodeMaxValue
    where the default is min/max of the data type used

We probably need two more settings as well to control whether we randomize or not.

  • RandomizeSlowNodes, RandomizeFastNodes - where the default is false.

EDIT:
After looking in the code I think we can simplify things a little bit.

  • NodeMinRandomValue (double), NodeMaxRandomValue(double), RandomizeNodes (bool)
    add these properties to PlcSimulation and then modify code in PlcNodeManager.IncreaseNodes.
    (might change the name of the function to ChangeNodes to indicate that we are not just increasing values anymore)

The settings will then apply to both slow, fast and ultra fast nodes

from iot-edge-opc-plc.

suneetnangia avatar suneetnangia commented on July 30, 2024

@peterbryntesson great proposal.
Looking into the code, I suggest we decouple max and min values from random or sequential assignment of values and allow configurable step/increment size for sequential increments as well. This will potentially allow more realistic scenarios e.g. sensor values are often in a certain range (e.g. 0-100 degree C) and increased in a defined increment size (e.g. 1 degree C).

Example-

  1. Sequential with Min=1, Max=100, Step Size=1: value assignment will start from 1 with increments of 1 (step size), when max value is reached, it will start to recycle and assign value 1 again and follow the order.
  2. Random with Min=1, Max=100, Step Size=N/A: value assignment will occur from any value between 1-100.

Default min/max will be defined internally to the min/max of the type used (e.g. double, unit) so if user does not defined their specific min/max, system will assume the defaults.

These settings can be applied independently to slow, fast and ultra fast nodes.

from iot-edge-opc-plc.

Related Issues (20)

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.