Hello Guest it is October 22, 2019, 05:39:38 AM

Author Topic: DSPMC Macro  (Read 7034 times)

0 Members and 1 Guest are viewing this topic.

Offline pofo

*
  •  55 55
    • View Profile
DSPMC Macro
« on: December 12, 2013, 09:47:54 PM »
I have Acurite glass linear scales for a mill. They provide the position feedback and go to the encoder inputs of the DSPMC. The encoders have reference marks that are connected to the Z input of the DSPMC. The reference marks are about 1cm apart. The are positioned slightly different between marks so that after moving between marks, the count of the encoder will indicate the exact position of the table. I want to be able to count the encoder pulses between reference marks to get this exact positioning.

1. Will the macro be fast enough to do this?
2. I've read the macro manual. I don't see a way to detect the reference (Z) input. How can it be detected and then run a count until the next mark?

Re: DSPMC Macro
« Reply #1 on: December 13, 2013, 06:15:19 PM »
Pofo:

The reference signal (the Z channel) is for setting the "Machine Zero" on a CNC machine. After the referencing of the machine, you can jog the machine to any position within the physical limits of the machine and set your "Work Zero". For accurate work, this is where you would use an Edge Finder, or a digital probe, to set you X0.00, Y0.00, and Z0.00 for the job. For most users, this will be the G54 offset from Machine zero, and the DRO's will read 0.0000 in all axis that have been referenced when you set the Zero for that job. You can also set multiple "Work" offsets if you have several fixtures, G54, G55 ... etc, with programs appropriate for each given fixture. All these offsets become written into the Mach3 "Offsets Table."

If you are at the "Work Zero", by clicking on the "Machine Zero" button, you will see the actual distance in inch or millimeters your work zero for each axis is from the "Machine Zero" of that particular axis, after the machine has been "Referenced."

Many people do not bother with this procedure, and just move to where they want the Job zero to be and click Ref All. This works if there are no reference switches, and/or a machine does not have shaft encoders, such as a stepper motor machine. However, there are also "Hybird" stepper motor drives that utilize encoders.

The purpose of the encoder Z channel for machine referencing is to provide a repeatable, fixed, reference point that can be re-established after a machine/computer shutdown, as at the end of the day, and reset the Machine Zero the next time the CNC is started to the exact point it was before. Since the Encoder is fixed to the machine leadscrew, the Z channel is a known point in the machine travel which never changes. Thus, the job fixture you have on the machine can be used without needing to re-indicate the X,Y,Z positions since the "Work Zero (G54) has been established already, and is in the machine memory, and stored in the "Work Offsets" in the Mach3 program. When restarting the machine, you "Ref All", which Mach3 will automatically perform, and then the "Goto Zero" command will move to the exact point of your "Work Zero".

On a CNC machine with Encoders, there is a Reference Switch, and an Encoder Z channel. The Reference switch is located near a given axis physical limit, with a little space left. When you tell the machine "Ref X", or Ref All", the machine will move towards the particular reference switch until the switch is tripped. This micro-switch signal informs the system to reverse direction, and move at a slow speed until the Encoder Z channel is seen. Since the Z channel is a "Once per revolution signal" it is as accurate in repeatability as the resolution of the Encoder, or in your case, the Scale resolution. This Z channel is far finer resolution than the repeatability of any mechanical micro switch, which may be off a few thousands of an inch each time it is tripped, or even one or two thousands of an inch. The reference switch is necessary so the machine does not look for the Z channel until it is near the machine physical limit, and within one revolution of the leadscrew. This Machine Zero can usually be repeatably accurate to .0001 inch. The Z channel signal is ignored except when doing a "Reference" on that axis

The Z channel signal happens in such a brief space distance that it cannot be seen with a simple voltmeter. The machine electronics detects the signal because it is simply waiting for a digital transition from a 0 (no signal) to a digital 1 (voltage signal Hi), which can happen in milli-seconds. At this point the machine software automatically sets the Machine Zero.

Regarding your glass scales, I suggest you read the procedure the manufacturer wrote regarding machine referencing, which should be similar to a rotary encoder system.
This procedure is basic to all commercial CNC machines.

John

Offline pofo

*
  •  55 55
    • View Profile
Re: DSPMC Macro
« Reply #2 on: December 13, 2013, 06:36:37 PM »
Thanks John. That's a great write-up. I have a unique situation with the glass scales. Instead of moving the table to a limit switch, with these scales, I only have to move 1cm to find the tables absolute position. The position on the scale is encoded into the z encoder. I want to take advantage of this. I don't want to have to install limit switches.

My question is specific to the DSPMC. The macros are coded in visual basic. I expect that runs pretty slow and may not be able to keep up with the encoder pulses. I also need to know how to read the  Z input on the DSPMC. I didn't see a way to do this in the Macro user manual. I was hoping Rufi would have some answers.
Re: DSPMC Macro
« Reply #3 on: December 13, 2013, 09:35:07 PM »
Anilam should have the technical info you need, with an explanation of the sequence involved. I am sure the scales had a specific software routine for setting machine Ref Zero point, which certainly is not like the basic sub-routine in the dspmc controller software.

As I understand macro's and/or ModBus, neither is fast enough to accurately place the Z channel location after it goes Hi.
There is something missing in this equation.

The two marks must be made to work in sync, for placing the axis Ref point. There is a reason the two marks are 10cm apart.
I have a dspmc controller, and use the CNC mill original ref switch, and the encoder Z channel to set the "Machine Zero" point. This is on a 1985 commercial CNC machine I retrofitted a few years ago after the original controller went bellly up. The original machine method for setting "Machine Home" is exactly as it is done today. No macro's involved.

Also, the Ref micro switch is not a limit switch. My machines have 3 micro switches per axis; the Ref micro switch trips slightly before the limit switch for that axis is reached. Once the Ref switch has set "Ref axis" cycle in motion, it does not trigger again, unless you re-run the Ref cycle for that axis. The limit switches are almost never tripped, unless you forcibly jog into them, due to settings in "Homing and Limits."

It could be, the 2 Anilam "Z" channels 10cm apart are made to work in sync, with the first one tripped being a signal to slow the machine, and approach the second Z channel as one being the Ref "Machine Zero" point. This would allow a faster speed in the Ref cycle, without overshooting the target Z channel. Then all the machine limit parameters could be written into a table, based on machine axis travel.

Some set-ups use one of the Limit switches as a Ref switch, but that is not as accurate for repeat-ability. A lot of Mach3 users do not have encoders, or need them for the kind of work they do.

Maybe another forum member with the same setup using glass scales will have the answer. I am just making an educated guess.

John