Advanced Search

Search Results (Searched for: )

  • langdons
  • langdons's Avatar
Yesterday 19:45
Replied by langdons on topic Pathpilot Reset Functionality

Pathpilot Reset Functionality

Category: PathPilot

I also strongly recommend you put the entire method in a try/catch and have different error types return different HTTP error codes and the error message.

Not a Python expert, but this is an idea:
def ss_reset_route(self):
    try:
        # method code here
    except Exception as e:
        return Server_Response_Factory.create_server_response(500, "Could not reset mill.\n"+e)
    else:
        return Server_Response_Factory.create_server_response(200, "Mill successfully reset")

Reference Java code: github.com/pacman-admin/Repeat/blob/mast...mmon/HTTPLogger.java
  • conman
  • conman
Yesterday 19:35

Help with Inovance IS620N Servo Drive - Stays in PREOP

Category: EtherCAT

I installed the r8125-dkms as my adapter was RTL8125
 Still no luck but the output for dmesg has changed slightly

cnc@debian:~$ sudo dmesg | tail -n20
[sudo] password for cnc: 
[ 1652.489972] EtherCAT: Requesting master 0...
[ 1652.489974] EtherCAT: Successfully requested master 0.
[ 1652.490017] EtherCAT 0: Domain0: Logical address 0x00000000, 26 byte, expected working counter 3.
[ 1652.490018] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 26 byte, type LRW.
[ 1652.490026] EtherCAT 0: Master thread exited.
[ 1652.490027] EtherCAT 0: Starting EtherCAT-OP thread.
[ 1652.582304] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 1652.583304] EtherCAT ERROR 0-0: AL status message 0x001E: "Invalid input configuration".
[ 1652.585313] EtherCAT 0-0: Acknowledged state PREOP.
[ 1688.768322] EtherCAT 0: Master thread exited.
[ 1688.768327] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 1688.768363] EtherCAT 0: Releasing master...
[ 1688.768365] EtherCAT 0: Released.
[ 1780.862489] lcec_conf[99761]: segfault at 2000000004 ip 00007f60bddcf07e sp 00007fff57a4c8b8 error 4 in libc.so.6[7f60bdc8e000+156000] likely on CPU 8 (core 10, socket 0)
[ 1780.862496] Code: 1f 84 00 00 00 00 00 0f 1f 44 00 00 89 f8 09 f0 c1 e0 14 3d 00 00 00 f8 0f 87 2e 03 00 00 62 e1 fe 28 6f 0f 62 b2 75 20 26 d1 <62> f3 75 22 3f 0e 00 c5 fb 93 c9 ff c1 74 53 0f 1f 00 f3 0f bc c9
[ 2094.078796] logitech-hidpp-device 0003:046D:4023.0006: hidpp20_batterylevel_get_battery_capacity: received protocol error 0x08
[ 4407.075631] EtherCAT 0: Master thread exited.
[ 4407.075653] EtherCAT 0: Releasing main device 34:5A:60:CB:87:79.
[ 4407.112827] ec_generic: Unloading.
[ 4407.182494] EtherCAT: Master module cleaned up.

What else can I try now?
Also, I got this device description file for my drive from the manufacturer. What do I do with this?

 

File Attachment:

File Name: IS620N-Eca....6.8.xml
File Size:441 KB
  • Sandro
  • Sandro
Yesterday 19:20
Replied by Sandro on topic MonoKrom - QtPyVCP GUI for PlasmaC and Mill

MonoKrom - QtPyVCP GUI for PlasmaC and Mill

Category: QtPyVCP

Thank you Joco!

This works and I'm able to control my plasmacutter. I really like the interface.

I'm now only facing an issue loading g-code. I'm using the plasmac post processor for Sheetcam which outputs .tap files. When I load a file, I get the message “unknown word where unary operation could be”. I just assume, it has something to do with the filte section in my INI-File.
[FILTER]
PROGRAM_EXTENSION       = .ngc,.nc,.tap GCode File (*.ngc, *.nc, *.tap)
ngc                     = plasma_gcode_preprocessor
nc                      = plasma_gcode_preprocessor
tap                     = plasma_gcode_preprocessor

Is it possible, that the preprocessor cannot interpret my .tap. file?
  • skunkworks
  • skunkworks
Yesterday 19:03
  • langdons
  • langdons's Avatar
Yesterday 18:45 - Yesterday 18:55
Replied by langdons on topic Pathpilot Reset Functionality

Pathpilot Reset Functionality

Category: PathPilot

This method checks every limit switch and adds a corresponding value if it is tripped.
I really recommend you make useful little methods like this one instead of jamming everything into one method in one file.

If no limits are active, it returns 0, if all limits are tripped, it returns 2^1-1.
# Returns the status of all limit switches passed to it in binary
# A return value of 4 (0100 in binary) means there are 3 limit switches and the first one is tripped.
# A return value of 1 (0001 in binary) means the last limit switch (Z in your case) is tripped.
def getLimitState(int limitData):
    int output = 0
    for limit in limitData:
        output <<= 1
        output |= limit
    return output

I recommend you make a separate .py file for little methods like this and import it so the main file is empty and easy to read/understand/debug.
  • snowgoer540
  • snowgoer540's Avatar
Yesterday 18:41
Replied by snowgoer540 on topic Pathpilot Reset Functionality

Pathpilot Reset Functionality

Category: PathPilot

What version of PathPilot are you running?  

You said you added logging, what did you do exactly?  Where was it crashing?  I assume you running PathPilot in a way that allows you to see the terminal, so you could wrap the offending areas in a try/except and print the exception to the screen when it fails.  

I would not mess with refactoring Tormach's code, that otherwise works.
  • langdons
  • langdons's Avatar
Yesterday 18:24 - Yesterday 18:27
Replied by langdons on topic Pathpilot Reset Functionality

Pathpilot Reset Functionality

Category: PathPilot

You need to write some helper methods so this code makes more sense.

The "one huge method" approach does not work well, especially in Python.

Make sure the method can never have more than con simultaneous execution.

Have a variable that causes the method to immediately return if it is already running.
  • MusicCityMfg
  • MusicCityMfg's Avatar
Yesterday 18:04 - Yesterday 18:05
Replied by MusicCityMfg on topic Lathe project needs a turret

Lathe project needs a turret

Category: Turning

@CaliusOptimus, check out the ALTAROS Automatic Turret Head:
www.altaros.cz/content/53-automatic-turret-head

CNC4XR7 on YouTube installed one and has a few videos on it.

  • kwanlokto
  • kwanlokto
Yesterday 17:59
Replied by kwanlokto on topic Pathpilot Reset Functionality

Pathpilot Reset Functionality

Category: PathPilot

Thanks for the reply!

Yes, it's inside the mill(TormachUIBase) class. The indentation got messed up when I copied it over, but I can assure you it's correct in the actual code because the function does work 'sometimes'.

The suggestion to keep the code concise is a good idea, but I'm hesitant to trim it down too much as this mirrors the PathPilot reset code. The last thing I'd want is to initialize one of the HAL pins correctly and that would cause even more issues. I'm really not experienced in the CNCs and have been only tinkering on and on off for about 3 years.
  • bentiggin
  • bentiggin
Yesterday 17:52
Replied by bentiggin on topic Hypertherm hsd130 interface

Hypertherm hsd130 interface

Category: Plasma & Laser

I tried a few cuts at 20 amps and got arc ok, but couldn't get any at 10 amps, which is fine, can't imagine needing 10 amps.
I did a fair bit of cutting at 45 amps and I did lose the arc ok signal in the middle of a cut. It was artsy text so I assume the feed was lowered automatically like it does for small holes. It only happened once, so it may be a fluke.

I have plasmac.arc-lost-delay set to .1. Should I try increasing that or is there a better solution?

I sure hope this hypertherms amp setting is more accurate than your china one, since I have no way of measuring actual amps.
  • MusicCityMfg
  • MusicCityMfg's Avatar
Yesterday 17:17 - Yesterday 17:18

Mesa 7i96S Daughter Card Question ... Can I use the 7i76U?

Category: Driver Boards

Thanks for your responses! I ordered the 7i96S and the 7i84U.

Probably overkill in terms of the amount of I/O, but now I can go hog wild with panel buttons (just kidding).

Now onto picking components for the CNC lathe conversion!
  • MaHa
  • MaHa
Yesterday 17:01
Replied by MaHa on topic FlexGui - View setting error

FlexGui - View setting error

Category: Other User Interfaces

The view setting is not really necessary, as somehow machine zero is centered at startup. So i removed the ini entry. After loading gcode, the desired view can be selected, and then its centered in the preview. So i solved this by finding my workflow

 
  • langdons
  • langdons's Avatar
Yesterday 16:38 - Yesterday 16:40
Replied by langdons on topic FlexGui - View setting error

FlexGui - View setting error

Category: Other User Interfaces

Wow, nobody has replied after a month!

Is this issue still valid?

Did you fix it?
  • langdons
  • langdons's Avatar
Yesterday 16:29
Replied by langdons on topic How do I program an 8 figure oil groove?

How do I program an 8 figure oil groove?

Category: General LinuxCNC Questions

Huh?

Picture?

Which 8 shape figure?
  • langdons
  • langdons's Avatar
Yesterday 16:28 - Yesterday 18:18
Replied by langdons on topic Pathpilot Reset Functionality

Pathpilot Reset Functionality

Category: PathPilot

Perhaps the indentation is wrong?

Your code has a lot of errors and is not nearly as streamlined as it could be, though I have not worked with Python for about 2 years.

Bugs hide within overly long code.

Short, efficient code is much easier to debug.

Try to use methods to guarantee unifority of funtionality across the program!

Don't return a 400 "Bad Request" error if the limit switch is active.

Use 500 or 503 or something.

developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status
Displaying 16 - 30 out of 22545 results.
Time to create page: 1.162 seconds
Powered by Kunena Forum