Advanced Search

Search Results (Searched for: )

  • 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
  • cmorley
  • cmorley
09 Aug 2024 06:12
Replied by cmorley on topic qtdragonhd / probing

qtdragonhd / probing

Category: Qtvcp

Ok I see what you mean. What dimension should we use for Z depth?
Should it be 2x Z clearance?
  • newbynobi
  • newbynobi's Avatar
09 Aug 2024 06:05
Replied by newbynobi on topic Jog keys for A axis

Jog keys for A axis

Category: Gmoccapy

Hallo,

Keyboard shortcuts are IMHO dangerous and will only be used on hobby machines. I use a handmade hand MPG for that. But implementing more keys will not lead to a more or less dangerous behavior.

So implementing more keys is not the case. We should try to maintain the behavior equally on every GUI, so I suggest to use the same keys as on AXIS GUI.

Norbert
  • PhilipME
  • PhilipME's Avatar
09 Aug 2024 05:50
Replied by PhilipME on topic Not sure if my parallel port is working

Not sure if my parallel port is working

Category: General LinuxCNC Questions

No I did not try to run anything because the bob is not connected to anything yet.


I will try to run a small motor

Thank you for the reply
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
09 Aug 2024 04:35
Replied by Cant do this anymore bye all on topic Not sure if my parallel port is working

Not sure if my parallel port is working

Category: General LinuxCNC Questions

The parallel port is there 0x378
Have you tried running your machine ?
Displaying 23011 - 23025 out of 25540 results.
Time to create page: 0.444 seconds
Powered by Kunena Forum