Hello Guest it is September 30, 2023, 02:45:20 AM

Author Topic: Changing Ports and Pins during a job  (Read 4343 times)

0 Members and 1 Guest are viewing this topic.

Changing Ports and Pins during a job
« on: May 25, 2007, 12:07:27 PM »
I have a machine that has 8 axis. 
I can use two LPT cards - which gives me enough I/O for 8 axis, but Mach only has 6 axis at a time.
I want to be able to switch the port or pin number given axis during a job, thus changing the physical axis being controlled.
Is this possible? (or do I need to do it at the electronics level)?

Offline Graham Waterworth

  • *
  •  2,622 2,622
  • Yorkshire Dales, England
    • View Profile
Re: Changing Ports and Pins during a job
« Reply #1 on: May 26, 2007, 02:30:16 AM »
You would have to use a relay on the wires and switch it with an output.

Without engineers the world stops

Offline Chaoticone

  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Changing Ports and Pins during a job
« Reply #2 on: May 26, 2007, 09:19:40 AM »
I don't know how you could do this in Mach as any pin changes would create a reconfig estop. You could do it as Graham said with a relay or a dpdt switch. The normally open contacts would go to one of the axis step and direction and the normally closed would go to the other axis step and direction. The only problem with it is that Mach will not know whic axis it is driving or it's position. Some of the vb code gurus might be able to get very creative with some code for this, I'm not sure. The code would turn on or off an output that would change the state of the relay and zero the shared dro maybe. This would be a nightmare to generate Gcode for as well I would think. I think all things are possible tough. I'd like to see a drawing or pic of the machine it would be for and a description of what it will do.

Thinking out loud  ;D

;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline poppabear

  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Changing Ports and Pins during a job
« Reply #3 on: June 01, 2007, 12:10:51 AM »
If the 7th and 8th axis you want to run are not neccessary "Machining axis", i.e. like servos that run an ATC, you could run them independantly off of a PLC using a HS module/servo or stepper.... And Mach can send/recieve control bits to and from your PLC program that actually handles those motions, you could even drop "Dynamic" values into the motion registers of your module, just remember that your PLC will only update at the speed of the Modbus/Mach 10hrts, so if you need tighter time control than that, then no solution there.
But if the 7th and 8th would need to run in sync with your other 6 axis and (7 and 8) are also part of the Machining tool control process then you are out of luck.

Your gonna get in trouble by switching out axis onto the other 7 and 8, from like 5 and 6, since you motor tuning will only be acurate for the 5th and 6th axis, and wont be accurate for your 7th and 8th, and you wont be able to change your tuning on the fly............

fun times