Advanced Search

Search Results (Searched for: )

  • Moutomation
  • Moutomation
20 Aug 2024 05:56
Replied by Moutomation on topic gmoccapy pins

gmoccapy pins

Category: Gmoccapy

#!/usr/bin/env python3
import os
import time
import hal
import linuxcnc
import shutil

source = "/mnt/taglio/CutDocument.txt"
destination = "/mnt/CutDocument.txt"

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 = '/mnt/taglio/CutDocument.txt'
# wait time in milliseconds between file checks
check_interval = 1000
# length of output pulse in milliseconds
pulse_length = 1000

last_modified = os.path.getmtime(file_path)
check_timer_start = round(time.time()*1000)
h = 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!")
                    shutil.copyfile(source, destination)
                    h = True
                    pulse_timer_start = round(time.time()*1000)
                    last_modified = current_modified
                    shutil.copyfile(source, destination)
                if h and pulse_timer_start + pulse_length <= round(time.time()*1000):
                    h = False
            # restart the timer for file checking
            check_timer_start = round(time.time()*1000)
except KeyboardInterrupt:
    raise SystemExit

 
  • Moutomation
  • Moutomation
20 Aug 2024 05:54
Replied by Moutomation on topic gmoccapy pins

gmoccapy pins

Category: Gmoccapy

Currently, the Windows folder is shared and we can see this folder in Linux. However, sometimes when Linux starts faster than Windows, Windows does not open and the Python code gives an error because it cannot find this file and Linuxcnc does not open. How can we do something here? For example, if it cannot find the file, it does not give an error and Linux starts. Can we do this? Having Linuxcnc open without errors is enough for me. It should be enough that it does not prevent Linuxcnc from starting.
If there is a file, it should read it. If there is no file, it should not prevent Linuxcnc from starting without giving an error.
  • uugp
  • uugp
20 Aug 2024 05:07

Results of latency test, list of computers tested for use with LinuxCNC

Category: Computers and Hardware

I bought a few very old motherboards for $5-$10 to run CNC, which is much cheaper than the Raspberry Pi.
Post a test record, which I think this is a configuration that can work stably, for reference.

Configuration 1: ASUS-M4A88T-M with built in paralletport+AMD640iiX4+ATI graphics old card + RTAI.  

 

Latency test 3 hours, seems to be good, but it is fake.
In order for the parallel port-stepping configuration to work stably, this value needs to be set to more than 9000 in setpconf, otherwise there will still be rare random errors, such as following errors or latency spikes.
The built-in graphics card can be used and without spike, and adding a graphics card can reduce the Latency slightly and obtain a good color, But once add a graphics card, it will have spikes issue. - no matter how much Latency value is set, so it must be add a option to GRUB:    radeon.dpm=0 

Several key points:
in GRUB:
radeon.dpm=0 Causes GPU to overheat
idle=poll   Causes CPU to overheat

in BIOS:
CPU Over Voltage <= 1.25V   Otherwise, it will overheat and crashes
ACPI APIC surpport = Enable   Otherwise, Linuxcnc crashes with the RTAI kernel 
others, as far as possible set Manuall or Fixed value

A confusion
on AXIS GUI graphical display area, LEFT click will causes the rolling coordinate numbers to be halt/pause update.
no interference with machine moving.
 
  • Aleksi
  • Aleksi
20 Aug 2024 04:29
Replied by Aleksi on topic Сreating a component

Сreating a component

Category: General LinuxCNC Questions

I found the reason, it was necessary to add my function to the thread.
  • snowgoer540
  • snowgoer540's Avatar
20 Aug 2024 03:23
Replied by snowgoer540 on topic Straight cut error

Straight cut error

Category: Plasmac

I will try to make some time to take a look in the next few days.
  • PCW
  • PCW's Avatar
20 Aug 2024 02:48

Converting a 7i76e config to 7c81/7i76 pair

Category: General LinuxCNC Questions

That should about do it as long as you have 7C81+7I76 firmware installed on the 7C81
  • Aleksi
  • Aleksi
20 Aug 2024 02:07 - 20 Aug 2024 02:39
Сreating a component was created by Aleksi

Сreating a component

Category: General LinuxCNC Questions

   

File Attachment:

File Name: test.comp
File Size:0 KB
Hi all! I need to write a component that could control the spindle gearbox shifting depending on the revolutions, but since I am a beginner, I first want to create a simpler component. The job of this simple component is to set the output to TRUE if both inputs are TRUE. To check, I use HALSHAW, I change the signals at the input of the component, but the output does not change, what am I doing wrong?
  • Benb
  • Benb's Avatar
20 Aug 2024 01:54
Replied by Benb on topic Scaling 0-1024 to 0-102

Scaling 0-1024 to 0-102

Category: HAL

 
  • winyk
  • winyk
20 Aug 2024 01:52

How to make HAL pins from .c kinematics file?

Category: HAL

Hello. I am a newbie. Please note that not only I am new to LinuxCNC, but I am also new to CNC as well. However, the reason I am learning LinuxCNC is because my boss want someone to help with one of the mills that we have in our office. The mill is very similar to that of 5axiskins config (located at configs/sim/axis/vismach/5axis/bridgemill) that provided with LinuxCNC by default. Since it is too dangerous to experiment on the actual machine, I am testing things out on a virtual machine (LinuxCNC on Debian inside VirtualBox). I have installed LinuxCNC using run-in-place method.

What I am trying to achieve for now is to make some extra HAL pins from 5axiskins.c . My boss suggest that I can create additional HAL pins by simply adding additional members to the haldata structure in 5axiskins.c .  Actually, he had done this before. He managed to create two HAL pins named x-offset and y-offset by modifying the haldata struct to be as followed:
struct haldata {
    hal_float_t *pivot_length;
    hal_float_t *x_offset;
    hal_float_t *y_offset;
} *haldata;

Then he added these lines to the [HAL] part in the 5axis.ini to create two signals
HALCMD = net :x-offset 5axiskins.x-offset
HALCMD = net :y-offset 5axiskins.y-offset
HALCMD = net: sets x-offset -0.25
HALCMD = net: sets y-offset -37.975

However, after I tried to follow his steps, I cannot reproduce his result. AXIS is no longer able to start the config, and it gives me an error saying that pin 5axiskins.x-offset does not exist. 

 

This error was generated from the lines I added in 5axis.ini. Commenting out the four lines I just added in 5axis.ini allowed me to get into AXIS, but I couldn't find the pins I just added inside Halshow (note that pivot-length pin comes with 5axiskins.c by default). So the cause of the error is clear: the pins didn't get created at all.

  

After consulting with my boss, he is not sure why it doesn't work this time either. So, I am asking for help on this post. Is it possible to create HAL pins by simply modifying haldata struct in .c kinematics file? If so, what did I do wrong?
  • acondit
  • acondit
20 Aug 2024 01:44 - 20 Aug 2024 01:47
Replied by acondit on topic Converting a 7i76e config to 7c81/7i76 pair

Converting a 7i76e config to 7c81/7i76 pair

Category: General LinuxCNC Questions

After about a year, I am back to trying to get this to work. I have updated to Bookworm.
I enable spi in config.
I have been able to talk to the 7c81/7i76 with mesaflash.
I edited my 7i76e hal file replacing 7i76e with 7c81.
When I tried to start linuxcnc I got an error associated with this line:
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=0 num_pwmgens=0 num_stepgens=3 sserial_port_0=0xxxxx"
I assume I need to replace hm2_eth with hm2_rspi and take out the board_ip="10.10.10.10"
Anything else I need to do?
Thanks in advance,
Alan
  • Benb
  • Benb's Avatar
20 Aug 2024 01:18
Replied by Benb on topic HP EliteDesk 800 G2 VGA Scrambled

HP EliteDesk 800 G2 VGA Scrambled

Category: Installing LinuxCNC

The trick is to install Debian via the internet www.debian.org/CD/netinst/ In this way, Debian will load the correct hardware drivers for your PC. Once you install Debian 12. Use Synaptic to install Linuxcnc. I have not tried this method; I prefer to use run in place method (RIP). If you need step by step instructions how to install RIP Linuxcnc let me know.
  • slowpoke
  • slowpoke
20 Aug 2024 00:22 - 20 Aug 2024 00:24
Scaling 0-1024 to 0-102 was created by slowpoke

Scaling 0-1024 to 0-102

Category: HAL

I have an exposed analog from pot value in HAL "arduino.ain.0"  (range is 0-1024), and I want to drive "halui.axis.jog-speed" with that value divided by 10

1) Am I best to use mult2, scale or something else?
2) How to implement whatever you suggest?

Much appreciated.

This entire HAL concept and the implementation with HALShow is simply fantastic!

I cobbled together a really rough around the edges (proof of concept) gadget to test messaging before going to an actual PCB and so far so good, All the buttons are working, Pot's next and then a few messages to the display and proof of concept will be complete. 
 
  • my1987toyota
  • my1987toyota's Avatar
20 Aug 2024 00:08
Replied by my1987toyota on topic Video about shielding cnc machine wiring

Video about shielding cnc machine wiring

Category: Computers and Hardware

rodw post=308130 userid=20660
and like everything of quality in Australia, I had to wait for it to arrive from Germany

I am not dissing Austrailia. But it is surprising they don't do more manufacturing there. Their's certainly plenty of land for it.
That said I have never left the east coast of the United States so take my statement worth a grain of salt.
  • my1987toyota
  • my1987toyota's Avatar
20 Aug 2024 00:00
Replied by my1987toyota on topic Video about shielding cnc machine wiring

Video about shielding cnc machine wiring

Category: Computers and Hardware

I know for me I didn't use to care about shielding until things started acting up like missed steps, steps in the wrong directions, and or
false triggers, And yes price and availability played a large roll in that. Funny how price starts taking a back seat to scrapped parts.
LOL
  • my1987toyota
  • my1987toyota's Avatar
19 Aug 2024 23:51
Replied by my1987toyota on topic Barnworks shop update

Barnworks shop update

Category: Show Your Stuff

looks like you will have quite the shop when you're done.
Displaying 22411 - 22425 out of 25342 results.
Time to create page: 0.478 seconds
Powered by Kunena Forum