Machsupport Forum

Third party software and hardware support forums. => Modbus => Topic started by: TT350 on July 17, 2008, 08:59:55 AM

Title: Can A Modbus control a.........
Post by: TT350 on July 17, 2008, 08:59:55 AM
Good morning guys.

Can A Modbus control a stepper driver and still
take on 30 I/O’s ?

I was looking at Automation Direct Modbus’
and there’s a lot to choose from do you guys
have a model that you prefer?     
Title: Re: Can A Modbus control a.........
Post by: Chaoticone on July 17, 2008, 09:54:48 PM
TT350, you can control step and direction as well as 30 I/o thru Mach but don't think you want to control the stepper driver thru modus. If you can, tell us more about your setup, how it will be used, ect.

Brett
Title: Re: Can A Modbus control a.........
Post by: Peter Homann on July 18, 2008, 01:04:19 AM
Hi,

 The answer is yes and no....

Some PLCs have Stepper motor controllers in them. They usually have a trajectory planner in them, so you set it up to do so many steps or move this distance. The PLC then issues steps including the necessary acceleration and de-acceleration ramping profile.  This feature is useful for controlling tool changer steppers etc.

As to controlling motion axis steppers for Mah3 axis, no you cannot use a PLC, as Mach generates the timing pulses itself. It does not have the capability to control a stepper motor via a PLC. To have mach3 control a stepper via an external device you would need to use a Smooth Stepper or similar motion control device, as these synchronise the movement across all axes.

Cheers,

Peter.
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 18, 2008, 05:17:12 PM
I'm building and ATC for my mill.
My brake out board will do 4 axes and i'm useing them.
I need to control a stepper for the ATC.
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 19, 2008, 02:38:04 PM
What would you guys use?
Title: Re: Can A Modbus control a.........
Post by: Hood on July 20, 2008, 05:55:03 AM
Get a second parallel port and a breakout or get a SmoothStepper and a breakout. With either you could choose not to use a breakout but..... well there are arguements for and against.
Hood
Title: Re: Can A Modbus control a.........
Post by: Perfo on July 20, 2008, 11:07:45 AM
It's an easy job and fairly cheap to stick another parallel port in. If you are happy with the performance of your four axis already then this would probably be the simplest way forward.
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 20, 2008, 11:10:02 AM
If I use a smooth stepper and a brakeout board do I still use a PLC?
I'm going to use switches to confirm movements and tell Mach and or a PLC or what ever
you guys suggest to command the next move.
Title: Re: Can A Modbus control a.........
Post by: Hood on July 20, 2008, 12:46:29 PM
Depends how may Inputs/Outputs you would need, if its more than a second port would give you then yes you would need something like the ModIO or a PLC or........

Hood
Title: Re: Can A Modbus control a.........
Post by: poppabear on July 20, 2008, 10:17:47 PM
Not in the way you think.............  I run Two Servos, from an ADC DL06 and the modbus controls them, but they are not integrated with Machs motion planner at all. I use them to run an ATC. You can send movement values to a register in a CTRIO module (one CTRIO module will control ONE Stepper or Servo that the drive will take Step and direction.  The down side is you will have to track absolute since the CTRIO only does incremental.

I use mine for my Read-a-head swap-arm ATC, This gets tool changes down to about 2-3 seconds, also buy having intellegent IO like a PLC, you can move all your M6 processes to it and it will handle the tool change. I.e. you send out a tool change command, and what tool, the PLC does the rest, once the initial tool is changed, It sends an Im done to mach, mach will continue machining, meanwhile the PLC rotates to the next tool and gets it independant of mach.

You cant do that if you use one of your motion axis for your ATC since Mach will tie up until that axis is done.

Unless, high end top speed ATC is a absoulte priority for you, it is much, much, much easier just to run the ATC as an Axis, and do a traditional simple rotary axis.

Scott

Title: Re: Can A Modbus control a.........
Post by: TT350 on July 21, 2008, 08:49:32 AM
So what your are saying is to use a PLC to take a tool change command from Mach, make the change and use a multi contact double poll double throw relay to take the motor outputs for a axis and use them for the tool changer and when the change is complete the relay would go back to controlling the axis?   

 
Title: Re: Can A Modbus control a.........
Post by: poppabear on July 21, 2008, 01:31:02 PM
no, I am saying that the PLC itself runs 2 servo/stepper drives, and servos independantly of Mach. It does NOT use an axis from Mach at all.

scott
Title: Re: Can A Modbus control a.........
Post by: Perfo on July 21, 2008, 02:40:21 PM
I may be completely wrong but I think poppa was offering an alternative in that Mach with a two parallel ports (or smoothstepper) can handle five or six axis's (if that's the right word) and thus if you don't need six axis on your machine and you are not worried about a fast tool change then you can set up mach to use one of the unused axis to control your ATC. The PLC option can do this an a lot more but comes with a price of being a lot more complex.

Ps Please forget me if I'm wrong. :)
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 21, 2008, 03:58:47 PM
poppabear:

Mach would go to a preset Z and send the PLC a signal to start the tool change and after the tool change is compleat
the PLC would tell Mach to start again?

If this is the case the bulk of the programming would be done in the PLC right?
Title: Re: Can A Modbus control a.........
Post by: Chaoticone on July 21, 2008, 05:45:53 PM
Poppa can confirm but yup, that is correct.

Brett
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 21, 2008, 06:50:23 PM
Automation direct looks like the source for the PLC do you recommend a part#?
Title: Re: Can A Modbus control a.........
Post by: Chaoticone on July 21, 2008, 09:20:56 PM
Well, it all depends on your set up. I think lots have used the D0-06DR. It is 16 dc ins and 20 relay outs. Uses AC supply power and has a tiny 24V dc power supply built in. You're the only one who knows for sure what you need though. Lots of options.  :)

Brett 
Title: Re: Can A Modbus control a.........
Post by: poppabear on July 22, 2008, 02:06:47 PM
Yea, you can do the model of DL06 that Brett said, its advantage is on the output side is since it is relays, you dont have to worry about sinking/sourcing concepts.

your gonna drop some cash, the PLC is (with relay outs), about 220.00, if your doing a standard rotary axis then +1 CTRIO module (200.00), if your doing rotary PLUS a swap arm (you have a choice, of servo control or motor control with Encouder reads vs prox positioning), if you run another servo/stepper then you will need another CTRIO module 200.00. also you will have the cost of a 24v power supply, a Power supply for what ever drives you choose, and cost of motor types........

You can QUIVKLY get into the 1,500.00 dollar price range for a 2 servo, swap arm read a head ATC. 

If your doing just straight rotary, then your probably looking at about 1000.00 bucks, and that is JUST for the main electrical/electronic components. Not including cost of supplies, Enclosure, mechanical components, design time, debugging, programming..............etc.

scott
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 22, 2008, 06:17:37 PM
Yea Ive been looking at the prices and it's not cheap.
On top of all that the Automation direct tech guy tells me that the software to
program the PLC is about $400.00.

So this is not going to be cheap but it will pay for it's self in about 2 mouths.
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 26, 2008, 09:54:19 PM
I’ve been looking at my options do get this done
and there’s more than one way to skin this cat.

So what I’ve been thinking was since my breakout board
is full “running 4 axis” can I use a smooth stepper to index my ATC and let a simpler more basic PLC handle the other stuff?

I’ve done a little reading about smooth stepper boards
and It seams to me that they are just a USB brake out board, am I right?

If this I’m right can Mach run a smooth stepper or some other device to control a axis via USB with the printer port being tied up doing other axis work?   

You veterans please be payshint with me.
I read and read and read and search the forums
every night and it is making more and more since
every day but there is so much to take in.
Title: Re: Can A Modbus control a.........
Post by: Chaoticone on July 26, 2008, 10:50:33 PM
The SS isn't a breakout board, it is the replacement of 2 parallel ports that can pulse much faster than parallel ports. You may still want to use a breakout board for opto isolation. You could use the SS plus a mod device or the G100 with the IO only plug-in. The g100 would be able to handel a good bit of additional I/O. Probably enough for for a pretty simple tool changer and if you can't find a G100 cheap, I'll sell you one. I wouldn't use the G100 for motion control but if it can handel all of the extra I/O you need, may be a cheap alternative to a PLC.. The SS is far superior to it as far as motion control. The disadvantge of haveing the SS control the tool axis is you will loose time on tool changes.

Hope this helps a little.
Brett
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 26, 2008, 11:08:29 PM
I'm not made of money but I don't mind spending it if needed.

So what would be the simplest way to index the changer using a stepper.
Remember I have a running machine that has the current BB full.

I would like this to be an add-on.
Title: Re: Can A Modbus control a.........
Post by: poppabear on July 27, 2008, 12:25:10 AM
Ok you need to be specific tell use what your I/O requirements will be, the type of ATC i.e. standard rotary, hot swap, hot swap-swap arm. The standard rotary is the cheapest to do. What is the Sequence of events for the ATC? What type of error checking Proxes to varify things have moved, not in the way, etc........

Once you know Your I/O that does your movements, and error checking, sequence of events, Electromotion type i.e. steppers/servos, how many?

Also, if speed is NOT an issue, then standard rotary is fine, and you can use one of your unused axis.

if ATC change time is a REAL issue then you will need to move everything off board onto a PLC.

I use Air cyclinders/solinoids for my ATC arm, (and swap arm) motion, and 1 or 2 servos depending on type of ATC.  You can get STUPID fancey with this stuff, but as the complexity rises, so does your cost, headaches, cussing, hair pulling, and DEBUG Time!!!!!!!  I use the CTRIO modules from ADC to run my accessory servos independant of mach, but, I will tell you that those modules are a pain in the butt to learn, they are POORLY documented on how to use them for pulse train sources.

scott
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 29, 2008, 08:22:45 AM
This it is how the changer will work.

The changer will have 3 axis.

1: The Z will go to a preset and mach
will send a signal to start the change.

2: The TC will slide on a rail and engage the tool.
It will leave a switch to let the PLC know that it is not there and when it engages the tool contact a switch
letting the PLC know where it is.

3: It will activate the draw bar, the bare will leave a switch and contact and switch to let the PLC know
where it is.

4: The TC will then drop down leaving a switch and
contacting and switch to let PLC know where it is and send Mach a signal to index the changer “x # of deg’s”Mach sends a signal back to the PLC to reverses the proseager and tells Mach when it has returned home. 

5: The PLC tells Mach the coast is clear and cycle start.     
Title: Re: Can A Modbus control a.........
Post by: Hood on July 29, 2008, 09:09:57 AM
That could all be done in VB and with probably a parallel port (depends on amount of I/O)  or you could also use a PoKeys to get the I/O required.
 Personally I would use a PLC to do the linear movements (slides with air or hydraulic) and monitor the switches etc then use an axis to do the rotating. VB would be less than the first as most of the routine would be handled by the PLC.
 Scotts way of controlling things totally from PLC is good but as he said it starts to get expensive when controlling motors accurately from a PLC.
In the future I am planning making a toolchanger for the mill I am working on, I have a servo drive/motor which will be used for the rotation. The drive I have has indexing (64 positions possible I think) so it it will handle the rotaion and it also handles which direction to go for shortest rotation to the next tool so matters are even more simplified for me :)

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 29, 2008, 09:22:05 AM
What are PoKeys?
Title: Re: Can A Modbus control a.........
Post by: Hood on July 29, 2008, 09:32:30 AM
http://po.labs.googlepages.com/pokeys
 Art hasnt got the analogue inputs/output done in the plugin but the digital I/O seems to work fine in the testing I have done, see here as well http://www.machsupport.com/forum/index.php/topic,6920.msg48987.html#msg48987


Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 29, 2008, 01:29:00 PM
I would like for Mach to keep up with the TC indexing on it's own DRO.
That's why I ask if Mach could run another axis outside of the printer port.

If the PLC controlled the axis how would Mach know where it was?
Title: Re: Can A Modbus control a.........
Post by: Hood on July 29, 2008, 01:45:16 PM
Not sure really what you are asking but will try and answer.
 Your Gcode says to get another tool, you have a M6start.m1s macro which you put your VB code into, this tells whatever hardware you have to do its thing, once it is done and the new tool is in position it sends a signal to Mach to say the toolchange is complete and Mach continues with the code.
 As an example my lathe sends a signal to the PLC over Modbus, the PLC then starts its toolchange routine and continues with this routine until the correct tool is in position, the PLC then sends a signal to Mach to say its at tool * and Mach then carries on. There is no need for Mach to know where the changer is at any other point in the routine as all it cares about is the tool in position signal so that it can get on with its machining :)

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 29, 2008, 03:56:37 PM
I can see how that works.  It makes sense. 

If you are using a stepper, how do you zero tool #1?  If it were in a DRO in MACH, I could see how you could zero on your first tool and then every tool after that would be X amount of degrees. 
Title: Re: Can A Modbus control a.........
Post by: Hood on July 29, 2008, 04:33:10 PM
Basically the same, you would have a home switch and the PLC would know where the motor is.
I still think however the PLC controlling the motor is the expensive option and is it needed?

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 29, 2008, 05:38:45 PM
Are you using a home switch?
Do you have a DRO in Mach?
Title: Re: Can A Modbus control a.........
Post by: Hood on July 29, 2008, 05:47:49 PM
No and No
Reason is my rear turret and front toolpost (its a lathe) are both hydraulic so no motors. I suppose you could say there is a home switch in as much as there are switches to show that the toolpost is clamped and the rack has been pulled back. Also there are 3 switches on the toolpost and 4 on the turret to show which tool is in position depending on the sequence of these switches.
My VB in the M6 macro looks at the current tool DRO and the requested tool number in the G Code, if they are the same it does nothing and Mach is told to carry on. If the tool numbers are different then Mach sends a signal over modbus and the PLC starts the toolpost or turret indexing, when the correct sequence of switches show the chosen tool is in position the PLC stops indexing and sends a signal to Mach to say that the tool is in position and Mach continues with the Gcode.

Hood
Title: Re: Can A Modbus control a.........
Post by: Peter Homann on July 29, 2008, 08:15:59 PM
Hi,

 To show how a toolchanger can be controlled through a Modbus device,  below is some information about how I've implemented a changer module in the ModIO for an Emco changer.

Cheers,

Peter.

Code: [Select]
/*******************************************************************************

                                   Emco.c

********************************************************************************


/********************************************************************************
The ModIO will read the 2 optical switches and drive the Motor direction Relay.


The EMCO changer has 2 inputs, a turret home switch and a Turret position
switch. The home switch indicates that the turret is lined up with tool position
one locked. This switch will activate whenever the turret passes position 1.

The other switch the turret position switch input is the input from 6 turret
position switches in parallel. If any one of the 6 switches are activate then
this input will be active. Therefore, this input doesn't indicate what tool
position we are at, just that the "Next" tool position has been reached. There it
is necessary to keep track of where the changer is relative to the home
position (Tool 1)

The changer will work as follows;

On startup or after an error occurs we assume we are lost. When the first
toolchange request comes in, the changer will rotate until it sees the home
switch input go active. When it sees this it knows where it is, tool 1, and can
then move to the requested position.

There is also a timeout. If the home switch is not found within the configurable
timeout, an error is assumed to have occured, and the changer stops.

When a tool change is requested and the current position is known, the changer
rotates the turret counting the number of times the position input goes active
until the desired tool position is reached.

There are also 6 outputs used as position indicators, plus a status indicator
output. The position indicators will illuminate when the turret is at the
indicators position. That is, indicator 2 will illuminate when tool position 2
is reached.

The status indicator will illuminate whenever the tool changer is activated.
It will extinguish when the change operation has completed. If an error has
occured and the change is aborted, the indicator will flash until the next
valid operation has completed.

Once the desired position is reached, the motor forward relay is de-energised
and the motor reverses, locking the turret into the desired position.

Note, the position switches on the turret are positioned to be activated once
the turret has passed the tool location. The reversing of the motor rotates the
turret back to lock into the tool position.

There is also a manual change input switch. When activated, the turret will jog
to the next tool position. 


Modbus Interface
================

The Emco changer interfaces by a number of Modbus registers as defined below. A
number of the registers are configuration registers and are used to initially
configure the changer. There are also a set of registers that are then used to
control the changer during normal operation.

Config registers
----------------
register 150 Turret Config

This config register is used to enable the EMCO toolchanger module. To turn ON
the module, bit 1 needs to be cleared. Therefore 0x00FD should be written to
register 150 to enable the changer.


register 151 Change Delay timeout HI BYTE
register 152 Change Delay timeout LO BYTE

These 2 registers make a 16 bit timeout which if it expires will abort the change
and error. If you set the time out registers 151 and 152 to 0x10 and 00x0, you
will get a time out of approximately 30 seconds. each bit in the hi register 151
is worth about 2 seconds. With the default value of 0xFF and 0xFF the timeout
is over 500 seconds


register 153 Reverse Delay timeout  HI BYTE
register 154 Reverse Delay timeout LO BYTE

These 2 registers define the time delay between between turning off the forward
relay and indicating that the toolchange has completed. This delay is to allow
the changer enough time to lock the turret. With the default value of 0xFF and
0xFF the timeout is turned off.


Output Registeres
-----------------
register 1100 Requested Tool

This register contains the tool position for the next tool change. If this
register contains 0 when the tool change is requezsted, a dummy tool change
occurs. This is a good way to synchronise the Tool Change Counter 1101 output
register and the Tool changed count 1201 input register.



register 1101  Tool Change Counter

This register is used to initiate a tool chage operation. Whenever this register
value is changed a tool change occurs. Therefore to change a tool position, the
position to chage to is first written into register 1100, then the contents of
register 1101 are changed. It is best to increment it as this helps debugging.


Input Registers
-----------------
register 1200 Current Tool

This register contains the current tool position If this register contains 0
it indicates that the tool changer is "lost"


register 1201  Tool Changed Count

This register is used to determine when a tool chage operation is complete. This
is indicated by this register having the save value as register Tool Change
Counter 1101.

To perform a toolchange, the value of 1101 is changed to initiate the change.
When the change is complete, register 1201 will contain the same value that was
written to 1101.


register 1202  Tool Change Error Code

This register is used to determine the state of the last change request. If the
change was completed with an error, this register will contain 0x0000, otherwise
it will contain an error code.


register 1203  Tool Change Mode

This register contains the changers internal state as the change is occurring. It
is only used for debugging purposes.


Changer Operation
=================

To use the changer, the module must first be enabled by writing 0x02 to register
150.

Initially register 1100 should be written with 0x0000. Then, write0x0001 to
register 1101 to perform a dummy change.

Then to perform a tool change, write the new tool position to register 1100, then
increment register 1101 to start the change operation. Register 1201 is then checked
until it changes to the same value in register 1101

*******************************************************************************/
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 29, 2008, 08:29:45 PM
Hood:
So let me see if I'm understanding this.

You are using a set of switch's in a particular order
to tell the PLC what tool is in postion.

Mach tells the PLC witch tool it needs and the PLC
moves to that tool.

phomann:
Thanks for the post!
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 02:27:54 AM
Yes thats correct, also the tool signal is always passed to Mach so that for example if on the rear turret tool 1 is in position and the front toolpost tool 7 is in position. Now presently Mach is using tool 1 but the code calls for tool 7, mach looks to see if tool 7 is in place, because it sees the signal that it is, the only thing that happens is the tool number DRO and the offsets are changed.
 Will post a jpeg of a snippet of the ladder when I get to the workshop.

Hood
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 04:36:09 AM
Heres the some of the code in my M6Start.m1s macro and also a snippet from the PLC ladder for the rear turret.

Hood

If GetSelectedTool <1 Then   'If tool called is less than 1
MsgBox("Tool Out Of Range")  'show message
End                          'End macro
End If

If GetSelectedTool >10 Then  'If selected tool is greater than 10
MsgBox("Tool Out Of Range")  'Show message
End                          'End macro
End If

If GetselectedTool = GetCurrentTool Then  'If selected tool is the same as current tool then end macro
End
End If

 If GetSelectedTool=1  Then               'If selected tool = 1
 Do                                       'Start loop
 Call SetModOutput (9,1)                  'Toolchange signal to PLC to start turret indexing
 If GetInput (0) Then Exit Do             'Correct tool in position signal from PLC and exit loop
 Loop                                     'Continue loop if above signal is not present
 End If
 Call SetModOutput (9,0)                  'Cancel tool change signal to PLC
 
 If GetSelectedTool=2 Then                'If selected tool = 2
 Do
 Call SetModOutput (9,1)
 If GetInput (1)  Then Exit Do
 Loop
 End If
 Call SetModOutput (9,0)

Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 04:46:59 AM
As can be seen the modbus signal to start  is Modbus 9, if the rack is back (switch LS24) then the output Y7 is activated to unclamp the turret, when the turret unclamped signal is present the output to rotate the turret is activated (rack fwd output). The signal for rack forward is now present so the turret clamp signal is lost and the turret clamps, the turret clamping loses the signal for the rack so it now moves back to the start and the routine repeats and repeats until the signal from the tool chosen is seen by Mach, Mach then stops the Modbus signal to the PLC and the indexing is complete.
 As can be seen Mach always knows which tool is present from the signals it gets from  LS 20, LS 21 and LS22 and unless the turret is clamped it will not see these signals.

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 30, 2008, 07:19:11 AM
Who's PLC are you using?
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 07:31:23 AM
mine :D

Seriously though its the DL-06 (D0-06DR) from Automation Direct.
 Oh and BTW the software is free (for up to 100 words I think)

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on July 30, 2008, 07:51:33 AM
Hood:
Everybody likes a little ass but not a smart ass!  ;D
How many words are you using?

I may need the software anyway to drive the stepper.
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 08:07:48 AM
Dont have a clue I am afraid, not sure exactly how the programme calculates them.

Hood
Title: Re: Can A Modbus control a.........
Post by: Chaoticone on July 30, 2008, 10:48:15 AM
mine :D

Hood

Good one Hood.  ;D
Title: Re: Can A Modbus control a.........
Post by: Overloaded on July 30, 2008, 11:11:50 AM
Dittos...I'm still smilin' at that one.

Hey Hood,
I sent you message.
RC
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 11:26:14 AM
Sent you an email RC

Hood
Title: Re: Can A Modbus control a.........
Post by: Overloaded on July 30, 2008, 11:56:19 AM
You did ?
By boat or pidgeon ?  ::)  :D
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 01:28:33 PM
You not got it yet RC? Also sent an email to  TT350 about 1/2 and hour before so wondering if he has got it. Maybe the wind is blowing the wrong way and the ether has to fight against it going over the atlantic :D
 Let me know if you get it, if not I will send again.

Hood
Title: Re: Can A Modbus control a.........
Post by: Overloaded on July 30, 2008, 01:36:15 PM
Nope...Try sending it by Sub.
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 02:12:08 PM
:)
Title: Re: Can A Modbus control a.........
Post by: poppabear on July 30, 2008, 03:16:29 PM
Not to clear on what your saying eigther, (like Hood), but.........

I am speaking only of ADC PLC's

    IF you want the PLC to control the caracell rotary axis as a seperate entity from Mach, you have TWO options one cheap, slightly less accurate, and one more expensive, more accurate.

Starting cheap:  You can put an encouder on the shaft of the rotary caracell, and bring in the pulses on the native pulse counter on X0/X1, you can turn on an electric (low speed at the caracel shaft motor), and count pulses, with each position = to so many pulses or a total (absolute pulse count), when the number of counts = what you need for that slot, you cut the power to the motor. slow moving system here, max pulses is 7k

Not cheap: CTRIO module (high speed counter module can run a step/dir drive, and run a higher speed counter on the encouder feed back, various Accel/Decel profile type avail and dynamic positioning, Also has a "Homing routine").

Eigther case above: Your count register will translate to a T# position on your rotary. when it has reached that place, then you just send that Tool Number to Mach, through the modbus, to update your 824 DRO, and you can have a system wait signal holding in Brains OR your M6 your choice, so the M6 tool change routine will then complete.

If your going to also Capture the Z index signal on the encouder of the rotary, then your probably going to have to get a HS module since the signal happens faster than Mach can see it. 

Your sequence of Events, for the base mechanical movements of the ATC (and Error checking switches/position switches), are basic enough. You can run an Easy Ladder rung for that or if you want to run it in VB, and save a few bucks more, run it out to a M13 board on a serial modbus, it will also run the system, further you can use Brians to do your "ladder".

scott
Title: Re: Can A Modbus control a.........
Post by: Hood on July 30, 2008, 04:10:14 PM
Just so many ways to do a toolchanger.
 It just goes to show how versatile Mach is :)

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on August 02, 2008, 11:36:49 AM
Well I think I have a plan.

I will use a Smooth Stepper to get two parallel ports and use one to control the brake out board I have now from
port 1 and add another brake out board to port 2 to handle the TC axis and I/O's to and from the PLC.

What do you guys think?
Title: Re: Can A Modbus control a.........
Post by: Hood on August 02, 2008, 02:25:53 PM
Should work fine.
 Added cost of the SS and BOB may be almost as much as getting a module for the PLC to control the axis but the added benefit of the SS is that it will allow much more than the PP will in terms of frequency and smoothness of the pulse.
 You would probably be better handling the I/O from the PLC to the computer  over Modbus rather than through the port.

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on August 03, 2008, 06:33:39 AM
What is PP?

Title: Re: Can A Modbus control a.........
Post by: Hood on August 03, 2008, 06:35:35 AM
Paralllel port :)

Hood
Title: Re: Can A Modbus control a.........
Post by: TT350 on August 03, 2008, 06:37:26 AM
Thanks Hood!
Title: Re: Can A Modbus control a.........
Post by: smtpl on January 30, 2011, 05:02:23 AM
How can I use event driven serial control in Mach3?