Code Monkey home page Code Monkey logo

Comments (8)

mbuesch avatar mbuesch commented on August 23, 2024

Thanks a lot for your bug report.

Yes, indeed. Changing the I/O configuration online is not supported by the linuxcnc hardware module, yet.
It should probably not crash, though.

from awlsim.

mbuesch avatar mbuesch commented on August 23, 2024

I would rather let the user decide whether to restart Hal/LinuxCNC.
Resizing I/O areas is such a big change. It has other implications like the need for new nets in hal config.

So I fixed the crash and added a warning instead.

The E-Stop change will be tracked in a separate issue.

from awlsim.

uncle-yura avatar uncle-yura commented on August 23, 2024

If you enable the component to be updated, it will be possible to automatically connect the networks to the newly created pins.

6.3. connect
Connect a pin to a signal.
example:
hal.connect("pinname","signal_name")

6.4. new_signal
Create a New signal of the type specified.
example"
hal.new_sig("signalname",hal.HAL_BIT)

Just add a field in the GUI to enter the name of the automatically connected network. This feature and a correctly configured HAL template will make it possible to configure almost any machine without editing the HAL file, it will be enough to modify "stepconf" or "pncconf" to add additional settings to the INI.

from awlsim.

mbuesch avatar mbuesch commented on August 23, 2024

Thanks for your suggestions.

I'd rather like to not do this.
This is due to a couple of reasons.

  • Separation of concerns. The Awlsim LinuxCNC module knows nothing about signals. It only knows about its input and output pins. Connections are made in the .hal configuration file.
  • Moving the signals (and their connections) to the Awlsim project would deviate from the basic concept that (all?) other LinuxCNC modules use. The HAL file is the place to make these connections.
  • I don't think basic reconfiguration of the HAL I/O signals is a thing that has to be done often. It's Ok to demand a restart of the LinuxCNC system.

from awlsim.

uncle-yura avatar uncle-yura commented on August 23, 2024

In general, you are right, but the python hal component makes it possible to create networks, which means that this is not a deviation.

When working with hal files, you also do not know about networks, a typo in the name creates two different networks. I understand that LinuxCNC gives a lot of tuning flexibility, but I don’t like working in HAL, this process takes a lot of time, the program is very long, and debugging and navigation in it is very difficult.

I agree that reloading a component has an ugly solution, but when debugging a program on a machine, it is not always possible to constantly reload it. As an example, in one of my machines, when starting up, grease is turned on and at each load it poured a ton of oil onto the guides. Also, when you restart, you have to go to zero, which takes time.

How can it be a compromise that you can generate a hal file template with pins and networks initialized in awlsim?

from awlsim.

mbuesch avatar mbuesch commented on August 23, 2024

I understand that it would be convenient not to restart.
But I still don't see how I could solve that in any way.
I cannot re-implement LinuxCNC's HAL configuration mechanism in Awlsim. That is the wrong place.
I agree that working with HAL configurations is not very nice. But if there's a need for an easier (e.g. graphical) HAL configuration, that has to be done in the LinuxCNC project.

Restarting of the HAL should not be triggered by Awlsim. There's no way Awlsim can know whether there are any side effects in other parts of the setup.
The user must decide whether to restart the HAL or not. The user is free to issue the halcmd manually.

from awlsim.

uncle-yura avatar uncle-yura commented on August 23, 2024

OK, you're right. What I describe only partially solves the problem. And I just thought that it would be nice to connect standard pins like "axis" or "motion". In practice, you will still have to connect external inputs and outputs. Anyway, you have to create a network and enter the physical input and output.

from awlsim.

mbuesch avatar mbuesch commented on August 23, 2024

Fixed in Awlsim 0.72.0.

from awlsim.

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.