Hello Guest it is April 18, 2024, 04:27:53 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Peter Homann

221
General Mach Discussion / Re: Mach 3 toolchange for dummies???
« on: June 26, 2011, 08:40:02 PM »
Hi Nate,

All it does is sets the changer to the current tool at startup. This is needed a M6Start is only run when a Toolchange is commanded.

Cheers,

Peter.

222
General Mach Discussion / Re: Mach 3 toolchange for dummies???
« on: June 26, 2011, 07:58:00 PM »
Hi Nate,

OK, To set up the Legacy Modbus for a remote PLC. This is for my toolchanger.
You will need to adjust the register numbers. I also use macro 999 that is run in the Mach3 init string to initialse my toolchanger variables, etc.

 The Mach3 Modbus interface should be configured. This is a config for my toolchanger (i,age below):

' ModIO Checkbox NOT checked
' First line of AutoPolling Input not checked - No inputs can go to Ports and Pins
' Second line of Inputs Checked, Slave = x, Start Regs = 1200, # Regs = 3
' First line of Autopolling Output not checked - no output Ports & Pins
' Second line of Output Slave = x, Start Regs = 1100, # Regs = 2




I set up modbus to read 3 registers  starting at address 1200. I also set up twp output registers starting at address 1100
Mach3 reads and writes the modbus data from buffers. There are 2 input buffers and 2 output buffers, organised as;
0-63       Input buffer 1
64-127   Input buffer 2
 
0-63      Output buffer 1
64-127   Output buffer 2
 
 
I use input buffer 2 and output buffer 2. This is because Mach3 maps some of buffer 1 to it's input and outputs signals. We don't want that.


When you want to read register 1200 you do it by;

value = GetInput (64)

This is because register 1200 was read into the 2nd input buffer starting at index 64



When you want to set register 1100 you do it by;

SetModOutput 64, tool ' output requested tool number

This is because register 1100 is written from the 2nd input buffer starting at index 64



So, you need to use GetInput(r) to read your registers, and SetModOutput r, v to write outputs.

I know that the commands GetInput and SetModOutput seem inconsistant in format but thats the way it is. 

I set up these constants so I can use the register names rather than the buffer index.

Const ChangerCurrPos  = 64      ' Inputs  1200 Current tool
Const ChangerCountReg = 65      ' 1201 Change done indicator
Const ChangerErrCode  = 66      ' 1202 Error code reply if problems

Const ChangerReqPos   = 64      ' Outputs 1100
Const ChangerInitReg  = 65      ' Outputs 1101


I hope this helps.

Cheers,

Peter.

223
General Mach Discussion / Re: Mach 3 toolchange for dummies???
« on: June 24, 2011, 12:01:55 AM »
Nate,

Also, have you read this page? It is a good introduction.
http://www.machsupport.com/MachCustomizeWiki/index.php?title=Modbus_in_Mach

Cheers,

Peter.

224
General Mach Discussion / Re: Mach 3 toolchange for dummies???
« on: June 23, 2011, 11:56:17 PM »
BTW, have you tried controlling the turret by using the Modbus test page. With it you can manually set and read registers to walk through the operatiomns to ensure that the PLC side is doing it's thing.

Cheers,

Peter.

225
General Mach Discussion / Re: Mach 3 toolchange for dummies???
« on: June 23, 2011, 11:52:57 PM »
Hi Nate,

I'll get some stuff together over the weekend that should hopefully make it clearer.

Cheers,

Peter.

226
General Mach Discussion / Re: Mach 3 toolchange for dummies???
« on: June 23, 2011, 10:12:07 PM »
Hi Nate,

Without knowing the history, as I'm at work and don't have time to study the whole thread.

If you have enabled the plugin version of Mach3s Modbus interface, you need to talk to the Modbus interface via Mach3 brains. So, your M6Start macro need to put data into user DROs, then you need to write a brain to read the User DRO and write it to a Modbus register.

To read Modbus data, you need to do the reverse. A brain reads the modbus data, puts it into a User DRO and then the M6Start macro reads it from there.

The other way to do it is to not use the Plugin Modbus interface, but the old legacy interface. Then you can read and write to this interface directly from the M6Start macro, using calls like Call SetModOutput (66,0)

I've done a number of toolchange interfaces using this method with the ModIO. Here is 1 example.

http://www.youtube.com/watch?v=YKb2g5xalEk

Cheers,

Peter.

227
General Mach Discussion / Re: Homann MB-02
« on: June 10, 2011, 07:55:48 PM »
Hi,

Yes you can use D6-D8 for the relay outputs.

No you cannot use pins 1, 9, 14, 16 for inputs. They can only be used for outputs

Inputs can be on pins 10,11,12,13,and 15.

If you look at the diagram in the link, it shows how to daisy chain limit switches so you only need to use a single input.

Cheers,

Peter.

228
General Mach Discussion / Re: Homann MB-02
« on: June 10, 2011, 11:18:34 AM »
Hi,

I know a bit about it. :)

Yes you can drive SSR relays directly from the MB-02V6 board. In addition to the D2-D9 outputs you have pins 1, 14, 16 and 17 as well. That said, pin 17 is used by the charge pump if you use it, otherwise it is also available to use as an output.

Have a look at EB008 and EN009 engineering note on this page;
http://www.homanndesigns.com/store/index.php?main_page=page&id=3

Cheers,

Peter.

229
General Mach Discussion / Re: lathe spindle control pwm or step/dir ?
« on: June 09, 2011, 05:46:14 PM »
Hi George,

I sell both types of voltage generators, and I find that the PWM version are simpler to set up and more resilience to noise. I would suggest the PWM control type.

http://www.homanndesigns.com/store/index.php?main_page=product_info&cPath=1&products_id=21

http://www.homanndesigns.com/store/index.php?main_page=product_info&cPath=1&products_id=39

Cheers,

Peter.

230
Duane,

The only input pins on a parallel port are 10,11,12,13 and 15. The rest are outputs. That said you can configure Mach3 to set pins 2-9 on the 2nd parallel port to inputs as well, but that's not applicable if you are using just the one port.

So, you should be able to use any of these assuming that they are not already being used. On some setups the Mach3 Estop input is set to pin 10 or pin 15.

Have a look at Engineering note EN0098 on the following  page. It shows how the limits are set up on my MB-02V6 breakout board and gives a table of the parallel port pin assignments.
http://www.homanndesigns.com/store/index.php?main_page=page&id=3

Note that you can just daisy chain the limit switches rather than a separate input for each switch.

Cheers,

Peter.