Configuring automatic adjustment parameters. Automatic correction of systematic errors of measuring channels

Table 1 - Instructions for automatic correction of tool parameters

During machining, the cutting edge of the tool must follow exactly along the programmed path. Due to the differences in the instruments used, their dimensions must be taken into account and entered into the control system before starting to play the program. Only in this case can the trajectory be calculated regardless of the parameters of the tools used. Once the tool is installed in the spindle and the corresponding compensation is activated (compensation for its dimensions), the CNC automatically takes this correction into account.

Picture 1 - Instrumental complex

Address H performs length compensation, and address D performs radius compensation.

Length compensation is possible in two ways: in relation to the front plane of the spindle and in relation to the “zero tool”.

Figure 2 – Tool length compensation in relation to the spindle rake plane and to the zero tool

In the first case, the compensation value can only be positive (for the figure Figure 2 Н1=70.832, Н2=81.712, Н3=100.003), in the second case choose “ zero tool", which has null value compensation, and the remaining compensation values ​​can be either positive or negative (for the figure Figure 2 Н1=-20.813, Н2=0, Н3=25.821). In both cases, the compensation values ​​are stored in the corresponding table.

The center of the cutter moves along an equidistant path, parallel to the contour part spaced from it by an amount equal to the radius of the cutter. The equidistant path is also called the path of the cutter center. The compensation values ​​for various instruments are entered into the table; for example: D1=14 (with a cutter diameter of 28 mm); D2=22 (with a cutter diameter of 44 mm). The direction of displacement is determined by looking at the trajectory from top to bottom, that is, from the “+Z” side towards the “-Z” direction.

Figure 3 – Principle of equidistant correction

Along the contour and those frame mates for which the angle of inclination of the tangent remains unchanged, the equidistance is uniquely determined by the parameters of the contour. In other irregular cases of external frame mates, the CNC system calculates the mates of equidistant segments in accordance with instructions G68 or G69.



Figure 4 – Unambiguous definition of an equidistant contour and calculation of external connections of equidistant segments

In the case of irregular mates of internal contours, the CNC system calculates the intersections of equidistant lines to determine the desired trajectory. In some cases, this can lead to complete distortion of the contour. To avoid this, some CNC systems have a “collision control” function.

Figure 5 – Calculation of internal connections of equidistant segments

In order for the CNC system to have time to perform an offset relative to the programmed contour, it is necessary to add an approach section to the initial trajectory. In this section, automatic tool radius correction is activated. Most systems require a distance of at least the tool radius to travel to activate correction. A prerequisite for activating the correction is the presence of a linear movement at the working feed.

Left tool radius compensation – G41. The G41 instruction initiates a positive equidistant offset to the left of the workpiece as viewed in the feed direction. To implement the correction, the cutter radius is programmed in the D-word, and the tool number in the T-word. Together with the G41 instruction, linear movements can be programmed; then activation of equidistant correction will occur “along the path” of movement to the end point of the frame.

N60 G41 X... Y... Z... D...

N65 G41 X... Y... Z...

Tool radius compensation right - G42. The G42 instruction initiates an equidistant offset to the right of the workpiece as viewed in the feed direction. Everything else is identical to instructions G41.

Tool length compensation - G43. Tool length compensation is accomplished by programming the G43 command and the H data word. Typically, length compensation is activated in conjunction with idle movement in the Z axis.

Cancels tool radius and length compensations – G40, G49. Tool length compensation is canceled by programming the G49 or H00 command. Tool radius compensation is canceled by programming G40 or D00 commands. Cancellation of the G40 compensation may be accompanied by straight-line movement in the active plane. In this case, the exit from the equidistant trajectory is carried out “along the path” to the end point of the frame. If circular interpolation functions are active, the action of the G40 instruction must not be accompanied by movement.

Pairing equidistant lines at the junction of frames (along an arc) – G68; along the trajectory of intersection of equidistant lines – G69. The instructions are modal and work with active equidistant correction. Their action boils down to automatic generation arcs (G68) or intersection paths of equidistant lines at the junction of “not smoothly” mating frames. The G68 instruction initiates automatic connection of an equidistant gap using an arc of radius r.

Figure 6 – Automatic connection rupture equidistant along the arc

Instruction G69 initiates automatic connection of the equidistant gap along the intersection path of the equidistant lines.

Figure 7 – Automatic connection of an equidistant gap along the trajectory of the intersection of equidistant lines

Color correction integral component process of processing digitized images. Especially often the need for it arises during prepress photographs: film negatives tend to fade over time, shifting the overall gamut of the image towards blue or red. Digital cameras also do not guarantee perfect quality due to uncontrollable errors manual settings balance. Of course, modern graphic editors have the necessary tools to correct color errors manually, but this is not very effective when processing documents in streams. Fortunately, there is whole line low-cost solutions from third party manufacturers, allowing you to automate the process of color correction of images as much as possible.

AutoEye 2.0 (AutoFX Software)

AutoEye 2.0 is a new version of the popular software product, designed to improve quality digital images due to restoration color details and improving clarity. As before, AutoEye 2.0 is released as either independent program For Windows platforms and Macintosh, or as a plugin for the most common graphic editors: Adobe Photoshop CS, Jasc Paint Shop Pro, as well as Corel Photo Paint and CorelDRAW 9.0. Although all of these programs have built-in image correction tools, AutoEye 2.0 differs favorably from them due to the use of unique proprietary technologies Intelligent Visual Imaging Technologies (for example, the plug-in does not rely on traditional curves and histograms in its work), allowing it to solve the same problems more in a simple way, as well as automate as much as possible and, therefore, speed up their execution.

Thanks to the use of “intelligent” tools, the developers managed to extremely simplify user interface programs. All controls are grouped into three sets: Enhancement (image error correction), Color (color adjustment) and Creative (art processing), and to control all changes made to the image, just single panel, which is undoubtedly much more effective than traveling through numerous dialog boxes and an extensive menu.

Color Mode Controls, in turn, is responsible for adjusting the color of the image. Through the use of advanced blending algorithms and correction tables, the program is not only able to restore colors that have faded when shooting or scanning the original, but also allows its user to change their original gamma - again, with just two or three mouse clicks.

To save preliminary work results without making changes to original file AutoEye 2.0 allows you to save current settings in separately stored profiles. The program accepts files in .psd, .tiff, .bmp, .jpg, .gif, and .png formats as source documents. If the Adobe Photoshop .psd format is selected for processing, information about the layers is saved.

AutoEye 2.0 price $129. The demo version can be downloaded from the developer's website http://www.autofx.com/demo_center.asp.

AliveColors 1.1 (AliveColors)

AliveColors 1.1 is a convenient and easy-to-use entry-level utility that has extensive capabilities for color correction and retouching of digitized images with one button. Efficiency is achieved through the cumulative use of a number of procedures hidden from the user by a simple visual interface.

AliveColors 1.1 includes eight built-in color correction functions, as well as a set of traditional tools for “mechanical” image editing, including tools for selecting, cropping, rotating and inverting the active layer. Although for fine-tuning the user has access to almost all procedural parameters, in most cases the program copes with restoring image quality automatically (Automatic correction by Channels and Automatic correction by Brightness functions).

Along with automatic color correction throughout the document, AliveColors 1.1 allows for more subtle editing, such as sharpening, creating a blur effect, or selectively replacing colors in a selected area of ​​the image. It is noteworthy that the results of all operations performed are displayed in real time in the window preview, and the history saving function allows you to go back a few steps.

AliveColors 1.1 supports the TWAIN protocol, so images can be loaded into the program directly from a scanner or from a computer connected digital video camera. The only drawback would be the excessive limited set formats raster files, known to the program(there are only four .bmp. .tiff, .jpg and .png), however, this limitation applies only to the stand-alone version of the utility, while AliveColors 1.1 is also released as a plug-in for Adobe Photoshop, Corel Photo Paint and Jasc Paint Shop Pro. Along with the full version, the developers offer it free option with reduced functionality (automatic color correction mode is turned off).

Price AliveColors 1.1 27 euros. A demo version can be found on the developer's website at http://www.alivecolors.com.

Color Mechanic Pro (Digital Light & Color)

Color Mechanic Pro is a plugin developed by Digital Light & Color for Adobe Photoshop and Photoshop Elements, which includes a fairly powerful and convenient mechanism for correcting and editing image color. Unlike most programs in its class, Color Mechanic Pro operates color space HSL, and its work is based on algorithms for separate editing of channels with their subsequent connection. Selective analysis and approximation calculations are carried out in full automatic mode. In fact, the user's role is reduced to selecting an object for correction (color control is carried out using HSL hexagons and fine-tuning sliders); At the same time, the plugin supports selection areas created standard tools Photoshop.

In addition to the “full-fledged” version of the plugin, the user is offered its lightweight version Color Mechanic Standard. The main difference between them is that in full version Editing of both RGB and CMYK images is available in 16-bit per channel mode, while in the simplified version it is only available for CMYK. In addition, the full version interface has several auxiliary tools, as well as an unlimited command stack to return to the previous state.

Price Color Mechanic Pro $50. The demo version (it does not allow you to save correction results) can be downloaded from the developer’s website at http://www.colormechanic.com.

Digital ROC Professional (Eastman Kodak Company)

The DIGITAL ROC Professional plug-in is sold under the Kodak brand one of the veterans digital photography, however, the circle of potential users of this program is by no means limited to the owners digital cameras. On the contrary, this tool will be useful to any person who, on duty or in free time you have to face the need to quickly and effectively color correct a problematic image. The plugin provides the ability to both automatically restore a document and subsequently manually adjust the color balance to achieve an optimal result.

DIGITAL ROC Professional's algorithms analyze the color gradients of the loaded image to identify introduced color or overall tonal imbalance caused by poor quality original or hardware calibration error. Based on the results of this analysis, the program generates compensating shade curves in each of color channels(16-bit processing mode is supported). More fine tuning brightness, contrast and color range can subsequently be carried out manually for this purpose, a preview window is provided in the plug-in dialog panel, updated in real time.

DIGITAL ROC Professional works with files received from various sources, including from digital cameras, flatbed and slide scanners. In the latter case, the plugin has additional built-in tools to improve image quality by suppressing traces of film grain.

The plugin is compatible with all Adobe versions Photoshop from 5.0, Jasc Paint Shop Pro 7.0 and later, as well as other applications that support the model Adobe plugins. DIGITAL ROC Professional costs $50, and a demo version of the program can be found on the developer's website at http://www.asf.com.



iCorrect EditLab (Pictographics International Corporation)

iCorrect EditLab a powerful professional tool for automatic color correction of images, released as a plug-in for Adobe Photoshop and a number of other most popular graphic editors. The program mechanism is focused on complete color correction on the scale of the entire document, based on automatic analysis color information contained in the file, recognition of pre-defined sets of shades (for example, the color of the sky, foliage, human skin, etc.), as well as user-specified parameters and current control settings Photoshop color(or other "mother application").

iCorrect EditLab provides a fully automatic mode of operation, however, at each of the color correction steps, the user has the opportunity to agree with the option proposed by the computer or make his own edits to it. The entire editing operation consists of four successive stages. At the first, the program performs balancing according to a neutral shade, determining those areas of the image that should be painted in grey colour medium intensity, thereby eliminating the effect of the so-called color cast. The second step is to find the limiting points for white and black. Next, iCorrect EditLab adjusts the color saturation, as well as the contrast and lightness of the image. Fourth, The final stage the most complex one - the program restores the natural coloring of individual shades.

The cost of iCorrect EditLab is $100. You can find a demo version of the plugin on the developer’s website at

One of the main tasks solved when creating control systems is to ensure the necessary accuracy of the measuring channel and its long-term metrological stability.

A significant component of the overall error of the measuring channel is the systematic error. To be able to correct this error, it is necessary to know how it behaves when the magnitude of the measured signal changes. Its behavior is determined by the form of the real transformation function of the measuring channel, or more precisely by how this function deviates from the ideal one. The ideal characteristic of the measuring channel is linear dependence changes in the signal value at the channel output from the signal value at the channel input. Nature of change real characteristics V general case may not be linear.

No matter how different the behavior of the real transformation function is from the ideal one, all differences can be reduced to the sum of three components - zero offset error, scale error and nonlinearity error (Fig. 1). Dividing the total conversion error into such components is important, first of all, from a practical point of view - determining the value of each component and correcting each of them is carried out in its own way.

The reasons for the appearance of a systematic channel error are primarily related to the instrumental errors of its component units and elements. The zero offset error, as an additive error, is the sum of the zero offset errors operational amplifiers or other elements schematic diagram channel. The scale error is multiplicative in its behavior. It is caused by incorrect setting of the transmission coefficients of the channel circuit elements. To correct the zero offset error and scale error (reducing them to the permissible range) in standard scheme inclusion of elements and assemblies, as a rule, provides for the inclusion of corrective elements - usually trimming resistors.

Correction is carried out at the stage initial setup devices in laboratory conditions using the necessary measuring equipment. However, after the device is placed in real conditions During operation, the error correction carried out may “fall apart” due to the influence of various destabilizing factors on the circuit elements.

Rice. 1. Decomposition of the systematic error of the measuring channel into individual components

The most obvious destabilizing factor is temperature change. Another common factor is instability of power supplies. And finally, another slowly changing factor can contribute to the systematic error - the aging of elements. The action of these factors (their changes during operation of the device) can lead to the fact that the errors corrected at the stage of setting up the device will again go beyond acceptable limits. The general conclusion that follows from this is that such in simple ways It is at least difficult to ensure long-term metrological stability of the device. In particular, this may require the use of precision and expensive element base, which of course you want to avoid.


It is possible to achieve long-term metrological stability when using inexpensive and widespread element base only on the condition that the errors of the elements are constantly (periodically) monitored and corrected. Obviously, it is impossible to constantly make adjustments manually while the device is operating. This can only be achieved by performing these actions automatically. In turn, such a mode can be organized only when the central core of the control and measuring system is implemented as “intelligent” - based on microprocessor technology.

Let's consider first general principles organizing automatic correction systematic errors channel, and then restrictions on its implementation arising from the conditions of real implementation measuring channels.

The linear components of the systematic error (zero offset and scale errors) are determined and corrected using fairly simple approaches.

The constancy of the zero offset error over the entire range of input influences allows us to limit ourselves to just one measurement to determine its value. As can be seen from Fig. 1, with zero input action, the deviation of the real channel conversion function from the ideal one is determined by the zero offset error. Therefore, to determine this error, it is necessary to apply an input signal equal to zero to the channel input and measure the signal value obtained at the channel output. This value will correspond to the determined error. To supply a signal channel input equal to zero, you need to install a key in the input circuit that switches the channel input for the time of error assessment to the common ground bus (Fig. 2, a).

Rice. 2. Construction of input circuits for the possibility of correcting the zero offset error (a) and scale error (b)

It is obvious that correction of the zero offset error will be reduced in the future to subtracting its value from the values ​​at the channel output obtained during current measurements.

The linear nature of the scale error makes it possible to determine its behavior using only one measurement. By connecting a reference voltage source of known magnitude to the input of the measuring channel and measuring its value, it is easy to estimate how many times the obtained result differs from the expected one. In other words, by dividing the value of the measurement result of a reference value by the true value of this value, we obtain a correction factor, which can later be used to correct the results of current measurements. To supply a signal equal to the reference signal to the channel input, you need to install a switch in the input circuit that connects a reference voltage source to the channel input for the duration of the error assessment (Fig. 2b). Correction of the scale error will be reduced to multiplying the channel output values ​​obtained during current measurements by the resulting correction factor.

From the above sequence of actions it is clear that the determination of the correction factor for correcting the scale error must be carried out after determining the zero offset error and taking into account its magnitude.

Of course, if the correction of two linear components of the systematic error is sufficient to reduce the overall channel error within acceptable limits, we can limit ourselves to the described simple techniques reducing the overall channel error. If this is not enough, then it is necessary to identify the behavior of the nonlinear component of the systematic error in order to additionally take into account its magnitude when carrying out current measurements. To accurately determine the nature of the nonlinear behavior of the systematic error, it is necessary to carry out end-to-end control - apply a signal to the channel input from a calibrated voltage source in the entire possible range of its variation and carry out evaluation measurements. Most practical applications are limited to measuring the values ​​of several reference voltage sources. Then the behavior of the real characteristic is interpolated from these several reference points.

Actions to determine the current values ​​of systematic channel errors must be carried out under the control of the microprocessor core program of the control and control systems. The level of systematic error can be monitored periodically. The period for updating error estimates is selected based on the degree of variability of destabilizing factors. In particular, monitoring can be carried out all the time while the control and measuring system is not engaged in current measurements and processing of measurement results. In this case, for each next measurement, an error estimate corresponding to the moment of time immediately preceding the moment of the current measurement will always be ready.

Carrying out periodic automatic correction does not eliminate the need to use any adjustment elements in the nodes of the measuring channel. However, they will not be used to minimize certain errors, but to bring the real channel conversion function to a range where these errors can be correctly estimated.

For example, it may turn out that the real transformation function is located relative to the ideal one as shown in Fig. 3.a. The ideal conversion function shows that the channel is designed to measure positive input voltages, so the negative value of the zero offset error for the real conversion function cannot be estimated. In order for the zero offset error to be assessed, it is necessary to use hardware adjustment elements to bring the real conversion function completely into the positive region of the output voltages.

In the case illustrated in Fig. 3.b. the presence of a scale error leads to the fact that the actual transformation function is higher than the ideal one. When a reference voltage equal to the maximum input voltage is applied to the channel input, the scale error cannot be estimated - at the channel output, the voltage that can be estimated will be limited to the level corresponding to the end point of the scale of the ideal conversion function. The way out of this situation is either to select a smaller reference voltage or to shift the actual conversion function below the ideal one. Biasing the actual conversion function must be done using hardware tuning elements.

Rice. 3. Options for the location of the ideal and real transformation functions of the measuring channel relative to each other

Note that the selection of a correction factor for correcting the scale error can be carried out taking into account the type of nonlinear component of the systematic error. For example, by choosing the slope of the real transformation function relative to the ideal one, it is not difficult to ensure that the nonlinearity errors “halve” (Fig. 4) and thereby the deviations of the real transformation function relative to the ideal one are reduced to a minimum.

Rice. 4. Minimization of the uncorrected nonlinear component of the systematic error.

Nonlinearity errors will be of different signs, and their absolute values smaller in size.

In addition to the systematic errors discussed above, one has to deal with random errors in the measuring channels. The behavior of systematic and random errors is different, so the methods for correcting them are also different. It is known that when the measured quantity is constant over time, the most effective method Reducing random errors is to make multiple changes and then average the results. In this case, the error of the average value of the measurement result decreases by a factor, where n– number of measurements.

Significant difficulties arise when reducing the random error when measuring a time-varying quantity. At the same time, to obtain best estimate of the measured value, a filtering procedure is applied. Depending on the type of transformations used, linear and nonlinear filtering are distinguished, where the implementation of individual procedures can be carried out both in hardware and software.

Filtering can be used not only to suppress interference induced on the input transmission circuits analog signal, and, if necessary, to limit the spectrum of the input signal and restore the spectrum of the output signal (this was already discussed earlier). If necessary, filters with a tunable cutoff frequency can be used.

The use of automatic correction of systematic errors can be considered as adaptation of the channel to its own state. The use of modern element base allows today to implement input circuits that adapt to the characteristics input signal, in particular, to its dynamic range. For such adaptation, an input amplifier with controlled gain is required. If, based on the results of previous measurements, it was possible to establish that the dynamic range of the signal is small compared to the range of the ADC input signal, then the amplifier gain is increased until the dynamic range of the signal corresponds to the operating range of the ADC. In this way, it is possible to minimize the signal sampling error and, consequently, increase the accuracy of measurements. The change in the signal gain at the input is taken into account in software when processing the measurement results by a digital controller.

Conformity assessment criteria dynamic range signal and the operating range of the ADC will be discussed further; methods for adapting the input channel to the frequency properties of the input signal will also be considered.

Getting ready for release new functionality LERS ACCOUNTING. Now, when polling, it will be possible to automatically adjust the device time if it does not coincide with the server time. Naturally, some restrictions are imposed on time correction. Let's consider what restrictions may be imposed by the devices themselves.

Devices and auto-correction

1. The device may not support correction at all, or correction is carried out by undocumented commands. In this case, unfortunately, nothing can be done. If the exchange protocol does not describe or there are no commands that change system time device, this useful feature is not available to us. The time can only be adjusted manually from the instrument panel or through specialized software.

2. It is possible to change the system time via the exchange protocol, but for this you need to set hardware switch on the device itself. It is also difficult to do anything here. Usually, in addition to setting the date and time, this key also allows other interesting activities. For example, setting pulse weights, correction factors, etc. It is clear that no one will turn the key forever to the “anything is possible for everyone” position. Switch hardware key using software is also difficult. Therefore, in this case, the auto-correction of time is also inapplicable.

3. The device allows you to set any time, but records this in the archive of events or errors. Such devices include, for example, KM-5 from TBN. There are no problems here, auto-correction can be easily implemented. There are still some nuances regarding KM-5. For example, setting the time is supported only by devices with software version 2.28 and higher.

4. The device supports correction, but with reservations. For example, correction can be performed 2-3 times a day, each time for no more than 30 seconds. In this case, auto-correction will be performed, but if the device time lags behind more than the maximum possible correction value per day, to install correct date may take several days. At the same time, such devices usually have a hardware key that allows you to select an arbitrary time. But everything about the hardware switch has already been written in paragraph 2.

5. The device can support time correction if a password is set when working with it. In this case, you will have to decide for yourself whether you need auto-correction, since if you still need it, you will need to set a password in the device parameters of the level that allows changing the system time. And any user of the system who has the right to view the list of devices will be able to find out this password. You will have to check the list of users and remove the right to view the list of devices from unwanted users.

Time Zones

Let's consider this situation. Your property is located in a region with a different time zone. The clock, of course, runs according to local time. You start polling the device by turning on auto-correction. After the device is requested current time, it will be compared with the time of the system that conducts the survey. And if the device and the polling service are in different time zones, LERS ACCOUNTING will consider that the device time does not coincide with the local one and make a correction. Now we have a device that in its region has begun to rush or lag for several hours.

Or another scenario that could be happening right now. If the device is in a different time zone and its time is, for example, one hour less, and in system parameters If the maximum time difference between the clock of the device and the server is set to 30 minutes, then after reading the date and time, polling of the device will stop with the error “The time difference between the system and the device is greater than the permissible limit specified in the system settings.”

To eradicate the second problem and prevent the occurrence of the first, the accounting object settings in LERS ACCOUNTING are additional parameter- Timezone.


If the object is located in a different time zone, you need to specify it in the settings. Now the current time of the object will be compared with the system time, taking into account this time zone. The same offset is used for automatic time correction.

Automatic time correction settings

Auto-correction is turned on in the system parameters on the "Poll" tab.

The "Adjust the time on the device clock" checkbox enables or disables the automatic correction function. Now this action is global for all devices that support time correction.
In the "Minimum time discrepancy to apply correction" parameter, you must specify how much the clock must fall behind or advance from the system time in order for the device to be issued a command to correct the clock.

Please note that clock correction is performed at the end of the survey, but only if the discrepancy between the system and the device does not exceed the maximum permissible value, which is specified in the parameter " Maximum difference in time between the system and the device." If the discrepancy exceeds this value, the survey will immediately fail with an error.

List of devices for which automatic time correction is implemented

TBN KM-5, RM-5
Correction is supported only by devices with software version 2.28 and higher. There are no restrictions on the number of corrections per day and on the amount of correction.