Архитектура Аудит Военная наука Иностранные языки Медицина Металлургия Метрология
Образование Политология Производство Психология Стандартизация Технологии


Нажмите кнопку Применить чтобы сохранить изменения на этой закладке.



Рисунок 5.4 – Определяем подключения для осей и управляемого шпинделя

If your spindle speed will be controlled by Mach3 then you need to Enable the spindle and

allocated a Step pin/port for it if it uses pulse width modulated control with relays to control

its direction or to allocate Step and Direction pins/ports if it has full control. You should

also define if these signals are active-lo. When done, click the Apply button to save the

data on this tab.

5.3.2 Input signals to be used

Now select the Input Signals tab. This will look like figure 5.5.

We assume that you have chosen one of the home/limit strategies from chapter 4.6.

If you have used strategy one and the limit switches are connected together and trigger an

EStop or disable the axis drives via the drive electronics then you do not check any of the

Limit inputs.

 

Figure 5.5 – Input signals

 

With strategy two you will probably have home switches on the X, Y and Z axes. Enable

the Home switches boxes for these axes and define the Port/Pin to which each is connected.

If you are combining limits and the home switch then you should enable the Limit --, the

Limit ++ and Home for each axis and allocate the same pin to Home, Limit— and Limit++.

Notice the scroll bar to access the rest of the table which is not visible in figure 5.5.

The Input #1 is special in that it can be used to inhibit running a part program when safety

guards are not in place. The other three (and #1 if not used for the guard interlock) are

available for your own use and can be tested in the code of macros. The Input #4 can be

used to connect an external pushbutton switch to implement the Single Step function. You

may wish to configure them later.

Enable and define Index Pulse if you have a spindle sensor with just one slot or mark.

Enable and define Limits Override if you are letting Mach2 control your limit switches and

you have an external button which you will press when you need to jog off a limit. If you

have no switch then you can use a screen button to achieve the same function.

Enable and define EStop to indicate to Mach3 that the user has demanded an emergency

stop.

Enable and define OEM Trigger inputs if you want electrical signals to be able to call OEM

button functions without a screen button needing to be provided.

Enable and define Timing if you have a spindle sensor with more than one slot or mark.

Enable Probe for digitising and THCOn, THCUp and THCDown for control of a Plasma

torch.

If you have one parallel port then you have 5 available inputs; with two ports there are 10

(or with pins 2 to 9 defined as inputs, 13). It is very common to find that you are short of

input signals especially if you are also going to have some inputs for glass scales or other

encoders. You may have to compromise by not having things like a physical Limit Override

switch to save signals!

You can also consider using a Keyboard Emulator for some input signals.

Click the Apply button to save the data on this tab.

 

5.3.3 Emulated input signals

If you check the Emulated column for an input then the Port/Pin number and active-lo state

for that signal will be ignored but the entry in the Hotkey column will be interpreted. When

a key-down message is received with code that matches a Hotkey value then that signal is

considered to be active. When a key-up message is received then it is inactive.

The key-up and key-down signals usually come from a keyboard emulator (like the

Ultimarc IPAC or Hagstrom) which is triggered by switches connected to its inputs. This

allows more switches to be sensed than spare pins on your parallel ports but there may be

significant time delays before the switch change is seen and indeed a key-up or key-down

message can get lost by Windows.

 

Figure 5.6 – Output signals

 

Emulated signals cannot be used for Index or Timing and should not be used for EStop.

5.3.4 Output Signals

Use the Output signals tab to define the outputs you require. See figure 5.6.

You will probably only want to use one Enable output (as all the axis drives can be

connected to it). Indeed if you are using the charge pump/pulse monitor feature then you

may enable your axis drives from its output.

The Output# signals are for use to control a stop/start spindle (clockwise and optionally

counterclockwise), the Flood and Mist coolant pumps or valves and for control by your own

customized Mach3 buttons or macros.

The Charge Pump line should be enabled and defined if your breakout board accept this

pulse input to continually confirm correct operation of Mach3. Charge Pump2 is used if

you have a second breakout board connected to the second port or want to verify the

operation of the second port itself.

Click the Apply button to save the data on this tab.

5.3.5 Defining encoder inputs

The Encoder/MPGs tab is used to define the connections and the resolution of linear

encoders or Manual Pulse Generators (MPGs) used for jogging the axes.

The Encoder/MPGs tab is used to define the connections and the resolution of linear

encoders or Manual Pulse Generators (MPGs) used for jogging the axes. It is covered here

for completeness of the description of Config> Ports & Pins.

This dialog does not need an active-lo column as, if the encoders count the wrong way it is

merely necessary to swap the pins allocated for A and B inputs.

 

Figure 5.7 – Encoder inputs

 

5.3.5.1 Encoders

The Counts per unit value should be set to correspond to the resolution of the encoder. Thus

a linear scale with rulings at 20 microns produces a count every 5 microns (remember the

quadrature signal), that is 200 counts per unit (millimetre). If you have Native units set as

inches the it would be 200 x 25.4 = 5080 counts per unit (inch). The Velocity value is not

used.

 

5.3.5.2 MPGs

The Counts per unit value is used to define the number of quadrature counts that need to be

generated for Mach3 to see movement of the MPG. For a 100 CPR encoder, a figure of 2 is

suitable. For higher resolutions you should increase this figure to get the mechanical

sensitivity you want. We find 100 works well with 1024 CPR encoders.

The Velocity value determines the scaling of pulses sent to the axis being controlled by the

MPG. The lower the value given in Velocity the faster the axis will move. Its value is best

set by experiment to give a comfortable speed when spinning the MPG as fast as is

comfortable.

 

5.3.6 Configuring the spindle

The next tab on Config> Ports & Pins is Spindle Setup. This is used to define the way in

which your spindle and coolant is to be controlled. You may opt to allow Mach3 to do

nothing with it, to turn the spindle on and off or to have total control of its speed by using a

Pulse Width Modulated (PWM) signal or a step and direction signal. The dialog is shown in

figure 5.8.

 

Figure 5.8 – Spindle Setup

 

5.3.6.1 Coolant control

Code M7 can turn Flood coolant on, M9 can turn Mist coolant on and M9 can turn all

coolant off. The Flood Mist control section of the dialog defines which of the output signals

are to be used to implement these functions. The Port/Pins for the outputs have already been

defined on the Output Signals tab.

If you do not want to use this function check Disable Flood/Mist Relays.

5.3.6.2 Spindle relay control

If the spindle speed is controlled by hand or by using a PWM signal then Mach3 can define

its direction and when to start and stop it (in response to M3, M4 and M5) by using two

outputs. The Port/Pins for the outputs have already been defined on the Output Signals tab.

If you control the spindle by Step and Direction then you do not need these controls. M3,

M4 and M5 will control the pulse train generated automatically.

If you do not want to use this function check Disable Spindle Relays.

5.3.6.3 Motor Control

Check Use Motor Control if you want to use PWM or Step and Direction control of the

spindle. When this is checked then you can choose between PWM Control and Step/Dir

Motor.

PWM Control

A PWM signal is a digital signal, a " square" wave where the percentage of the time the

signal is high specifies the percentage of the full speed of the motor at which it should run.

So, suppose you have a motor and PWM drive with maximum speed of 3000 rpm then

figure 4.12 would run the motor at 3000 x 0.2 = 600 RPM. Similarly the signal in figure

4.13 would run it at 1500 RPM.

Mach3 has to make a trade off in how many different widths of pulse it can produce against

how high a frequency the square wave can be. If the frequency is 5 Hz the Mach3 running

with a 25000 Hz kernel speed can output 5000 different speeds. Moving to 10Hz reduces

this to 2500 different speeds but this still amounts to a resolution of one or two RPM.

A low frequency of square wave increases the time that it will take for the motor drive to

notice that a speed change has been requested. Between 5 and 10 Hz gives a good

compromise. The chosen frequency is entered in the PWMBase Freq box.

Many drives and motors have a minimum speed. Typically because the cooling fan is very

inefficient at low speeds whereas high torque and current might still be demanded. The

Minimum PWM % box allows you to set the percentage of maximum speed at which Mach3

will stop outputting the PWM signal.

You should be aware that the PWM drive electronics may also have a minimum speed

setting and that Mach3 pulley configuration (see section x.x) allows you to set minimum

speeds. Typically you should aim to set the pulley limit slightly higher than the Minimum

PWM % or hardware limit as this will clip the speed and/or give a sensible error message

rather than just stopping it.

Step and Direction motor

This may be an variable speed drive controlled by step pulses or a full servo drive.

You can use the Mach3 pulley configuration (see section 5.5.6.1) to define a minimum

speed if this is needed by the motor or its electronics.

5.3.6.4 Modbus spindle control

This block allows the setup of an analogue port on a Modbus device (e.g. a Homann

ModIO) to control spindle speed. For details see the documentation of your ModBus

device.

5.3.6.5 General Parameters

These allow you to control the delay after starting or stopping the spindle before Mach3

will execute further commands (i.e. a Dwell). These delays can be used to allow time for

acceleration before a cut is made and to provide some software protection from going

directly from clockwise to counterclockwise. The dwell times are entered in seconds.

Immediate Relay off before delay, if checked will switch the spindle relay off as soon as the

M5 is executed. If unchecked it stays on until the spin-down delay period has elapsed.

5.3.6.6 Pulley ratios

Mach3 has control over the speed of your spindle motor. You program spindle speeds

through the S word. The Mach3 pulley system allows you to define the relationship

between these for four different pulley or gearbox settings. It is easier to understand how it

works after tuning your spindle motor so it is described in section 5.5.6.1 below.

5.3.6.7 Special function

Laser mode should always be unchecked except for controlling the power of a cutting laser

by the feedrate..

Use Spindle feedback in sync mode should be un-checked.

Closed Loop Spindle Control, when checked, implements a software servo loop which tries

to match the actual spindle speed seen by the Index or Timing sensor with that demanded

by the S word. The exact speed of the spindle is not likely to be important so you are not

likely to need to use this feature in Mach3Turn.

If you do use it then the P, I and D variables should be set in the range 0 to 1. P controls the

gain of the loop and an excessive value will make the speed oscillate, or hunt, around the

requested value rather than settling on it. The D variable applies damping so stabilising

these oscillations by using the derivative (rate of change) of the speed. The I variable takes

a long term view of the difference between actual and requested speed and so increases the

accuracy in the steady state. Tuning these values is assisted by using the dialog opened by

Operator> Calibrate spindle.

Spindle Speed Averaging, when checked, causes Mach3 to average the time between

index/timing pulses over several revolutions when it is deriving the actual spindle speed.

You might find it useful with a very low inertia spindle drive or one where the control tends

to give short-term variations of speed.

5.3.7 Mill Options tab

The final tab on Config> Ports & Pins is Mill Options. See figure 5.9.

 

Figure 5.9 – Mill Options Tab

 

Z-inhibit. The Z-inhibit On checkbox enables this function. Max Depth gives the lowest Z

value to which the axis will move. The Persistent checkbox remembers the state (which can

be changed by a screen toggle) from run to run of Mach3.

Digitising: The 4 Axis Point Clouds checkbox enables recording of the state of the A axis

as well as X, Y and Z. The Add Axis Letters to Coordinates prefixes the data with the axis

name in the point cloud file.

THC Options: The checkbox name is self-explanatory.

Compensation G41, G42: The Advanced Compensation Analysis checkbox turns on a

more thorough lookahead analysis that will reduce the risk of gouging when compensating

for cutter diameter (using G41 and G42) on complex shapes.

Homed true when no Home switches: Will make the system appear to be referenced (i.e.

LEDs green) at all times. It should only be used if no Home switches are defined under

Ports & Pins Inputs tab.

Configuring Mach3

Rev 1.84-A2 Using Mach3Mill 5-9

5.3.8 Testing

Your software is now configured sufficiently for you to do some simple tests with the

hardware. If it is convenient to connect up the inputs from the manual switches such as

Home then do so now.

Run Mach3Mill and display the Diagnostics screen. This has a bank of LEDs displaying the

logic level of the inputs and outputs. Ensure that the external Emergency Stop signal is not

active (Red Emergency LED not flashing) and press the red Reset button on the screen. Its

LED should stop flashing.

If you have associated any outputs with coolant or spindle rotation then you can use the

relevant buttons on the diagnostic screen to turn the outputs on and off. The machine should

also respond or you can monitor the voltages of the signals with a multimeter.

Next operate the home or the limit switches. You should see the appropriate LEDs glow

yellow when their signal is active.

These tests will let you see that your parallel port is correctly addressed and the inputs and

outputs are appropriately connected.

If you have two ports and all the test signals are on one then you might consider a

temporary switch of your configuration so that one of the home or limit switches is

connected via it so that you can check its correct operation. Don't forget the Apply button

when doing this sort of testing. If all is well then you should restore the proper

configuration.

If you have problems you should sort them out now as this will be much easier that when

you start trying to drive the axes. If you do not have a multimeter then you will have to buy

or borrow a logic probe or a D25 adaptor (with actual LEDs) which let you monitor the

state of its pins. In essence you need to discover if (a) the signals in and out of the computer

are incorrect (i.e. Mach3 is not doing what you want or expect) or (b) the signals are not

getting between the D25 connector and your machine tool (i.e. a wiring or configuration

problem with the breakout board or machine). 15 minutes help from a friend can work

wonders in this situation even if you only carefully explain to him/her what your problem is

and how you have already looked for it!

You will be amazed how often this sort of explanation suddenly stops with words like

" …… Oh! I see what the problem must be, it's ….."

 

5.4 Defining the setup units

 

With the basic functions working, it's time to configure the axis drives. The first thing to decide is whether you wish to define their properties in Metric (millimetres) or Inch units. You will be able to run part programs in either units whichever option you choose. The maths for configuration will be slightly easier if you choose the same system as your drive train (e.g. the ballscrew) was made in. So a screw with 0.2" lead (5 tpi) is easier to configure in inches than in millimetres. Similarly a 2mm lead screw will be easier in millimetres. The multiplication and/or division by 25.4 is not difficult but is just something else to think about.

 

Figure 5.10 - Setup Units dialog

 

There is, on the other hand, a slight advantage in

having the setup units be the units in which you usually work. This is that you can lock the

DROs to display in this system whatever the part program is doing (i.e. switching units by

G20 and G21).

So the choice is yours. Use Config> Setup Units to choose MMs or Inches (see figure 5.10).

Once you have made a choice you must not change it without going back over all the

following steps or total confusion will reign! A message box reminds you of this when you

use Config> Setup units.

 

5.5 Tuning motors

Well after all that detail it's now time to get things moving - literally! This section describes

setting up your axis drives and, if its speed will be controlled by Mach3, the spindle drive.

The overall strategy for each axis is: (a) to calculate how many step pulses must be sent to

the drive for each unit (inch or mm) of movement of the tool or table, (b) to establish the

maximum speed for the motor and (c) to set the required acceleration/deceleration rate.

We advise you to deal with one axis at a time. You might wish to try running the motor

before it is mechanically connected to the machine tool.

So now connect up the power to your axis driver electronics and double check the wiring

between the driver electronics and your breakout board/computer. You are about to mix

high power and computing so it is better to be safe than smoky!

5.5.1 Calculating the steps per unit

Mach3 can automatically perform a test move on an axis and calculate the steps per unit but

this is probably best left for fine tuning so we present the overall theory here.

The number of steps Mach3 must send for one unit of movement depends on the

mechanical drive (e.g. pitch of ballscrew, gearing between the motor and the screw), the

properties of the stepper motor or the encoder on the servo motor and the micro-stepping or

electronic gearing in the drive electronics.

We look at these three points in turn then bring them together.

5.5.1.1 Calculating mechanical drive

You are going to calculate the number of revolutions of the motor shaft (motor revs per

unit) to move the axis by one unit. This will probably be greater than one for inches and

less than one for millimetres but this makes no difference to the calculation which is easiest

done on a calculator anyway.

For a screw and nut you need the raw pitch of the screw (i.e. thread crest to crest distance)

and the number of starts. Inch screws may be specified in threads per inch (tpi). The pitch is

1/tpi (e.g. the pitch of an 8 tpi single start screw is 1 ¸ 8 = 0.125" )

If the screw is multiple start multiply the raw pitch by the number of starts to get the

effective pitch. The effective screw pitch is therefore the distance the axis moves for one

revolution of the screw.

Now you can calculate the screw revs per unit

screw revs per unit = 1 ¸ effective screw pitch

If the screw is directly driven from the motor then this is the motor revs per unit. If the

motor has a gear, chain or belt drive to the screw with Nm teeth on the motor gear and Ns

teeth on the screw gear then:

motor revs per unit = screw revs per unit x Ns ¸ Nm

For example, suppose our 8 tpi screw is connected to the motor with a toothed belt with a

48 tooth pulley on the screw and an 16 tooth pulley on the motor then the motor shaft pitch

would be 8 x 48 ¸ 16 = 24 (Hint: keep all the figures on your calculator at each stage of

calculation to avoid rounding errors)

As a metric example, suppose a two start screw has 5 millimetres between thread crests (i.e.

effective pitch is 10 millimetres) and it is connected to the motor with 24 tooth pulley on

the motor shaft and a 48 tooth pulley on the screw. So the screw revs per unit = 0.1 and

motor revs per unit would be 0.1 x 48 ¸ 24 = 0.2

For a rack and pinion or toothed belt or chain drive the calculation is similar.

Find the pitch of the belt teeth or chain links. Belts are available in metric and imperial

pitches with 5 or 8 millimetres common metric pitches and 0.375" (3/8" ) common for inch

belts and for chain. For a rack find its tooth pitch. This is best done by measuring the total

distance spanning 50 or even 100 gaps between teeth. Note that, because standard gears are

made to a diametral pitch, your length will not be a rational number as it includes the

constant p (pi = 3.14152…).

For all drives we will call this tooth pitch.

If the number of teeth on the pinion/sprocket/pulley on the primary shaft which drives the

rack/belt/chain is Ns then:

shaft revs per unit = 1 ¸ (tooth pitch x Ns)

So, for example with a 3/8" chain and a 13 tooth sprocket which is on the motor shaft then

the motor revs per unit = 1 ¸ (0.375 x 13) = 0.2051282. In passing we observe that this is

quite " high geared" and the motor might need an additional reduction gearbox to meet the

torque requirements. In this case you multiply the motor revs per unit by the reduction ratio

of the gearbox.

motor revs per unit = shaft revs per unit x Ns ¸ Nm

For example a 10: 1 box would give 2.051282 revs per inch.

For rotary axes (e.g. rotary tables or dividing heads) the unit is the degree. You need to

calculate based on the worm ratio. This is often 90: 1. So with a direct motor drive to the

worm one rev gives 4 degrees so Motor revs per unit would be 0.25. A reduction of 2: 1

from motor to worm would give 0.5 revs per unit.

5.5.1.2 Calculating motor steps per revolution

The basic resolution of all modern stepper motors is 200 steps per revolution (i.e. 1.8o per

step). Note: some older steppers are 180 steps per rev. but you are not likely to meet them if

you are buying supported new or nearly new equipment.

The basic resolution of a servo motor depends on the encoder on its shaft. The encoder

resolution is usually quoted in CPR (cycles per revolution) Because the output is actually

two quadrature signals the effective resolution will be four time this value. You would

expect a CPR in the range of about 125 to 2000 corresponding to 500 to 8000 steps per

revolution.

5.5.1.3 Calculating Mach3 steps per motor revolution

We very strongly recommend that you use micro-stepping drive electronics for stepper

motors. If you do not do this and use a full- or half-step drive then you will need much

larger motors and will suffer from resonances that limit performance at some speeds.

Some micro-stepping drives have a fixed number of micro-steps (typically 10) while others

can be configured. In this case you will find 10 to be a good compromise value to choose.

This means that Mach3 will need to send 2000 pulses per revolution for a stepper axis

drive.

Some servo drives require one pulse per quadrature count from the motor encoder (thus

giving 1200 steps per rev for a 300 CPR encoder. Others include electronic gearing where

you can multiply the input steps by an integer value and, sometimes, the divide the result by

another integer value. The multiplication of input steps can be very useful with Mach3 as

the speed of small servo motors with a high resolution encoder can be limited by the

maximum pulse rate which Mach3 can generate.

5.5.1.4 Mach3 steps per unit

So now we can finally calculate:

Mach3 steps per unit = Mach3 steps per rev x Motor revs per unit

Figure 5.11 shows the dialog for Config> Motor Tuning. Click a button to select the axis

which you are configuring and enter the calculated value of Mach3 steps per unit in the box

above the Save button.. This value does not have to be an integer so you can achieve as

much accuracy as you wish. To avoid forgetting later click Save Axis Settings now.

 

Figure 5.11 - Motor tuning dialog

 

5.5.2 Setting the maximum motor speed

Still using the Config> Motor Tuning dialog, as you move the Velocity slider you will see a

graph of velocity against time for a short imaginary move. The axis accelerates, maybe

runs at full speed and then decelerates. Set the velocity to maximum for now. Use the

Acceleration slider to alter the rate of acceleration/deceleration (these are always the same

as each other)

As you use the sliders the values in the Velocity and Accel boxes are updated. Velocity is in

units per minute. Accel is in units per second2. The acceleration values is also given in Gs to

give you a subjective impression of the forces that will be applied to a massive table or

workpiece.

The maximum velocity you can display will be limited by the maximum pulse rate of

Mach3. Suppose you have configured this to 25, 000 Hz and 2000 steps per unit then the

maximum possible Velocity is 750 units per minute.

This maximum is, however, not necessarily safe for your motor, drive mechanism or

machine; it is just Mach3 running " flat out". You can make the necessary calculations or do

some practical trials. Let's just try it out first.

5.5.2.1 Practical trials of motor speed

You saved the axis after setting the Steps per unit. OK the dialog and make sure that

everything is powered up. Click the Reset button so its LED glows continuously.

Go back to Config> Motor Tuning and select your axis. Use the Velocity slider to have the

graph about 20% of maximum velocity. Press the cursor Up key on your keyboard. The axis

should move in the Plus direction. If it runs away then choose a lower velocity. If it crawls

then choose a higher velocity. The cursor Down key will make it run the other way (i.e. the

Minus direction).

If the direction is wrong then, Save the axis and either (a) change the Low Active setting

for the Dir pin of the axis in Config> Ports and Pins> Output Pins tab (and Apply it) or (b)

check the appropriate box in Config> Motor Reversals for the axis that you are using. You

can akso, of course, just switch off and reverse one pair of physical connections to the

motor from the drive electronics.

If a stepper motor hums or screams then you have wired it incorrectly or are trying to drive

it much too fast. The labelling of stepper wires (especially 8 wire motors) is sometimes very

confusing. You will need to refer to the motor and driver electronics documentation.

If a servo motor runs away at full speed or flicks and indicates a fault on its driver then its

armature (or encoder) connections need reversing (see your servo electronics

documentation for more details). If you have any troubles here then you will be pleased if

you followed the advice to buy current and properly supported products - buy right, buy

once!

Большинство приводов будут нормально работать с минимальной шириной импульса в 1 микросекунду. Если при тестировании у вас возникли проблемы (например двигатель сильно шумит) для начала проверьте, не перевернуты ли шаговые импульсы (активная low неправильно настроена на вкладке Ножки Выводов окна Порты и Ножки), потом можно например попробовать увеличить ширину импульса до, скажем, 5 микросекунд. Интерфейс Шага и Направления очень прост, но так как это важная часть, при неправильной настройке будет очень трудно обнаружить неполадку без оцилоскопа или очень детальной перепроверки.

 

5.5.2.2 Вычисление максимальной скорости двигателя

Если вам хочется вычислить максимальную скорость двигателя, то читайте эту главу.

Есть множество факторов, определяющих максимальную скорость оси:

- Максимально допустимая скорость двигателя (возможно 4000 оборотов в минуту для серводвигателя или 1000 оборотов в минуту для шагового)

- Максимально допустимая скорость винта (зависит от длинны, диаметра и т.д.)

- Максимальная скорость привода ремня или понижения коробки передач

- Максимальная скорость, которую поддерживает электроника привода без выдачи сообщения о сбое

- Максимальная скорость обеспечивающая смазку салазок станка

 

Для вас наиболее важны первые два пункта. Нужно будет обратиться к спецификациям производителя, вычислить разрешенные скорости винта и двигателя и соотнести их к единицам в секунду движения оси. Задайте это максимальное значение для нужной оси в окне Velocity (скорость) Настройки Двигателя.

 

5.5.2.3 Автоматическое задание Шагов на Единицу

Возможно вам не удастся измерить скорость (gearing) привода оси или узнать точную подачу винта. Можно измерить расстояние на которое перемещается ось, а потом позволить Mach3 высчитать необходимое значение шагов на единицу.

 

Рисунок 5.12 показывает кнопку на экране настроек, которую нужно нажать для запуска этого процесса. Вас спросят какую ось нужно использовать.

Рисунок 5.12 - Автоматическая настройка шагов на единицу

 

Потом нужно ввести номинальное расстояние движения. Mach3 проедет это расстояние. Будьте готовы нажать кнопку экстренного останова если ось заедет слишком далеко. Наконец вам предложат измерить и ввести реальное расстояние, которое было пройдено. Это значение будет использовано для вычисления реального значения Шагов на Единицу оси вашего станка.

 

5.5.3 Определение ускорения

 

5.5.3.1 Инерция и силы

Ни один двигатель не способен моментально изменить скорость механизма. Torque необходим для задания углового момента вращающимся частям (включая и сам двигатель) и torque превращенный механизмом (винт и т.д.) в силу должен давать ускорение частям станка и инструменту или рабочей области. Некоторое количество силы тратится также на преодоление трения и собственно для того, чтобы заставить инструмент работать (резать).

Mach3 будет ускорять (и замедлять) двигатель с заданным уровнем. Если двигатель обеспечивает больше torque чем необходимо для работы (резки), преодоления трения и инерции на заданном уровне ускорения, тогда все в порядке. Если же torque не хватает, тогда либо двигатель заглохнет (если шаговый) либо повысится погрешность позиции серводвигателя. Если погрешность станет слишком высокой, тогда привод возможно сообщит о неисправности, но даже если и не сообщит то точность резки всеравно пострадает. Далее это будет объяснено более детально.

 

 

5.5.3.2 Тестирование разных значений ускорения

Попробуйте запустить и остановить станок с разными настройками бегунка Ускорения в окне Настройки Двигателя. При низком значении вы сможете услышать как увеличивается и понижается скорость.

 

5.5.3.3 Почему стоит избегать серьезных ошибок серводвигателя

Большинство перемещений, указанных в подпрограмме подразумевают одновременное движение двух и более осей. Так при движении из X=0, Y=0 в X=2, Y=1 Mach3 переместит ось Х вдвое быстрей чем ось Y. Это не только координирует движения на постоянной скорости но также гарантирует что при ускорении и замедлении применяется необходимая скорость, но ускорение всех движений производится на скорости, определенной самой медленной осью.

Если для данной оси вы выберете слишком высокое значение ускорения, Mach3 будет полагать что это значение может использоваться, но так как на практике ось задерживается после получения команды (т.е серво погрешность высока) то положение разреза при работе будет неточным.

 

 

5.5.3.4 Выбор значения ускорения

Принимая во внимание все моменты инерции двигателя и винта, силы трения и torque двигателя вполне возможно вычислить какого ускорения можно достичь с данной погрешностью.

Если от станка вы не требуете огромной производительности, мы рекомендуем задавать такое значение, при которых тестовый запуск и останов звучит нормально. Да это не совсем по научному, но обычно дает хорошие результаты.

 

5.5.4 Сохранение и тестирование осей

Наконец не забудьте нажать Сохранить Настройки Осей для сохранения уровня ускорения перед тем как двигаться дальше.

Теперь следует проверить ваши вычисления используя MDI чтобы сделать определенное G0 движение. Для точной проверки можно воспользоваться стальной линейкой. Более точный тест можно провести с помощью Дискового Тест Индикатора (DTI)/Часов и плоского бруска. Вообще-то его следует монтировать в держатель инструмента, но для обычного станка можно использовать рамку станка.

Предположим что вы тестируете ось Х и используете 4 дюймовый брусок.

Используйте экран MDI чтобы выбрать дюймы и абсолютные координаты. (G20 G90) Установите зажим на столе и отгоните ось так, чтобы щуп DTI касался ее. Гарантируйте окончание движением в отрицательном направлении Х. Установите шкалу на ноль. Это показано на рисунке 5.13.

 

Рисунок 5.13 - Установка нулевой позиции

 

Теперь используйте MDI экран Mach3 и нажмите кнопку G92X0 чтобы задать отступ и следовательно обнулить DRO оси Х. Переместитесь в положение х = 4.5 с помощью G0 X4.5. Промежуток должен быть около половины дюйма. Если нет, то тогда что-то не так со значением Шагов на Единицу которое вы вычислили. Проверьте и исправьте его.

Положите брусок и передвиньтесь на Х = 4.0. Это движение в отрицательном направлении по Х так же как и прогон, так что эфект обратной подачи будет погашен. Значение на DTI покажет ошибку позиционирования. Она должна быть thou или что-то около того. Это показано на рисунке 5.14.

Уберите брусок и сделайте G0 X0 чтобы проверить нулевое значение. Повторите тест чтобы получить набор из примерно 20 значений и посмотрите насколько различается позиционирование. Если вы получите последовательные ошибки, тогда можно подстроить значение Шагов на Единицу для достижения максимальной точности.

 

Рисунок 5.14 - Брусок в положении

 

Теперь нужно проверить, не теряются ли шаги на оси в повторяющихся движениях на скорости. Уберите брусок. Выполните G0 X0 и проверьте нулевое значение на DTI.

Используйте редактор для ввода следующей программы:

 

F1000 (это быстрее чем возможно но Mach3 ограничит скорость)

G20 G90 (Дюймы и Абсолют)

М98 Р1234 L50 (запустить подзадачу 50 раз)

М30 (стоп)

О1234

G1 X4

G1 X0 (движение туда и обратно)

М99 (возврат)

 

Нажмите Запуск Цикла для запуска. Убедитесь что движения звучат плавно.

После окончания DTI конечно должно показывать 0. Если что-то не получается, то прийдется лучше настроить максимальный уровень ускорения оси.

 

5.5.5 Повтор настройки других осей

Используя полученный опыт, вы сможете быстро повторить весь процесс для остальных осей.

 

 

5.5.6 Установка двигателя шпинделя

Если скорость двигателя вашего шпинделя фиксирована или управляется вручную, то эту главу можно пропустить. Если двигатель включается и выключается в любом направлении с помощью Mach3, то это будет установлено с помощью реле выводов.

Если Mach3 используется для управления скорость шпинделя либо через сервопривод, принимающий импульсы Шага и Направления либо через PWM контроллер двигателя, то эта глава расскажет как настроить вашу систему.

 

5.5.6.1 Скорость двигателя, скорость шпинделя и шкивы

Шаг и Направление и PWM в равной мере позволяют управлять скоростью двигателя. При работе и вы и подпрограмма опираетесь на скорость шпинделя. Конечно скорости двигателя и шпинделя зависят от шкивов или механизма связывающих их. Мы будем использовать термин " шкив" для обозначения обоих типов привода.

 

Рисунок 5.15 - Привод шпинделя на шкивах

 

Если у вас нет контроля над скоростью двигателя, то выбирайте Шкив 4 с высокой максимальной скоростью как например 10, 000 оборотов в минуту. Это предотвратит жалобы Mach3 если вы будете запускать программу со словом S, требующим скажем 6000 оборотов в минуту.

Самостоятельно Mach3 никак не сможет узнать какой уровень шкивов используется в определенный момент времени, так что эта задача лежит на операторе станка. Вообще-то информация дается в два подхода. Когда система настраивается (это то, что вы сейчас делаете) вы определяете до 4 возможный комбинаций шкивов.Они задаются с помощью физических размеров шкивов или уровней механической головки. После, когда запускается подпрограмма, оператор определяет какой шкив (1-4) используется.

Уровни шкивов станка задаются в окне Настройки-> Порты и ножки (рисунок 5.6) где максимальная скорость четырех наборов шкивов определяется вместе с используемым по умолчанию. Максимальная скорость это скорость, на которой шпиндель будет вращаться когда двигатель работает на полной скорости. Полная скорость достигается 100% шириной импульса в PWM и на установленном значении Скорости на Настройки Двигателя " Оси шпинделя" для Шага и Направления.

Как пример, предположим что позиция, которую мы назовем " Шкив 1" это отношение (нисходящее) 5: 1 от двигателя к шпинделю, а максимальная скорость двигателя 3600 оборотов в минуту. Максимальная скорость Шкива 1 в Настройки-> Логика будет установлена на 720 оборотов в минуту (3600: 5). Шкив 4 может быть отношением (восходящим) 4: 1. При той же самой скорости двигателя его максимальная скорость будет равна 14, 400 оборотов в минуту (3600 х 4). Остальные шкивы будут где-то посередине. Шкивы не обязательно располагать по мере увеличения скорости, но какая-то логическая связь для облегчения управления станком должна присутстовать.

Значение Минимальной Скорости применяется равно ко всем шкивам и выражается как процент от максимальной скорости и минимальный процент уровня сигнала PWM. Если скорость ниже требуемой (выражением S) то Mach3 попросит вас сменить уровень шкива. Например при максимальной скорости 10, 000 оборотов в минуту на шкиве 4 и минимальном проценте 5%, выражение S499 запрости другой шкив. Это сделано чтобы предотвратить работу двигателя или его контроллера на скорости ниже минимального уровня.

Mach3 использует информацию об уровне шкива следующим образом:

 

- Когда подпрограмма исполняет команду S или значение введено в DRO задания скорости, то значение сравнивается с максимальной скоростью для выбранного в данный момент шкива. Если запрошенная скорость больше максимальной, возникает ошибка.

- Иначе процент от максимального для шкива, который был запрошен, и это используется для задания ширины PWM или импульса Шага генерируемого для получения этого процента максимальной скорости двигателя как задано в настройках двигателя для " Осей шпинделя".

 

 

Например максимальная скорость шпинделя для Шкива #1 1000 оборотов в минуту. S1100 выдать ошибку. S600 выдаст импульс, шириной в 60%. Если максимальная скорость Шага и Направления 3600 оборотов в минуту, то двигатель " шагнет" на 2160 оборотах в минуту (3600 х 0.6).

 

 

5.5.6.2 PWM контроллер шпинделя

Для настройки двигателя шпинделя для управления с помощью PWM, отметьте галочками Включить Оси Шпинделя и Управление PWM на закладках Порты и Ножки, Порты Принтера и Страница Выбора Осей (Рисунок 5.1). Не забудьте нажать Применить. На закладке Страница Выбора Сигналов Вывода (рис 5.6) определите ножку вывода для Шага Шпинделя. Эта ножка должна быть подключена к электронике управления PWM двигателя. Вам не нужно Направление Шпинделя, так что установите эту ножку в 0. Примените изменения.

Определите Внешние Активационные сигналы в Портах и Ножках и Настройка-> Устройства Вывода чтобы включить/выключить контроллер PWM, и, если требуется, установить направление вращения. Теперь откройте Настройки-> Порты и Ножки Настройки Шпинделя и найдите PWMBase Freq. Значение здесь это частота квадратной волны, ширина импульса которой модулируется. Это сигнал, подаваемый на ножку Шага Шпинделя. Чем выше выбранная вами частота, тем быстрее ваш контроллер сможет реагировать на изменения скорости, но тем меньше выбор скоростей. Число разных скоростей это частота импульса Двигателя/PWMBase Freq. Так например если вы работаете на 35, 000 Гц и задали PWMBase = 50 Гц, то для выбора доступно 700 разных скоростей. Этого почти наверняка достаточно на любой реальной системе, так как двигатель с максимальной скоростью 3600 оборотов в минуту может, теоретически, управляться с шагом меньше чем 6 оборотов в минуту.

 

 

5.5.6.3 Шаг и Направление контроллер шпинделя

Для того чтобы настроить двигатель шпинделя для управления посредством Шага и Направления, отметьте галочками Включить Оси Шпинделя на закладках Порты и Ножки, Порты Принтера и Страница Выбора Осей (Рисунок 5.1). Управление PWM не отмечайте. Не забудьте применить изменения. Определите ножки выводов на закладке Страница Выбора Сигналов Вывода (рис 5.6) для Шага Шпинделя и Направления Шпинделя. Эти ножки должны быть подключены к электронике привода двигателя. Примените изменения. Определите Внешние сигналы Активации на страницах Порты и ножки и Настройки-> Устройства вывода для включения/выключения если хотите обесточить двигателькогда шпиндель останавливается по М5. Он конечно и так не будет вращаться так как Mach3 не будет посылать шаговые импульсы, но, в зависимости от конструкции привода, может еще содержать остаточную энергию. Теперь перейдем к Настройки-> Настройка двигателя для " Осей Шпинделя". Единицами для него будет один оборот. Так что Шаги на Единицу это количество импульсов на один оборот (2000 для 10-кратного микрошагового привода или 4 х число строк энкодера серводвигателя или похожего с электронной начинкой).

В поле Скорости нужно ввести число оборотов в секунду на полной скорости. Так что для двигателя на 3600 оборотов в минуту нужно ввести 60. Это невозможно с энкодером с высоким числом строк на такт максимального уровня импульсов из Mach3 (энкодер с 100 строк позволяет 87.5 оборотов в секунду на системе с 35, 000 Гц). Шпинделю потребуется мощный двигатель, электроника привода которого предположительно включает в себя электронную начинку, которая может превзойти это ограничение.

Ускорение можно настроить экспериментальным путем, чтобы запуск и останов шпинделя были плавными.

Обратите внимание: что если вы хотите ввести слишком маленькое значение в поле Ускорения, это делается с помощью ручного ввода а не ползунком. Время около 30 секунд для запуска шпинделя вполне возможно.

 

5.5.6.4 Тестирование привода шпинделя

Если у вас есть тахометр или стробоскоп, то вы можете измерить скорость шпинделя вашего станка. Если же нет, то прийдется оценивать ее на глаз и экспериментальным путем.

На экране Настроек Mach3 выберите шкив, который позволяет 900 оборотов в минуту. Установите ремень в соответствующее положение. На экране Запуска Программы установите скорость шпинделя, отвечающую 900 оборотам в минуту и начинайте вращать его. Измерьте или оцените скорость. Если она не соответствует нужной, нужно перепроверить вычисления и настройки.

Также можно проверить скорость всех шкивов тем же путем но с применимым набором скоростей.

 

5.6 Другие настройки

5.6.1 Настройка homing и программных ограничителей

5.6.1.1 Соотносящиеся скорости и направление

Диалог Настройка-> Home/Softlimits (начальное положение/программные ограничители) позволяет определить реакцию на осуществление операции калибровки (G28.1 или кнопка на экране). Рисунок 5.16 показывает диалог. % Скорости используется для предотвращения врезания в стопы осей на полной скоростипри поиске переключателей калибровки.

 

Рисунок 5.16 – Homing (калибровка)

 

Когда вы производите калибровку, Mach3 не знает положение осей. Направление движения зависит от галочки возле Home Neg. Если отмечено, то ось будет двигаться в отрицательном направлении пока не станет активным ввод Home. Если он уже активен, то ось будет двигаться в положительном направлении. Точно так же если галочка не стоит, ось движется в положительном направлении пока ввод не станет активным и в отрицательном если он уже активен.

 

5.6.1.2 Положение переключателей home

Если возле Авто Ноль стоит галочка, тогда DRO оси примет значение положения Калибровки/Переключателя Home, определенного в столбце Home Off (вместо настоящего Нуля). Это может послужить для уменьшения времени homing на очень больших и медленных осях. Конечно необходимо иметь отдельные переключатели пределов и калибровки, если переключатели калибровки находятся не в конце оси.

 

 

5.6.1.3 Настройка программных ограничителей.

Как было сказано выше большинство внедрений переключателей предела включает в себя некоторые компромисы и случайное их задевание потребует вмешательства оператора, и может требовать перезапуска и перекалибровки системы. Программные ограничители могут дать защиту против такого рода случаев.

Программа откажется позволить оси передвинуться за заданный предел программных ограничителей осей X, Y и Z. Они могут принимать значение в радиусе от -99999 до +99999 единиц для каждой оси. Когда движение прогона будет приближаться к ограничителю, скорость движения будет снижаться на время нахождения в Медленной Зоне (Slow Zone), которая определяется на столе.

Если Медленная Зона будет слишком большой, то вы уменьшите эффективное рабочее пространство станка. Если она слишком мала, то вы рискуете задеть аппаратные ограничители. Определенные пределы используются только когда кнопка Программыне Ограничители включена.


Поделиться:



Популярное:

  1. I. Чтобы они поистине были универсальными для научных занятий.
  2. VI. Изменения слизистой оболочки рта при экзогенных интоксикациях.
  3. А может, сделать так, чтобы и у детей всего мира – у белых, черных, желтых – тоже было знамя одного цвета?
  4. А прежде чем был построен, украшен и определён новый эон, призван великий Строитель, первый Зодчий, и ангелы, сущие с ним, чтобы построить и украсить новый эон.
  5. Анализ готовности, желания и способности организации к изменениям
  6. Антиадопционистские изменения текста
  7. Антидокетические изменения текста
  8. Антииудейские изменения текста
  9. Антисепарационистские изменения текста
  10. Апологетические изменения в тексте
  11. Арабском, чтобы вы уразумели.
  12. Аускультация легких, основные правила. Основные дыхательные шумы. Изменения везикулярного дыхания, (ослабление и усиление, саккадированное, жесткое дыхание).


Последнее изменение этой страницы: 2016-05-30; Просмотров: 1715; Нарушение авторского права страницы


lektsia.com 2007 - 2024 год. Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав! (0.338 с.)
Главная | Случайная страница | Обратная связь