Advanced Search

Search Results (Searched for: )

  • Grotius
  • Grotius's Avatar
09 Aug 2024 09:14
Replied by Grotius on topic ethercat master service

ethercat master service

Category: EtherCAT

@Endian,

Can you implement a cycle counting component that counts up  4.
Then read in the canopen values, in other words, open the gate to the canopen every 4 cycles?

@ Rod,
I installed the linuxcnc iso. But udev rules are not working when set, also reload rules.
So bus is not starting after reboot.
I now have to start the bus invoking sudo after reboot.
I don't get it, where it's goes wrong.






 
  • Grotius
  • Grotius's Avatar
09 Aug 2024 09:04
Replied by Grotius on topic Trajectory Planner using Ruckig Lib

Trajectory Planner using Ruckig Lib

Category: General LinuxCNC Questions

@Vmihalca,

Thanks for giving your insights.

, it seemed to me a mess from an architecture standpoint
I can agree with that. It's evolved in a spagetti over the years. But it works.
Once you have a cmake project of lcnc loaded "insights into full project files structure relation",
even then it's hard to understand how things are done.

So the fact that they took this to the next level and you don't need a realtime kernel, I think its huge leap forward.
It's very nice you can run ethercat on a non realtime kernel.

so the controller app could be on any device/tablet, etc.
Yes this is nice.

From my standpoint, the goal was to get scurve running inside a custom linuxcnc trajectory planner component.
This evolved in a long forum thread. Many times i thought, it looks impossible to achieve this scurve motion planner.
Everytime there was a problem.  It looked doomed. Like don't value your time with linux. This is some times frustrating.

The last time i was focussing the project only on getting the 3d fillets done over the trajectory.
How to get the optimal velocity profile for a trajectory? How should you do that?

You can say, this forum thread is focussing on the scurve implementation and how to produce a optimal velocity profile for a
multi axis cnc machine, holding tight to valid science paper solutions.

That the trajectory planner now is tested on halcore is just because it has very compact code base, so errors can be filtered out quite easy.
The underlying hal is identical to that of lcnc. So integration when code is complete is more easy.
 
  • vmihalca
  • vmihalca
09 Aug 2024 09:01
Replied by vmihalca on topic Trajectory Planner using Ruckig Lib

Trajectory Planner using Ruckig Lib

Category: General LinuxCNC Questions

My goal is to create a modern cnc UI controller with touch screen and a state machine based UI where you don't see on the screen buttons and widgets that don't make sense at that point in time. (It makes no sense to see jog controls when you're in Auto mode, etc). Everything that Centroid is doing could be done better if we would have a core motion controller that would worth the effort of building on top of it. This is why I never closed this tab with this topic ever since it started and this is why I was so interested in OpenCN.
  • vmihalca
  • vmihalca
09 Aug 2024 08:45 - 09 Aug 2024 08:49
Replied by vmihalca on topic Trajectory Planner using Ruckig Lib

Trajectory Planner using Ruckig Lib

Category: General LinuxCNC Questions

I was pretty sure you were aware of this project. I've been talking to these guys last year, they were making tests on a 5axis machine using beckhoff hardware and claiming that it can constantly hold 10khz ethercat master.
There are some things that are not yet supported, like spindle encoders, synchronized motion, etc.
They explain here better on how they generate the positions for the drives using matlab: 


I know you put lots of effort into your solution, but on my short interactions with linuxcnc from a code perspective, it seemed to me a mess from an architecture standpoint. So the fact that they took this to the next level and you don't need a realtime kernel, I think its huge leap forward. Even if this would mean changing all my hardware to ethercat drives.
I can's say I fully understand what you said. I am very interested in this topic, OpenCN seems to have a good foundation from an architectural point of view, but even though I code Java/Kotlin and eventually Python, I don't know c++ at the level I could help with something. (at least not yet)
They are using some protocol buffers to communicate from between the motion control server with the UI app, so the controller app could be on any device/tablet, etc.
  • Grotius
  • Grotius's Avatar
09 Aug 2024 08:32
Replied by Grotius on topic Trajectory Planner using Ruckig Lib

Trajectory Planner using Ruckig Lib

Category: General LinuxCNC Questions

@Lcevette,

Thank you.

I didn't expect the look ahead, motion speeds over the trajectory would succeed.

Because i didn't really know how to calculate the speeds at gcode segment transitions.

I think we all together made succes.
Without the community input i would certainly not be at this stage.

Once you have something that works on this level, it has value.

@Vmi,

I was not aware of that. It's smart.
I have had an idea to create a virtual ethercat slave that replaces the hal environment.
Just like the ethercat-master examples create their own kernel modules. But it was just
an idea. Better stay at the current hal environment.

I spent a few day's finding the problem of my current situation, where the production machine was not
working as should, both on parport as on ethercat.

The problem is that the stepper motors where rotating very slow and hickey on ethercat.
Where this normally should run with more speed then a parport.

I did a few iso install's including the linuxcnc iso. 4 day's of trying to figur out the problem and no luck.

I even thought yesterday, maybe i have got infected by Stuxnet. Because the ethercat test board has worked without
any problems a few years ago and now it was not working good at all.

In previous post a was able to run a script to run the ethercat steppers on hal-core. So this morning i extended the
succesfull script to finally run the cnc program with it without any problems anymore.

To run the ethercat test board along with the cnc app :
Warning: Spoiler!


So this start first the "runtest_4_axis_state_machine", this is a script that starts the hal environment with the components.
Then it start the cnc program.

Now this is working as should be.
In the previous i was starting the cnc program as first, then loading the hal environment. Maybe this was causing trouble.
I have readed that user db1981 has also mentioned, first load the important hal stuff.

So in the end, the problem was not a compromised debian iso or a stuxnet or a zero day. It was just loading the
hal & program in wrong order.

Now the ethercat board also failed on a fresh linuxcnc installation yesterday, it moved the motors very slow and hickey,
maybe i have to look what was going wrong there as i now know it runs ok on halcore.

Ok this was a long story. I hope it was not bothering you.


 
  • Aciera
  • Aciera's Avatar
09 Aug 2024 08:18
Replied by Aciera on topic gmoccapy pins

gmoccapy pins

Category: Gmoccapy

Not sure as I cannot test updating the file remotely but if you want to add a time delay between file checks you could try this modified python component.
#!/usr/bin/env python3
import os
import time
import hal
import linuxcnc

h = hal.component("file-check")
h.newpin("file-changed", hal.HAL_BIT, hal.HAL_OUT)
h.ready()
# create a connection to the status channel
s = linuxcnc.stat() 

# this is the file being checked for updates (example looks for 'file.txt' in the config folder)
file_path = 'file.txt' 
# wait time in milliseconds between file checks 
check_interval = 5000
# length of output pulse in milliseconds 
pulse_length = 1000 

last_modified = os.path.getmtime(file_path)
check_timer_start = round(time.time()*1000)
h['file-changed'] = False

try:
    while 1:
        s.poll()
        # see if it is time to check the file
        if round(time.time()*1000) >= check_timer_start + check_interval:
            # we don't want to reload when program is running
            if s.task_mode == 2 and s.state == 1: # ie AUTO-mode and 'RCS_DONE'
                current_modified = os.path.getmtime(file_path)
                if current_modified != last_modified:
                    print("File has changed!")
                    h['file-changed'] = True
                    pulse_timer_start = round(time.time()*1000)
                    last_modified = current_modified
                if h['file-changed'] and pulse_timer_start + pulse_length <= round(time.time()*1000):
                    h['file-changed'] = False
            # restart the timer for file checking
            check_timer_start = round(time.time()*1000)
except KeyboardInterrupt:
    raise SystemExit
  • endian
  • endian's Avatar
09 Aug 2024 08:06
Replied by endian on topic ethercat master service

ethercat master service

Category: EtherCAT

yes exactly, second instance in the different thread timing ... like a 2/4/8/16ms thread or else... but I do not know how it shoudl be with a .xml file... there is necessary a new .xml file or ?

because a lcec instance 0 should run in servo thread ... but I am doing configuration for canopen and it is working at 4ms ethercat scan time... when I am using deifferent time, there are no 4th time every PDOs filled with 0x0000...

I think solution should be a new thread in 4ms cycle time which will filtrated this raw situation or something more complex as lcec in the 4ms time
  • Moutomation
  • Moutomation
09 Aug 2024 07:40
Replied by Moutomation on topic gmoccapy pins

gmoccapy pins

Category: Gmoccapy

I created a folder shared between Windows and Linux. I saved the File.txt file in this folder in Windows. When I open the file.txt file on the Windows side, make changes to it and save it, the g code changes directly in Linuxcnc. Everything is fine up to this point. However, while the Python code is running, I cannot send the new file.txt file with the same name to this folder, I receive a no permission warning. If I close Linuxcnc and the Python code does not work, I can replace the new file with the old file. There is no problem in going into the file.txt file, making changes and saving it. There is only a problem when replacing the old file.txt with the new file.txt.

I tried to do it, I tried to add time to the Python code, but I couldn't. I don't know if adding time is a solution anyway.
  • meister
  • meister
09 Aug 2024 07:37

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

you can try
PYTHONPATH=. bin/rio-test riocore/configs/MecanixDev/config.json

-> Quadencoderz and set indexenable, then rotate the axis and look if the indexout changed

same you can do in linuxcnc -> Halshow

set rio.spindle_encoder.indexenable to 1 and look at the rio.spindle_encoder.indexout
while rotating
  • Mecanix
  • Mecanix
09 Aug 2024 07:33

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

Wait wait, it see the index pin. I know because if I set the xxx.indexenable to true it trips on a rotation and reset the counter. 
Omg, the learning curve is steep, Olivier. Let me try to figure out how this works... prolly going to take me a day or two lool

  • Aciera
  • Aciera's Avatar
09 Aug 2024 07:26

How can I modify trivkins.c? (and also other kinematics files)

Category: General LinuxCNC Questions

I'm sorry, I forgot to mention this, the preview does not reflect machine movement (ie joint position) when using custom kinematics all it shows is axes position in a fixed coordinate system. If you want to see the effects off your custom kinematic then you would need a machine visualization (vismach) for your config. For a simple config with a 3axis mill see 'configs/sim/axis/vismach/3axis-tutorial' you can then change KINEMATICS = trivkins' to your kinematics. You should then see the spindle move to the left when jogging X in the positive direction:

 
  • Mecanix
  • Mecanix
09 Aug 2024 07:14 - 09 Aug 2024 07:18

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

if you want to use the spindle in linuxcnc, the correct hal connections must be entered 'net':

Nice, thanks! Progress ha. But still not getting any index input for some strange reason. The encoder pin pulses HIGH on the oscope on each rev (probed on the FPGA pin), that works fine, but it never shows up in Lcnc. Do I need to debug this from rio.c (hal component?)

  • meister
  • meister
09 Aug 2024 06:56

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

if you want to use the spindle in linuxcnc, the correct hal connections must be entered 'net':
        {
            "type": "quadencoderz",
            "name": "spindle_encoder",
            "pins": {
                "a": {
                    "pin": "25",
                    "pull": "up"
                },
                "b": {
                    "pin": "26",
                    "pull": "up"
                },
                "z": {
                    "pin": "27",
                    "pull": "up"
                }
            },
            "signals": {
                "indexenable": {
                    "net": "spindle.0.index-enable",
                    "display": {
                        "type": "none"
                    }
                },
                "position": {
                    "net": "spindle.0.revs",
                    "scale": 600,
                    "display": {
                        "title": "REV"
                    }
                },
                "rps": {
                    "net": "spindle.0.speed-in",
                    "display": {
                        "type": "none"
                    }
                }
            }
        }
  • Mecanix
  • Mecanix
09 Aug 2024 06:39 - 09 Aug 2024 06:44

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

@meister

Only when you have time (no rush), I'll need your help with a spindle encoder config. I can make the counter work (A & B signals), however I can't figure out how to make the Z index work. I've attached my config for reference, grateful if you could have a look at it and let me know what I'm doing wrong, or what I'm not doing rather.

ps. only guidance I found was in this thread, from old posts. Although all that info seems to have changed since :( And so I've tried everything before begging for your help!


@cornholio
I have no idea. It's a cmd from python-venv (to activate the virtual environment that Rio is isolated into). 
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
09 Aug 2024 06:38
Replied by Cant do this anymore bye all on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

Sweet will wait for more info.
@Mecanix what's the contents of this file
~/rio/riocore/bin/activate
Displaying 21436 - 21450 out of 26049 results.
Time to create page: 0.528 seconds
Powered by Kunena Forum