- Posts: 19306
- Thank you received: 0
Pressbrake CNC Control Setup Questions
flamecutter wrote: Do you have a config ready for me to test on the actual machine?
I am hoping to get back to it this evening.
Please Log in to join the conversation.
You will need to expand the .zip file, then sudo halcompile --install press.comp and sim_scale.comp
sim_scale is an attempt to simulate a linear scale with a central index, to make it possble for me to work on the homing code.
A number of things are a nit messed-up, specifically the target pos display and the 3D model position after homing.
I have not yet figured out if that is a problem with the _simulation_ or accuratley reflects a problem that would be seen with hardware. I think I need to sit down with a pencil and draw the components and signals to see which need home offsets adding, and which subtracting.
The system can now be configured for up to 4 axes, by editing the (new) ini file.
Please Log in to join the conversation.
I'm still trying to get a grip on the homing procedure. I attached my hal file so you can look over it. Also a drawing of the axis index and home switch positions.
The backstop has its homing (limit?) switch approx. 10mm from the back of travel. Should I move it forward some or add another switch? Although with halscope it appeared like I got an index pulse right after moving backward past the home switch. Should it be setting home position at the first index past the home switch?
The ram seems to home ok if I'm below the index location, but the position needs to show positive.
The ram has linear encoder with one index pulse, and backstop has rotary with index pulse approx. every 20mm.
Attachment not found
Attachment not found
Please Log in to join the conversation.
flamecutter wrote: The ram seems to home ok if I'm below the index location, but the position needs to show positive.
The idea there is to have a sensor and some sort of target to tell the system which way to go to find the index.
There is a HAL pin (home-dir I think) that switches the homing direction. Basically the system needs to know whether to move up or down to find the index.
The same is true on the backstop, but I guess the direction target can be shorter there. (actually, if there are repeated indices, it might need some reworking of the HAL component)
Please Log in to join the conversation.
I'm not seeing a home-dir pin. Is this the pin?There is a HAL pin (home-dir I think) that switches the homing direction.
Please Log in to join the conversation.
The idea if that pin is that it changes the homing direction depending on ram position, it should be connected to a sensor which detects some sort of target so that it is on above the index and off below it.
Please Log in to join the conversation.
Please Log in to join the conversation.
Beware that this will also change the feedback from negative to positive=runaway
so you need to change the sign of the output scale at the same time
Please Log in to join the conversation.
flamecutter wrote: I have the homing working on the brake ram, but I end up with negative position readout. It is because I have encoder scale with a negative so that it counts up as it lowers?
I am working away from home for the next couple of days, but will take a look when I get back. I think down=negative might be baked-in to the code, so let me check.
Is down=positive usual for a press brake?
Please Log in to join the conversation.
I kept struggling with the negative position reading, the zero point was below the index. I finally decided it must be applying the home offset wrong. I ventured to change the press component, and subtract the axis_home_offset from the axis_pos_fb_in instead it being added. Line 175
Please Log in to join the conversation.
