Advanced Search

Search Results (Searched for: )

  • cmorley
  • cmorley
01 Jan 2025 05:19
Replied by cmorley on topic Reading values ​​from qtdragon.pref.

Reading values ​​from qtdragon.pref.

Category: Qtvcp

Here is a novel way:
save this as myofile.ngc is a path described in the INI's PROGRAM_PREFIX or SUBROUTINE_PATH
(filename myofile.ngc)
o<myofile> sub

;py,from interpreter import *
;py,import os
;py,from qtvcp.lib.preferences import Access

; find and print the preference file path
;py,CONFPATH = os.environ.get('CONFIG_DIR', '/dev/null')
;py,PREFFILE = os.path.join(CONFPATH,'qtdragon.pref')
;py,print(PREFFILE)

; get an preference instance
;py,Pref = Access(PREFFILE)

; load a preference and print it
;py,this.params['toolToLoad']=Pref.getpref('Tool to load', 0, int,'CUSTOM_FORM_ENTRIES')
;py,print('Tool to load->:',this.params['toolToLoad'])

; return the value
o<myofile> endsub [#<toolToLoad>]
M2

Then call it as an oword:

o<myofile> call
 
  • PCW
  • PCW's Avatar
01 Jan 2025 04:56 - 01 Jan 2025 05:07
Replied by PCW on topic Threading Index Varies With Speed

Threading Index Varies With Speed

Category: General LinuxCNC Questions

Unless I misunderstand, It does look like that which is a bit crazy.
It should chase the desired position basically with a PID
+FF1 loop and without any position offset. Of course bounded by the
joint maxaccel/maxvel constraints.

The current way it's done may be a compromise to minimize sync time.
Ideally. I think you want to move in such a way that you end up synchronizing
the position and velocity at the same time.
  • ihavenofish
  • ihavenofish
01 Jan 2025 04:47
mixing 5v and 24v on mesa cards was created by ihavenofish

mixing 5v and 24v on mesa cards

Category: General LinuxCNC Questions

So I got a cute little laser tool setter, but it is 5V. Everything else on my machine is 24v.

I have a mesa 7i96s, and a mesa 7i84

Where/how would I connect this so it is happy? It needs one 5v tolerant input to read the signal, and it also needs one 5v output to enable the laser.

It seems like I could dedicate one IO row on the 7i84 to 5v, but it seems a waste of IO.



Current IO layout:
5 volt input  
  • laser setter input (7i84)
  • probe input (7i84 - just to make use of this row, it can also run 24v)
  •  
  24 volt input 
  • hard limit x (7i96s)
  • hard limit y (7i96s)
  • hard limit z (7i96s)
  • home x (7i96s)
  • home y (7i96s)
  • home z (7i96s)
  • servo alarm x (7i96s)
  • servo alarm y (7i96s)
  • servo alarm z (7i96s)
  • spindle unclamp sensor (7i96s)
  • E stop (7i96s)
   5 volt output 
  • laser setter enable (7i84)
  •  
  24 volt output 
  • solenoid MQL (7i96s)
  • solenoid tool release (7i96s)
  • solenoid laser tool setter air (7i84)
  • spindle forward (7i96s)
  • spindle reverse (7i96s)

There will be other IO to come for the ATC. Seems I would have 16 open 24v inputs, 14 open 5v inputs, 7 open 5v outputs and 7 open 24v outputs. Plus the 2 high isolation outputs on the 7i96s. I will want an MPG as well, and there will likely be some switches and buttons and overrides but they are not decided yet.

This seem like the best way to do it? Any thoughts on a better plan? I guess I could just make some switches and things 5v that do not really require 24v.
 
  • TomAlborough
  • TomAlborough's Avatar
01 Jan 2025 03:53
Replied by TomAlborough on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Hello cornholio,

Thank you for your reply!

I see your point about "AI".

In your reply you separated the "CNC" part of the task (feed speed, etc.) from the "system" part of the task (boards, drivers, etc.). I agree with your split and then assert the "system" part of the solution should "just work".

LinuxCNC on Pi 5 should work as easily as say Google Maps on Android, with no system experience required to install and use the application.

Do you see folks in this thread who believe a better experience is possible? Who exactly would champion a better experience for Pi 5 and LinuxCNC? I believe many of the people who answer the system questions posed in this thread would also be contributors to an effort to revise the code. I have seen similar efforts succeed.

Let me know!

Thanks,
Tom Alborough
  • cmorley
  • cmorley
01 Jan 2025 03:03
Replied by cmorley on topic Threading Index Varies With Speed

Threading Index Varies With Speed

Category: General LinuxCNC Questions

/**
 * Run position mode synchronization.
 * Updates requested velocity for a trajectory segment to track the spindle's position.
 */
STATIC void tpSyncPositionMode(TP_STRUCT * const tp, TC_STRUCT * const tc,
        TC_STRUCT * const nexttc ) {

    double spindle_pos = tpGetSignedSpindlePosition(&emcmotStatus->spindle_status[tp->spindle.spindle_num]);
    tp_debug_print("Spindle at %f\n",spindle_pos);
    double spindle_vel, target_vel;
    double oldrevs = tp->spindle.revs;

    if ((tc->motion_type == TC_RIGIDTAP) && (tc->coords.rigidtap.state == RETRACTION ||
                tc->coords.rigidtap.state == FINAL_REVERSAL)) {
            tp->spindle.revs = tc->coords.rigidtap.spindlerevs_at_reversal -
                spindle_pos;
    } else {
        tp->spindle.revs = spindle_pos;
    }

    double pos_desired = (tp->spindle.revs - tp->spindle.offset) * tc->uu_per_rev;
    double pos_error = pos_desired - tc->progress;

    if(nexttc) {
        pos_error -= nexttc->progress;
    }

    if(tc->sync_accel) {
        // detect when velocities match, and move the target accordingly.
        // acceleration will abruptly stop and we will be on our new target.
        // FIX: this is driven by TP cycle time, not the segment cycle time
        double dt = fmax(tp->cycleTime, TP_TIME_EPSILON);
        spindle_vel = tp->spindle.revs / ( dt * tc->sync_accel++);
        target_vel = spindle_vel * tc->uu_per_rev;
        if(tc->currentvel >= target_vel) {
            tc_debug_print("Hit accel target in pos sync\n");
            // move target so as to drive pos_error to 0 next cycle
            tp->spindle.offset = tp->spindle.revs - tc->progress / tc->uu_per_rev;
            tc->sync_accel = 0;
            tc->target_vel = target_vel;
        } else {
            tc_debug_print("accelerating in pos_sync\n");
            // beginning of move and we are behind: accel as fast as we can
            tc->target_vel = tc->maxvel;
        }
    } else {
        // we have synced the beginning of the move as best we can -
        // track position (minimize pos_error).
        tc_debug_print("tracking in pos_sync\n");
        double errorvel;
        spindle_vel = (tp->spindle.revs - oldrevs) / tp->cycleTime;
        target_vel = spindle_vel * tc->uu_per_rev;
        errorvel = pmSqrt(fabs(pos_error) * tcGetTangentialMaxAccel(tc));
        if(pos_error<0) {
            errorvel *= -1.0;
        }
        tc->target_vel = target_vel + errorvel;
    }

    //Finally, clip requested velocity at zero
    if (tc->target_vel < 0.0) {
        tc->target_vel = 0.0;
    }

    if (nexttc && nexttc->synchronized) {
        //If the next move is synchronized too, then match it's
        //requested velocity to the current move
        nexttc->target_vel = tc->target_vel;
    }
}


Looks to me it just syncs velocity (units per minute) at first,
then yes uses spindle revolutions times units per rev feedrate to calculate the axis target position.
Am I right in thinking  tp->spindle_offset is used to account for the acceleration distance and that would be different for different speed spindles?
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
01 Jan 2025 02:04 - 01 Jan 2025 03:27
Replied by Cant do this anymore bye all on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Economically the RPi5 or RPi4 is not a great choice when compared to an ex corporate PC. The only advantage is a very small foot print and the ability to use a SPI interface board.
 
  • PCW
  • PCW's Avatar
01 Jan 2025 01:40
Replied by PCW on topic 7i96s not recognized

7i96s not recognized

Category: Basic Configuration

Yes, you are pinging yourself (I hear that may make you go blind)

I would set the host address to 10.10.10.100
 
  • ccatlett1984
  • ccatlett1984
01 Jan 2025 01:34
Replied by ccatlett1984 on topic Pi5 on MEASA 7C80 5V power source

Pi5 on MEASA 7C80 5V power source

Category: Driver Boards

Thanks for the info. I'll use the usb-c, as I have a touchscreen attached (has it's own 5v power) that I don't want to pull from the Pi and overdraw the MESA.
  • PCW
  • PCW's Avatar
01 Jan 2025 01:33
Replied by PCW on topic Pi5 on MEASA 7C80 5V power source

Pi5 on MEASA 7C80 5V power source

Category: Driver Boards

The safest way is to use the USB-C

That said, the 7C80 power supply does work with a RPI5
(I measured around 2.3 Amps when LinuxCNC was running)
  • slowpoke
  • slowpoke
01 Jan 2025 01:01
Replied by slowpoke on topic 7i96s not recognized

7i96s not recognized

Category: Basic Configuration

A couple notes:

1. The IP address in the hal file must match the Mesa card IP address

2. If you change the Mesa card's IP address jumper, you must cycle the card
power for the change to take effect

3. The host IP address cannot be the same as the Mesa cards IP address
but should be in the same 254 host subnet (only last digit different)
Also last digit cannot be 0 or 255.

4. You can determine you host IP setup with the command:
ip a

5. When LinucCNC is not running, you should be able to ping the card
for example:
ping 10.10.10.10

Beware: if you set the host address to say 10.10.10.10, you will get  responses
to the ping command from the host rather than the Mesa card

 

Okay some progress,
Both the wired connection and CX7076-R0.hal are set to 10.10.10.10 and ipv4 is manual
I can now ping 10.10.10.10 (that's new)
Linux still does not start, might be #3 above host subnet?
please see ip a result attached.
 
  • ccatlett1984
  • ccatlett1984
01 Jan 2025 00:57 - 01 Jan 2025 01:35
Pi5 on MEASA 7C80 5V power source was created by ccatlett1984

Pi5 on MEASA 7C80 5V power source

Category: Driver Boards

Thanks for the info. I'll use the usb-c, as I have a touchscreen attached (has it's own 5v power) that I don't want to pull from the Pi and overdraw the MESA.
  • TomAlborough
  • TomAlborough's Avatar
31 Dec 2024 23:41 - 31 Dec 2024 23:43
Replied by TomAlborough on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Hello cornholio,

Thank you for your response!

Have you read the entire thread ? I have browsed the beginning and the end of the thread. I noticed the need for both new and experienced users to ask for and get high-level support from this thread. My observation is that over time, it would be good for the need for high-level support to go down rather than stay the same or go up.

I have seen situations like this and I have seen a group of people improve the situation. I would be happy to talk more about it.


Have you downloaded and written the LinuxCNC image to an SD card ? I have done the exact same thing with a variety of mass storage devices and operating system images.


What hardware are you wanting to use ? I haven't gotten to with that yet. My observation is that (ChatGPT) is warning people away because the Pi 5 / LinuxCNC combination has issues.


What is your end goal ? I would like to buy (a Pi 5) and some popular controller and stepper motor hardware and load LinuxCNC with as much as much of a chance of success as loading and running an application on my cell phone.

(-- Out for the evening...)

Thanks,
Tom Alborough
  • PCW
  • PCW's Avatar
31 Dec 2024 22:58
Replied by PCW on topic Wiring Pendant to MESA 7C80

Wiring Pendant to MESA 7C80

Category: Milling Machines

OK for 5V signals that should all work
On the differential MPG signals. I would just ignore the - pins

Note that inputs 0..7 are the MPG pins
  • PCW
  • PCW's Avatar
31 Dec 2024 22:34 - 31 Dec 2024 22:43
Replied by PCW on topic 7i96s not recognized

7i96s not recognized

Category: Basic Configuration

A couple notes:

1. The IP address in the hal file must match the Mesa card IP address

2. If you change the Mesa card's IP address jumper, you must cycle the card
power for the change to take effect

3. The host IP address cannot be the same as the Mesa cards IP address
but should be in the same 254 host subnet (only last digit different)
Also last digit cannot be 0 or 255.

4. You can determine you host IP setup with the command:
ip a

5. When LinucCNC is not running, you should be able to ping the card
for example:
ping 10.10.10.10

Beware: if you set the host address to say 10.10.10.10, you will get  responses
to the ping command from the host rather than the Mesa card



 
  • slowpoke
  • slowpoke
31 Dec 2024 22:23
Replied by slowpoke on topic 7i96s not recognized

7i96s not recognized

Category: Basic Configuration

Set the IP address in the hal file to 10.10.10.10
(and make sure the 7I96S is set for 10.10.10.10)
 

I tried that, same result.

I'm pretty clueless when it comes to LAN ports etc. I verified my CAT cable is okay (tried it on a working LinuxCNC machine)

The new Linux machine is using a docking station for the ETHERNET port, I would like to rule that out that as a problem. Are there some commands I can execute on the command line to verify that the ETHERNET port is actually visible to Linux?

I also have a Windows based laptop with an Ethernet port that I could connect with a CAT cable and see if the two can see each other?
I also have another working LinuxCNC machine with an Ethernet port that I could connect with a CAT cable and see if the two can see each other?

I'm looking for a way to confirm that ETHERNET port on the docking station is actually working.

Any help would be appreciated.

 
Displaying 21061 - 21075 out of 21690 results.
Time to create page: 0.391 seconds
Powered by Kunena Forum