As there are two carriages on the same linear rail that form the Z-axis (Z1 and Z2), I'm trying to figure out the best way the logic could be programmed. Can LinuxCNC handle multiple things on the same axis?
The logic could be handled elsewhere, but would like it configurable in LinuxCNC. Pictures of the axis attached..
The Z axis is straight forward (LinuxCNC doesn't even need to know they're on the same axis), but there's got to be some kind of dynamic collision detection. So, Z2's min limit is always Z1's position, and Z1's max limit is Z2's position etc. I'm not sure if I should do this separately, so that Z = Z1's position, Zd = the distance between Z1 and Z2 or Z = the centre and Zd is the deviation between Z1 and Z2... Or if both should start from the origin, but there's some kind of relationship where their limits are dynamic...
In reality, theres something physical or in code that stops the axis from hitting each other when they're moving to the next position, plus there's some logic in the routine programming that stops an operator from moving Z1 and Z2 into each other's space fora position. It's not like I'm running a 3D printer with two separate heads on gantries, and that I have to sequence their operation dynamically without collision!
Basically, I see in hardware, that one end of Z has Z1's min limit, the other end has Z2's max limit and a switch on either carriage is assigned as both Z1's max limit and Z2's min limit. If both carriages touch during operation, they both stop as they've reached their limits! That deals with programmes with errors in them, or me entering crazy values in the UI. Next, the software UI says "NO" if you enter a position for Z1 or Z2 that overlap their space. In terms of homing them, I would look at using the Z1 min limit, and then getting Z2 to touch against Z1... or maybe that's super dumb, and I should send them to either end of Z...
The X axis is apparently complex, but actually straight forward, in that there's an average position (the main gantry maintains) and then the two sub-axis X1 and X2 deviate either positively or negatively. When both X1/X2 deviate the same, the they should be in their neutral position and the whole X axis moves to that point. If X1/X2 are say 100mm apart starting from origin, then X should be +50mm and X1/X2 should be +50mm and -50mm from X respectively. This scaling between X1/X2 and X is quite straight forward - X is a byproduct of X1 and X2 positions, even if I entered X in the user interface, it would just be a lazy way of entering X1 and X2 to be the same position. The real complexity comes from creating angles, by offsetting X1 or X2 so the material in the press brake can be angled, but that's just math, and that's what computers are for
I also need to figure out if the X1 and X2 origin is the X origin or they have their own. At this stage I don't think I need or can achieve the deviation between X1 and X2 to be the max length of X. It should only allow a certain deviation to be entered (so, I can enter X1 = 100mm from origin and X2 = 500mm from origin, giving a deviation of 400mm, placing X at 300mm, X1 at -200mm from X and X2 at +200mm from X) - X1 and X2 can be a maximum of their deviation apart, but the scaling can be between say 0 and 800mm (or however long X is).
Before I plow money into extra MESA cards etc, I might mock this up using an Arduino Mega with a RepRap board and a couple of NEMA 17 steppers and 3D printed bits.
Is LinuxCNC a proper motion control platform (ie can be used against anything), or is it really geared towards CNC machines? Am I using the right or wrong tool here for the motion control?
J