Advanced Search

Search Results (Searched for: )

  • RushA
  • RushA
24 Feb 2025 03:25

How to access rt pins in user space

Category: General LinuxCNC Questions

Hi,
    I create some pins in the RT module, now I want to read and write pins' value in user space.I use the following code,but it failed.Is there any way to access RT module pins in the user space? The environment is Ubuntu20.04+xenomai3.1+linuxcnc2.9.Thanks!
    int compId;
    int ret;
    hal_float_t *pin_value;
    // init HAL
    compId = hal_init("user_program");
    if (compId < 0) {
        rtapi_print("HAL init failed\n");
        return -1;
    }
    pin_value = (hal_float_t*)hal_malloc(sizeof(hal_float_t));
    ret = hal_pin_float_new("kernel_pin", HAL_IN, &pin_value, compId);
    if (ret < 0) {
        rtapi_print("getting or creating pin failed!\n");
        hal_exit(compId);
        return -1;
    }

    ret = hal_link("user_program.kernel_pin", "ALT.I2600");
    if (ret < 0) {
        fprintf(stderr, "cann't bind signal!\n");
        hal_exit(compId);
        return -1;
    }
    hal_ready(compId);
    
    //*pin_value = 123.45;
    //rtapi_print("value is: %f\n", *pin_value);
    hal_exit(compId);

It prints some messages:
HAL: initializing hal_lib
HAL: initializing component 'user_program'
HAL: component 'user_program' initialized, ID = 28
smalloc_up: shmem available 1386552
HAL: ERROR: pin_new(kernel_pin) called with already-initialized memory
HAL: creating pin 'kernel_pin'
HAL: ERROR: data_ptr_addr not in shared memory
  • Tinker
  • Tinker
24 Feb 2025 03:19
Replied by Tinker on topic 7I97T joint following error

7I97T joint following error

Category: General LinuxCNC Questions

This card is not putting out any voltage to correct the position commanded vs position actual.. i think i might have a bad one
  • captain chaos
  • captain chaos
24 Feb 2025 02:35

Parallel Port XYYZ Gantry Homing Linuxcnc 2.9.4

Category: Configuration Tools

Homing my greatest bugbear. I simply can't get my head around this one.
I wish to have my new machine home X axis and Z axis using one pin IE pin 11
and the two Y axes  on pin 12.
I would prefer to have the Z axis home before the X.
The 2 Y axes should home together in whichever drive arrives first.
I have tried a number of things but have reverted to this setup.
Any help would be greatly appreciated.
Cheers Paul
  • GeneRF
  • GeneRF
24 Feb 2025 01:48

Float precision for Ultra-Precision applications

Category: General LinuxCNC Questions

The feature size is still well above a nanometer, but the edge precision and positioning precision have been well below a nanometer for many years.

The numbers quoted for various generations, such as TSMC's 4 nm are pure fiction; merely a label. Real dimensions have not been used as generation names for more than 20 years.

(I spent my career in state-of-the-art lithography. Now I use LinuxCNC to build model steam engines.)

Gene
  • unknown
  • unknown
24 Feb 2025 00:47
Replied by unknown on topic Byte 2 bot setup will not work.

Byte 2 bot setup will not work.

Category: General LinuxCNC Questions

Every reference to PINxx should be GPIOxx, which you see by reading the docs for hal_gpio.
If you need to use GPIO7 and GPIO8 you will need to disable SPI in /boot/broadcom/config.txt.
Also you may have to play around with the base thread to prevent rt errors.

linuxcnc.org/docs/devel/html/drivers/hal_gpio.html

Also loudly complain to byte2bot.

In the RPi sticky there is some info regarding hal_gpio and one or 2 other threads with working examples, not directly related to byte2bot but enough to see how it should work.

The Devs and other community members put hard work into the docs.
  • Tinker
  • Tinker
24 Feb 2025 00:27
Replied by Tinker on topic 7I97T joint following error

7I97T joint following error

Category: General LinuxCNC Questions

That correct, when LCNC faults the enable is removed and the drives are disabled. The servo drift stops.
  • tommylight
  • tommylight's Avatar
24 Feb 2025 00:23
Replied by tommylight on topic 7I97T joint following error

7I97T joint following error

Category: General LinuxCNC Questions

I might be wrong, but i have a feeling you did no go through the post me and PCW linked to.
The motors should ABSOLUTELY be under LinuxCNC control, so when a fault occurs, NOTHING should move.
  • Jdolecki
  • Jdolecki
24 Feb 2025 00:20
Replied by Jdolecki on topic Lathe project

Lathe project

Category: Turning

Electrical panel latest.

 
  • tommylight
  • tommylight's Avatar
24 Feb 2025 00:18
Replied by tommylight on topic Float precision for Ultra-Precision applications

Float precision for Ultra-Precision applications

Category: General LinuxCNC Questions

That is below "Extreme Ultra Violet" with it's 13nm wave length.
What is the current TSMC node, 4nm ???
  • Skippy2024
  • Skippy2024
24 Feb 2025 00:14
Replied by Skippy2024 on topic Byte 2 bot setup will not work.

Byte 2 bot setup will not work.

Category: General LinuxCNC Questions

Thank you for the response.  Here are the hal&ini file.
  • Tinker
  • Tinker
24 Feb 2025 00:12
Replied by Tinker on topic 7I97T joint following error

7I97T joint following error

Category: General LinuxCNC Questions

I checked all the wiring(factory made from Anilam) the encoder are counting correctly. I checked the voltage going to the drive with my Fluke 289 and i get -10mv constant. When I hit the job button it goes from 10 to 11 to 12 and then faults out on following error. The servos just keep drifting. I have hooked up my power supply and varied the voltage to the drive and they respond accordingly. Is it possible my Mesa card is faulty?
  • unknown
  • unknown
24 Feb 2025 00:03

Float precision for Ultra-Precision applications

Category: General LinuxCNC Questions

Wow so you're aiming for sub lithographic accuracy, you got any pictures of your machine ?
How you handling temperature, a dedicated controlled room ?
I guess this is a retro fit ?
  • PCW
  • PCW's Avatar
23 Feb 2025 23:58
Replied by PCW on topic 7I97T joint following error

7I97T joint following error

Category: General LinuxCNC Questions

Any voltmeter should do.
 
Displaying 18736 - 18748 out of 18748 results.
Time to create page: 0.410 seconds
Powered by Kunena Forum