Pressbrake CNC Control Setup Questions

More
09 May 2021 15:41 #208387 by andypugh

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 or Create an account to join the conversation.

More
09 May 2021 22:53 #208433 by andypugh
This is quite a major re-working, including renaming several of the components to be a little more consistent.

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.
Attachments:
The following user(s) said Thank You: tommylight, Clive S, EW_CNC

Please Log in or Create an account to join the conversation.

More
20 May 2021 21:41 #209699 by EW_CNC
I got the machine jogging and bending with the latest setup. I can jog both ram and backstop, works good!
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.

File Attachment:

File Name: bender.hal
File Size:6 KB

This browser does not support PDFs. Please download the PDF to view it: Download PDF

Attachments:

Please Log in or Create an account to join the conversation.

More
20 May 2021 22:20 #209701 by andypugh

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 or Create an account to join the conversation.

More
21 May 2021 00:36 #209708 by EW_CNC

There is a HAL pin (home-dir I think) that switches the homing direction.

I'm not seeing a home-dir pin. Is this the pin?
pin in bit axis.#.home-switch[4] = 1 "Should reset to zero fractionally past the index";
I believe I was putting a - before the home search velocity to switch direction.

Please Log in or Create an account to join the conversation.

More
21 May 2021 08:22 #209742 by andypugh
Sorry, yes that's the pin. I kept changing my mind about what to call it.

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.
The following user(s) said Thank You: EW_CNC

Please Log in or Create an account to join the conversation.

More
02 Jun 2021 13:02 #210994 by EW_CNC
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. Should I be reversing the A & B channel wires on the encoder to reverse count direction rather than giving the scale a negative?

Please Log in or Create an account to join the conversation.

More
02 Jun 2021 13:34 #210996 by PCW
Yes, swapping A,B encoder signals will reverse the encoder direction
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 or Create an account to join the conversation.

More
02 Jun 2021 17:13 #211006 by andypugh

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 or Create an account to join the conversation.

More
03 Jun 2021 01:05 #211046 by EW_CNC
Yes! I got Axis0 the Brake Ram working!
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
offset(axis) = axis_pos_fb_in(axis) - axis_home_offset(axis);
Recompiled it and it worked! Maybe it'll help me develop some troubleshooting skills! Next step is getting the backstop homing worked out.

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.167 seconds
Powered by Kunena Forum