Waveform generator

Arbitrary Waveform Generator, AWG

Arbitrary Waveform Generators includes:
Arbitrary waveform generator     Arbitrary function generator     Variable clock AWG    

Signal generator types:     Signal Generator Basics     RF signal generator     Function generator    

Arbitrary waveforms generators can also be referred to by their initials, AWG, and sometimes they are even called and ARB – short for arbitrary.

The waveforms produced by arbitrary waveform generators, AWGs can be either repetitive or sometimes just a single-shot. If the AWG waveform is only a single shot, then a triggering mechanism is needed to trigger the AWG and possibly the measuring instrument.

The AWG is able to generate an arbitrary waveform defined by a set of values, i.e. “waypoints” entered to set the value of the waveform at specific times. They can make up a digital or even an analogue waveform.

As a result an arbitrary waveform generator is a form of test equipment that is able to produce virtually any waveshape that is required.

Arbitrary waveform generators are very similar to function generators, but offer much greater levels of flexibility in terms of waveform generation and they are generally more sophisticated and hence more costly.

Arbitrary Waveform Generator techniques

There are a number of ways of designing arbitrary waveform generators. They are based around digital techniques, and their design falls into one of two main categories:

  • Direct Digital Synthesis, DDS:   This type of arbitrary waveform generator is based around the DDS types of frequency synthesizer, and sometimes it may be referred to as an Arbitrary Function Generator, AFG.
  • Variable-clock arbitrary waveform generator   The variable clock arbitrary function generator is the more flexible form of arbitrary waveform generator. These arbitrary waveform generators are generally more flexible, although they do have some limitations not possessed by the DDS versions. Sometimes these generators are referred to as just arbitrary waveform generators, AWGs rather than arbitrary function generators.
  • Combined arbitrary waveform generator   This format of AWG combines both of the other forms including the DDS and variable clock techniques. In this way the advantages of both systems can be realised within a single item of test equipment.

Arbitrary waveform generator resolution and speed

Two of the main specifications for an arbitrary waveform generator are their resolution and also the speed. These two parameters determine the precision with which the waveform can be reproduced. They are governed by different elements within the arbitrary waveform generator circuit.

The amplitude resolution is governed by the resolution of the digital to analogue converter (D/A or D2A). This is described in terms of the number of bits. A 12 bit resolution provides 4096 amplitude steps.

The speed of the arbitrary waveform generator is also very important. The maximum repetition rate for the waveform is governed by two factors: the length of the waveform in terms of the number of samples required to simulate the waveform and the maximum clock frequency.

For example if the arbitrary waveform generator had a maximum clock frequency of 25 MHz and the waveform had 1000 points, then the maximum repetition rate would be 25 kHz.

If a higher repetition rate was required, then it would be necessary to decrease the number of samples as it would not be possible to increase the clock frequency in the arbitrary waveform generator!

Waveform capture

Before an arbitrary waveform generator can produce a signal it is necessary to enter the points for the required output. There are a number of ways in which the waveform for an arbitrary waveform generator can be captured or generated:

  • Capture a real waveform. This can be done using either a digitiser of a digital oscilloscope.
  • Use in-built waveform editing on the arbitrary waveform generator. Many AWGs have some degree of waveform generation and editing capability built on board, although this may not be as flexible as a full PC based editing solution.
  • Another way is to generate the waveform using software running on a PC. Very sophisticated digital editing software is available for this and allows for many variations to be incorporated.

Either of these methods can be used and then the digital information can be downloaded onto the arbitrary waveform generator to enable it to provide the required output. It should be remembered that not all of the capabilities for waveform capture and entry may be available on all AWGs.

Additional arbitrary waveform generator capabilities

Some arbitrary waveform generators can also operate as conventional function generators. These can include standard waveforms such as sine, square, ramp, triangle, noise and pulse.

Some units include additional built-in waveforms such as exponential rise and fall times, sinx/x, etc..

In this way a single instrument can be sued in a variety of applications, even if the full AWG capability is not required, thereby saving he cost of purchasing a variety of generators for what are very similar purposes.

Some arbitrary waveform generators have the ability to output a pattern of words on a multiple-bit connector to simulate data transmission, combining the properties of both AWGs and digital pattern generators.

Arbitrary waveform generator applications

AWGs are used in many applications where specialised waveforms are required. These can be within a whole variety of sectors of the electronics industry.

Источник: https://www.electronics-notes.com/articles/test-methods/signal-generators/arbitrary-waveform-generator-awg.php

WAVEFORM GENERATOR FEATURES

Generation of sophisticated signals is becoming a requirement as electronics continue to grow in complexity. Contemporary waveform generators are quite powerful; however, they can be difficult for some users because of their complexity, and many people fail to take advantage of all the useful features available to them.

Choosing the appropriate waveform generator can be overwhelming when one is comparing the specifications of different models including digital-to-analog converter resolution, memory depth, sequencing, sweeping, triggering, synchronization, and clock rates and topology. Let’s take a look at some common features of waveform generators.

Waveform generators simplify generation of test signals as well as generate standard functions, arbitrary waveforms, and waveform sequences. Some common waveform generator features include triggering, sweeping, binary modulation, simultaneous load and play, and synchronization outputs.

One can synchronize one or more outputs to an external event with triggering or burst operating mode.

The waveform generator generates a certain number of waveform cycles at a trigger event in burst operating mode, and the number of cycles generated is usually programmable.

One cycle is a single period of the waveform for standard functions and arbitrary waveforms and, for arbitrary sequences, a cycle consists of a complete progression through all waveforms in a sequence.

Sweep operating mode generates a swept-frequency signal. The shape of the waveform remains constant in digital-to-analog converter memory in sweep mode. The start and stop frequencies are often programmable as well as the sweep’s duration. One may also select up, down, or up and down sweep directions on certain waveform generators.

In binary modulation mode an internal or external modulation source is used to switch between two waveforms and this enables amplitude, frequency, and phase shift keying as well as toggling between two arbitrary waveforms or gated signal generation. The modulation source is generally selected between the internal and external sources.

The simultaneous load and play feature enables one to switch between output waveforms seamlessly and provides upload access to the next waveform while the waveform generator is creating its current output waveform.

A number of waveform generators feature synchronization pulses, which can be routed to either the front panel or backplane outputs and are especially useful for creating time marker or trigger output pulses with precise relative position with regard to the output analog waveform or waveforms.

Источник: https://www.circuitspecialists.com/blog/waveform-generator-features/

Radar Basics – Waveform-Generator

The inner structure of the transmitted signal is usually called the Radar Waveform. The general term includes both the very simple pulse modulation (so called “Keyed ON/OFF”- Modulation) and non-linearly internally modulated transmit pulses that are generated in a complicated manner. These signals may have a complex structure for a pulse compression radar.

In general, all modulations used in continuous wave (CW) radar can also be used within the short or long pulse of a pulse radar.

A waveform generator generates the transmitting signal on an IF- frequency. It permits generating predefined waveforms by driving the amplitudes and phase shifts of carried microwave signals.

SAW devices, which were the mainstay of pulse compression in the 1980s, were also the prime mechanism for waveform generation when used as expanders.

Since these waveform signals are used as a reference for the receiver channels too, there are high requirements for the time and frequency stability.

Addresscounter

Memory

D/A Converter

Mixer

set

reset

carry

FF

11-bit
Counter

sine
PROM

cosine
PROM

D

A

D

A

HY

IF-Waveform

Figure 1: an e.g. Block diagram of a digital waveform generator (DWG) for a non-linear compressed pulse

Addresscounter

Memory

D/A Converter

Mixer

Clock 25 MHz

Waveform Start

set

reset

carry

FF

11-bit
Counter

sine
PROM

cosine
PROM

IF

IF-Waveform

D

A

D

A

HY

Figure 1: an e.g. Block diagram of a digital waveform generator (DWG) for a non-linear compressed pulse

Addresscounter

Memory

D/A Converter

Mixer

set

reset

carry

FF

11-bit
Counter

sine
PROM

cosine
PROM

IF-Waveform

D

A

D

A

HY

Figure 1: an e.g. Block diagram of a digital waveform generator (DWG) for a non-linear compressed pulse 1) (interactive picture)

Digital Waveform Generation

Digital Waveform Generation (DWG) is a memory-based Arbitrary Waveform Generator (AWG).

The desired waveform may be described by a mathematical function, and each discrete value of the function is stored as a digital word in a memory.

The memory will be counted using the system clock and provides the values continuously at the output. There, they are converted to an analogue voltage. The individual values of time in quick succession give the synthesized waveform.

The finally waveform is constructed of e.g. 2048 discrete voltage steps here. Its values of amplitude and phase are stored in programmable memories (PROMs). A change of the waveform is only possible by replacing the PROMs by the manufacturer.

In the by the Radartutorial self-developed Didactical Multifunction Radar are used instead of two PROM fast static RAM with a capacity of 64 Kbytes each with 16 bits.

Provided by a laptop via USB, an ATMEL processor can load these memories with the needed values.

Thus, it is possible to generate any waveform, ranging from ultra-short pulses for classical pulse radar, via intrapulse modulation (with subsequent pulse compression) to all forms of modulation of frequency modulated continuous wave radar (FMCW radar).

The processing of an I & Q- phase- detector is arranged reverse virtually. This method of design the transmitting pulses gives the advantage, that the waveform is digitally described for a computer-controlled signal processing. A digital processor can execute the pulse compression now.

1) A very (unusual) low intermediate frequency of 470 kilohertzes was choosen here to visualize the high-frequencies in the schreen-shoots of the oscilloscope.

Description of the modules in the block diagram

Источник: http://www.radartutorial.eu/08.transmitters/Waveform-Generator.en.html

Function & Arbitrary Waveform Generator Guidebook

Function and arbitrary waveform generators are among the most important and versatile pieces of electronic test equipment.

In electronic design and troubleshooting, the circuit under scrutiny often requires a controllable signal to simulate its normal operation.

The testing of physical systems and transducers often needs stable and reliable signals. The signal levels needed range from microvolts to tens of volts or more.

Modern DDS (direct digital synthesis) function generators are able to provide a wide variety of signals. Today's basic units are capable of sine, square, and triangle outputs from less than 1 Hz to at least 1 MHz, with variable amplitude and adjustable DC offset.

Many generators include extra features, such as higher frequency capability, variable symmetry, frequency sweep, AM and FM operation, and gated burst mode.

More advanced models offer a variety of additional waveforms and Arbitrary Waveform Generators can supply user-defined periodic waveforms.

Function generators are used where stable and repeatable stimulus signals are needed. Here are some common uses and users:

  • Research and development
  • Educational institutions
  • Electronic and electrical equipment repair businesses
  • Stimulus/response testing, frequency response characterization, and in-circuit signal injection
  • Electronic hobbyists

To use a function or arbitrary waveform generator to its best advantage, the user should have a basic understanding of the instrument's controls, features, and operating modes.

This guidebook is useful to those with little knowledge of function generators, as well as the experienced technician or engineer who wishes to refresh his/her memory or explore new uses for function generators and more sophisticated arbitrary waveform generators.

First, we will explain the controls of a typical function generator. Next, we will look at the theory of how a DDS function generator works. The next section is on applications and contains the majority of the material in this guidebook. A final section discusses common questions. An appendix provides a glossary of terms related to function generators.

There are a variety of function generators on the market spanning the cost range from a few tens of dollars to tens of thousands of dollars.

Some are dedicated instruments (the ones we will look at in more detail), some are black boxes with USB interfaces and an output terminal, some are plugged into computer or instrumentation buses, and some are software programs that run on a PC to generate waveforms on the parallel port or via a sound card. There are also inexpensive kits for hobbyists.

The software-only function generators tend to be the least expensive and can be attractive for students and hobbyists on a budget. They are also the most limited in frequency capabilities, often just spanning the audio range.

The black boxes are next in cost and have the advantage of portability and low power. They are often intended to operate with laptop computers.

Generators that plug into different buses (e.g., PC, VXI) are appropriate where space is at a premium and a custom measurement system needs to be put together for e.g. a dedicated purpose.

Dedicated benchtop generators are self-contained with the needed controls and display. The more expensive dedicated instruments add features and usually include one or more types of interface connections that allow computer control.

The B&K Precision model 4040DDS function generator shown on the following page is a representative of modern DDS function generators. We will describe the numbered controls and their functions. Thefront panel of this instrument is 225 mm wide by 100 mm tall (8.85 inches by 3.94 inches). The instrument is about 245 mm (9.64 inches) deep and weighs about 2.5 kg (5.5 pounds).

ControlFunctionPurpose
1 Power switch Turns the instrument on and off.
2 Setting adjustment knob Adjusts the parameter selected by the other buttons.
3 Sine wave selection Selects sine wave output.
4 Counter/trigger input Input terminal for frequency counting or external trigger signal. Note there is a maximum signal input rating.
5 Ramp wave selection Selects ramp (triangle) wave output.
6 Modulation signal input Input terminal for external modulation signal. Note there is a maximum signal input rating.
7 Square wave selection Selects square wave output.
8 Synchronization signal output Provides a signal (typically a square wave or pulse) that is in phase with the output signal; often at TTL levels.
9 Amplitude-offset adjustment Knob to adjust either the signal amplitude or DC offset voltage.
10 Signal output Output terminal for the function generator's signal. Usually has a 50 output impedance.
11 Set to counter mode Enables the counter input and displays the frequency of the input signal on item 4.
12 Change utility settings Adjust frequency sweep start frequency, sweep stop frequency, and display intensity.
13 Set DC offset Enable the adjustment of the DC voltage added to the signal output (control 10).
14 Select modulation Selects no modulation, internal AM modulation, external AM modulation, FM modulation deviation, and external FM modulation.
15 % Duty cycle Adjusts the duty cycle or symmetry of the displayed waveform.
16 Sweep Turns the frequency sweep mode on and off and allows selection of a linear sweep or logarithmic sweep.
17 Frequency After pressing this button, the adjustment knob (control 2) will adjust the output signal's frequency.
18 Mode Selects the type of operation: continuous output, trigger repetition rate (sets the interval between the internal trigger; each trigger signal causes the generator to output one period), external trigger, manual trigger (pressing the → button causes one cycle to be output), or external gated (waveform cycles are output while the gate signal is above a threshold).
19 Digit adjustment<\p> Moves the digit selection right.
21 Display Shows the function generator's settings, such as frequency, amplitude, waveform selected, etc.

Two of the common waveforms generated by function generators are the sine and square waves. A graph of a sine wave is shown:

The mathematical representation of the sine wave is

where A is the amplitude in volts, t is time in seconds (the horizontal axis), V is the vertical axis in volts, and f is the frequency of the sine wave in Hz. is the phase of the sine wave (in the graph, the sine wave is shown with a phase of 0).

Two other measures of a sine wave's amplitude are often used: RMS and peak-to-peak voltage. The RMS (root mean square) value is used to measure the heating ability of a waveform.

The RMS voltage value of a periodic waveform is the value of a DC voltage which would deliver the same effective power (or heating ability) to a load as does the periodic waveform. For a sine wave, the RMS amplitude is shown as VRMS in the figure.

The relationship of the RMS amplitude to the amplitude of a sine wave is

It is important to note that RMS value is not the same for other types of waveforms. This relationship to the amplitude only applies to sine waves.

Another measure used for the amplitude is the peak-to-peak voltage

DDS function generators may have the ability to let the user set the amplitude using the peak-to-peak voltage or the RMS voltage.

Some generators let the user set the amplitude in dBm, which represents a power of 1 mW. The voltage that this represents depends on the associated load resistance.

You can calculate the RMS voltage VRMS for a given dBm value and resistance R in from the following equation:

For example, a 0 dBm signal into 50 represents an RMS voltage of 0.2236 volts, but represents 0.7746 volts into a 600 load. Modern equipment is usually referenced to 50 loads, but older equipment often used 600 loads.

A sine wave can also have a DC offset voltage:

The DC offset voltage Vdc moves the whole sinusoidal waveform up and down with respect to the horizontal axis.

A square wave is shown in the following figure:

The equation for this wave is

The frequency shown is 1 Hz with an amplitude of 1 V.

The RMS voltage for the square wave is the same (an easy way to see this is to take the negative-going portion and flip it about the horizontal axis; this is allowed as far as its heating ability is concerned). The peak-to-peak voltage is, again, twice the amplitude voltage and in this case equivalent to twice the RMS voltage.

If a square wave has a DC offset equal to its amplitude, it becomes a pulse waveform (and can be positive or negative).

Most modern function generators use Direct Digital Synthesis (DDS) for generating their output waveforms. Older generators used analog methods, which greatly increased the part count (component count) and made them sensitive to component aging and thermal drift. This section describes how DDS technology works. We ignore the implementation details and just look at the principles.

There are two fundamental ideas of DDS technology:

  1. Generating an arbitrary periodic waveform from a periodic ramp signal.
  2. Generating a digital ramp.

Let's first look at generating an arbitrary periodic waveform from a periodic ramp signal. In the following, to keep things simple, we will only use times t ≥ 0.

We will call the repetitive ramp function R(t):

This ramp R(t) varies linearly between 0 and 1 with period T. Now, suppose we have any arbitrary function f(ξ) that is defined on the interval 0 ≤ ξ 1: break # We're done after one cycle
y = f(phase/float(N))
print “Time = %.2f Sine sample = %5.2f” % (t, y)
clock += 1 # Increment the clock
counter += delta # Increment the counter

main()

When this script is run, it produces the output

Time = 0.00 Sine sample = 0.00
Time = 0.06 Sine sample = 0.38
Time = 0.13 Sine sample = 0.71
Time = 0.19 Sine sample = 0.92
Time = 0.25 Sine sample = 1.00
Time = 0.31 Sine sample = 0.92
Time = 0.38 Sine sample = 0.71
Time = 0.44 Sine sample = 0.38
Time = 0.

50 Sine sample = 0.00
Time = 0.56 Sine sample = -0.38
Time = 0.63 Sine sample = -0.71
Time = 0.69 Sine sample = -0.92
Time = 0.75 Sine sample = -1.00
Time = 0.81 Sine sample = -0.92
Time = 0.88 Sine sample = -0.71
Time = 0.94 Sine sample = -0.38
Time = 1.00 Sine sample = 0.

00

Источник: http://www.bkprecision.com/support/downloads/function-and-arbitrary-waveform-generator-guidebook.html

waveform generator

  • Waveform-Generator — Ein Waveformgenerator ist eine wesentliche Baugruppe eines kohärenten Radargerätes. Der Waveformgenerator erzeugt im Radarsender das Sendesignal auf der Zwischenfrequenz. Das kann einmal nur eine durch die Hüllkurve eines Rechteckimpulses… …   Deutsch Wikipedia
  • Arbitrary waveform generator — An arbitrary waveform generator (AWG) is a piece of electronic test equipment used to generate electrical waveforms. These waveforms can be either repetitive or single shot (once only) in which case some kind of triggering source is required… …   Wikipedia
  • Waveform — Wellenform eines Stereo Musikstücks im freien Audioeditor Audacity Als Waveform, im Deutschen auch Wellenform, wird die grafische Darstellung eines Audio oder anderen elektrischen Signals bezeichnet. Eine Wellenform stellt den zeitlichen Verlauf… …   Deutsch Wikipedia
  • Waveform buffer — In computing, a waveform buffer is a technique for digital synthesis of repeating waveforms. It is common in PC sound cards.The waveform amplitude values are stored in a buffer memory, which is addressed from a phase generator, with the retrieved …   Wikipedia
  • generator — An apparatus for conversion of chemical, mechanical, atomic, or other forms of energy into electricity. [g., a begetter, producer] aerosol g. a device for producing airborne suspensions of small particles for inhalation therapy or experimental …   Medical dictionary
  • Signal generator — A signal generator, also known variously as a test signal generator, function generator, tone generator, arbitrary waveform generator, digital pattern generator or frequency generator is an electronic device that generates repeating or non… …   Wikipedia
  • Function generator — [ http://www.agilent.com/u2761a U2761A] USB Modular Function Generator from Agilent Technologies] A function generator is a piece of electronic test equipment or software used to generate electrical waveforms. These waveforms can be either… …   Wikipedia
  • Digital pattern generator — A digital pattern generator is a piece of electronic test equipment or software used to generate digital electronics stimuli. Digital electronics stimuli are a specific kind of electrical waveform varying between two conventional voltages that… …   Wikipedia
  • electric generator — ▪ instrument Introduction also called  dynamo,         any machine that converts mechanical energy to electricity for transmission and distribution over power lines to domestic, commercial, and industrial customers. Generators also produce the… …   Universalium
  • Unit generator — Unit Generators (or ugens ) are the basic formal unit in many MUSIC N style computer music programming languages. They are sometimes called opcodes (particularly in Csound), though this expression is not accurate in that these are not machine… …   Wikipedia
  • Programmable sound generator — A Programmable Sound Generator is a sound chip that generates sound waves by synthesizing multiple basic waveforms, and often some kind of noise generator, (all controlled by writing data to dedicated registers in the sound chip, hence the name)… …   Wikipedia

Источник: https://translate.academic.ru/waveform%20generator/en/ru/

Arbitrary Waveform Generator, AWG

In this section

  • AWG introduction
  • Arbitrary function generator
  • Variable clock AWG

Arbitrary waveforms generators are a form of function or signal generator that is able to produce an arbitrary waveform defined by a set of values, i.e. “waypoints” entered to set the value of the waveform at different times.

As a result an arbitrary waveform generator is a form of test equipment that is able to produce virtually any waveshape that is required. An arbitrary waveform generator may also run in either a repetitive or a single shot mode.

Arbitrary waveform generators are very similar to function generators, but offer much greater levels of flexibility in terms of waveform generation and they are generally more sophisticated and hence costly.

Arbitrary Waveform Generator techniques

There are a number of ways of designing arbitrary waveform generators. They are based around digital techniques, and their design falls into one of two main categories:

  • Direct Digital Synthesis, DDS:   This type of arbitrary waveform generator is based around the DDS types of frequency synthesizer, and sometimes it may be referred to as an Arbitrary Function Generator, AFG. Read more about the arbitrary function generator
  • Variable-clock arbitrary waveform generator   The variable clock arbitrary function generator is the more flexible form of arbitrary waveform generator. These arbitrary waveform generators are generally more flexible, although they do have some limitations not possessed by the DDS versions. Sometimes these generators are referred to as just arbitrary waveform generators, AWGs rather than arbitrary function generators. Read more about the variable clock arbitrary waveform generator
  • Combined arbitrary waveform generator   This format of AWG combines both of the other forms including the DDS and variable clock techniques. In this way the advantages of both systems can be realised within a single item of test equipment.

Arbitrary waveform generator resolution and speed

Two of the main specifications for an arbitrary waveform generator are their resolution and also the speed. These two parameters determine the precision with which the waveform can be reproduced. They are governed by different elements within the arbitrary waveform generator circuit.

The amplitude resolution is governed by the resolution of the digital to analogue converter (D/A or D2A). This is described in terms of the number of bits. A 12 bit resolution provides 4096 amplitude steps.

The speed of the arbitrary waveform generator is also very important. The maximum repetition rate for the waveform is governed by two factors: the length of the waveform in terms of the number of samples required to simulate the waveform and the maximum clock frequency.

For example if the arbitrary waveform generator had a maximum clock frequency of 25 MHz and the waveform had 1000 points, then the maximum repetition rate would be 25 kHz.

If a higher repetition rate was required, then it would be necessary to decrease the number of samples as it would not be possible to increase the clock frequency in the arbitrary waveform generator!

Waveform capture

Before an arbitrary waveform generator can produce a signal it is necessary to enter the points for the required output. There are a number of ways in which the waveform for an arbitrary waveform generator can be captured or generated:

  • Capture a real waveform. This can be done using either a digitiser of a digital oscilloscope.
  • Use in-built waveform editing on the arbitrary waveform generator. Many AWGs have some degree of waveform generation and editing capability built on board, although this may not be as flexible as a full PC based editing solution.
  • Another way is to generate the waveform using software running on a PC. Very sophisticated digital editing software is available for this and allows for many variations to be incorporated.

Either of these methods can be used and then the digital information can be downloaded onto the arbitrary waveform generator to enable it to provide the required output.

The arbitrary waveform generator is a piece of test equipment that can prove to be immensely useful in many applications. While an arbitrary waveform generator is a very specialised piece of test equipment and as a result it can be expensive, it is nevertheless almost essential in any applications where a specific waveform needs to be generated.

By Ian Poole

. . . .   |   Next >>

Источник: https://www.radio-electronics.com/info/t_and_m/generators/awg-arbitrary-waveform-generator.php

Ссылка на основную публикацию
Adblock
detector
",css:{backgroundColor:"#000",opacity:.6}},container:{block:void 0,tpl:"
"},wrap:void 0,body:void 0,errors:{tpl:"
",autoclose_delay:2e3,ajax_unsuccessful_load:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},beforeOpen:n.noop,afterOpen:n.noop,beforeClose:n.noop,afterClose:n.noop,afterLoading:n.noop,afterLoadingOnShow:n.noop,errorLoading:n.noop},o=0,p=n([]),h={isEventOut:function(a,b){var c=!0;return n(a).each(function(){n(b.target).get(0)==n(this).get(0)&&(c=!1),0==n(b.target).closest("HTML",n(this).get(0)).length&&(c=!1)}),c}},q={getParentEl:function(a){var b=n(a);return b.data("arcticmodal")?b:(b=n(a).closest(".arcticmodal-container").data("arcticmodalParentEl"),!!b&&b)},transition:function(a,b,c,d){switch(d=null==d?n.noop:d,c.type){case"fade":"show"==b?a.fadeIn(c.speed,d):a.fadeOut(c.speed,d);break;case"none":"show"==b?a.show():a.hide(),d();}},prepare_body:function(a,b){n(".arcticmodal-close",a.body).unbind("click.arcticmodal").bind("click.arcticmodal",function(){return b.arcticmodal("close"),!1})},init_el:function(d,a){var b=d.data("arcticmodal");if(!b){if(b=a,o++,b.modalID=o,b.overlay.block=n(b.overlay.tpl),b.overlay.block.css(b.overlay.css),b.container.block=n(b.container.tpl),b.body=n(".arcticmodal-container_i2",b.container.block),a.clone?b.body.html(d.clone(!0)):(d.before("
"),b.body.html(d)),q.prepare_body(b,d),b.closeOnOverlayClick&&b.overlay.block.add(b.container.block).click(function(a){h.isEventOut(n(">*",b.body),a)&&d.arcticmodal("close")}),b.container.block.data("arcticmodalParentEl",d),d.data("arcticmodal",b),p=n.merge(p,d),n.proxy(e.show,d)(),"html"==b.type)return d;if(null!=b.ajax.beforeSend){var c=b.ajax.beforeSend;delete b.ajax.beforeSend}if(null!=b.ajax.success){var f=b.ajax.success;delete b.ajax.success}if(null!=b.ajax.error){var g=b.ajax.error;delete b.ajax.error}var j=n.extend(!0,{url:b.url,beforeSend:function(){null==c?b.body.html("
"):c(b,d)},success:function(c){d.trigger("afterLoading"),b.afterLoading(b,d,c),null==f?b.body.html(c):f(b,d,c),q.prepare_body(b,d),d.trigger("afterLoadingOnShow"),b.afterLoadingOnShow(b,d,c)},error:function(){d.trigger("errorLoading"),b.errorLoading(b,d),null==g?(b.body.html(b.errors.tpl),n(".arcticmodal-error",b.body).html(b.errors.ajax_unsuccessful_load),n(".arcticmodal-close",b.body).click(function(){return d.arcticmodal("close"),!1}),b.errors.autoclose_delay&&setTimeout(function(){d.arcticmodal("close")},b.errors.autoclose_delay)):g(b,d)}},b.ajax);b.ajax_request=n.ajax(j),d.data("arcticmodal",b)}},init:function(b){if(b=n.extend(!0,{},a,b),!n.isFunction(this))return this.each(function(){q.init_el(n(this),n.extend(!0,{},b))});if(null==b)return void n.error("jquery.arcticmodal: Uncorrect parameters");if(""==b.type)return void n.error("jquery.arcticmodal: Don't set parameter \"type\"");switch(b.type){case"html":if(""==b.content)return void n.error("jquery.arcticmodal: Don't set parameter \"content\"");var e=b.content;return b.content="",q.init_el(n(e),b);case"ajax":return""==b.url?void n.error("jquery.arcticmodal: Don't set parameter \"url\""):q.init_el(n("
"),b);}}},e={show:function(){var a=q.getParentEl(this);if(!1===a)return void n.error("jquery.arcticmodal: Uncorrect call");var b=a.data("arcticmodal");if(b.overlay.block.hide(),b.container.block.hide(),n("BODY").append(b.overlay.block),n("BODY").append(b.container.block),b.beforeOpen(b,a),a.trigger("beforeOpen"),"hidden"!=b.wrap.css("overflow")){b.wrap.data("arcticmodalOverflow",b.wrap.css("overflow"));var c=b.wrap.outerWidth(!0);b.wrap.css("overflow","hidden");var d=b.wrap.outerWidth(!0);d!=c&&b.wrap.css("marginRight",d-c+"px")}return p.not(a).each(function(){var a=n(this).data("arcticmodal");a.overlay.block.hide()}),q.transition(b.overlay.block,"show",1*")),b.overlay.block.remove(),b.container.block.remove(),a.data("arcticmodal",null),n(".arcticmodal-container").length||(b.wrap.data("arcticmodalOverflow")&&b.wrap.css("overflow",b.wrap.data("arcticmodalOverflow")),b.wrap.css("marginRight",0))}),"ajax"==b.type&&b.ajax_request.abort(),p=p.not(a))})},setDefault:function(b){n.extend(!0,a,b)}};n(function(){a.wrap=n(document.all&&!document.querySelector?"html":"body")}),n(document).bind("keyup.arcticmodal",function(d){var a=p.last();if(a.length){var b=a.data("arcticmodal");b.closeOnEsc&&27===d.keyCode&&a.arcticmodal("close")}}),n.arcticmodal=n.fn.arcticmodal=function(a){return e[a]?e[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?void n.error("jquery.arcticmodal: Method "+a+" does not exist"):q.init.apply(this,arguments)}}(jQuery)}var debugMode="undefined"!=typeof debugFlatPM&&debugFlatPM,duplicateMode="undefined"!=typeof duplicateFlatPM&&duplicateFlatPM,countMode="undefined"!=typeof countFlatPM&&countFlatPM;document["wri"+"te"]=function(a){let b=document.createElement("div");jQuery(document.currentScript).after(b),flatPM_setHTML(b,a),jQuery(b).contents().unwrap()};function flatPM_sticky(c,d,e=0){function f(){if(null==a){let b=getComputedStyle(g,""),c="";for(let a=0;a=b.top-h?b.top-h{const d=c.split("=");return d[0]===a?decodeURIComponent(d[1]):b},""),c=""==b?void 0:b;return c}function flatPM_testCookie(){let a="test_56445";try{return localStorage.setItem(a,a),localStorage.removeItem(a),!0}catch(a){return!1}}function flatPM_grep(a,b,c){return jQuery.grep(a,(a,d)=>c?d==b:0==(d+1)%b)}function flatPM_random(a,b){return Math.floor(Math.random()*(b-a+1))+a}