Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:software:devices:epicpos [2016/11/17 17:00] – [EPICPOS management] qem103 | en:software:devices:epicpos [2020/07/13 14:54] (current) – qem103 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DEVICE EPICPOS ====== | ||
+ | |||
+ | |||
+ | ====== - Introduction ====== | ||
+ | |||
+ | * The internal device EPICPOS is one tool that resides in the CPU that allows to manage the movement of a mechanical axis with an analog control epicicloidal ramps. | ||
+ | * The main function of the device is to generate a trajectory or "speed profile" | ||
+ | * The speed profile has a epicicloidal trends (trend of progressive soft and progressive) that reduces the stress and the strain of mechanical parts. | ||
+ | * The device also includes a feed-back process on the measurement taken from the transducer This measure appropriately compared is used to generate the feedback. The control voltage for operation is generated by a DAC hardware (Digital to Analogic Converter) present to BUS QMOVE. | ||
+ | * To sync the position detected from the device with the actual axis position, is there a special procedure for movement such " | ||
+ | * The feed-back is the PID+FF type (proportional, | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | |||
+ | ===== - Installation ===== | ||
+ | |||
+ | ==== - Device declaration in the configuration file (.CNF) ==== | ||
+ | |||
+ | In the configuration file (.CNF), the BUS section must be declared so that you have the hardware resources required for the implementation of the EPICPOS device. There must be at least a bi-directional meter and a 16-bit resolution analog output. The device can also be used with an input and an interrupt line for preset search functions.\\ | ||
+ | In the INTDEVICE section of the .CNF file must be add the following definition: | ||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | .. | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | ^:info:^It is necessary that each definition are present on the same line. In case you do not want to assign a resource, for example IAZero, you must enter in the appropriate field the string X.X.^ | ||
+ | |||
+ | where: | ||
+ | |<device name> | ||
+ | |EPICPOS|Keyword that identifies the epicicloidal positioner devices.| | ||
+ | |TCamp|Time sampling device (1÷255 ms).| | ||
+ | |ICont|Bidirectional counter input.| | ||
+ | |IntL|Number of the interrupt line dedicated to the encoder zero pulse during the phase of presets search.\\ Allowed values: 1÷8 (to prevent the device uses this resource, enter the character X).| | ||
+ | |IAZero|Input of enable to acquire the the transducer' | ||
+ | |IOutA|Hardware address of the DAC from analog output.| | ||
+ | |||
+ | === - Example === | ||
+ | |||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | Axis_X | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== - Operation ===== | ||
+ | |||
+ | ==== - Position detection ==== | ||
+ | |||
+ | The EPICPOS device acquires the position of the axis via bi-directional transmitter signals of transducer; these signals are used by an internal counter. The value of this counter not express, genereally, directly the position of the axis in the unit of measure required by your application. The cntratio parameter is used then to express the relationship between the impulses the transducer and the corresponding application units. The permitted values for this parameter are 0,00374 ÷ 4 with five digits of precision. The report must be introduced in the parameter as an integer value, and then multiplied by 100000.\\ | ||
+ | // | ||
+ | |||
+ | === - Decimal point === | ||
+ | |||
+ | If for the selected unit of measure is also provided for the presence of a decimal point, the locations must be represented as an integer value and represent space in units without decimal point. The resolution must be calculated with the same formula and the numerator the greatness without decimal point. The decimal point will be then inserted in the value representing the time viewers (example: as properties in the HMI). | ||
+ | |||
+ | === - Speed === | ||
+ | |||
+ | The speeds are always expressed in whole units of measure in the unit of time choice. From this it emerges that the device must know the location of the decimal point of the unit of measure and this is done with the //decpt// parameter. This parameter can take values 0÷3. | ||
+ | |||
+ | === - Example === | ||
+ | |||
+ | ^:tip:^To activate this device send the INIT command.^ | ||
+ | |||
+ | * You want to represent the positions in centimeters with a decimal point. | ||
+ | * In the space of 18,2 cm the transducer generates 500 pulses. | ||
+ | |||
+ | As told to calculate the resolution you have to consider the space runs represented in terms of the measuring unit mm. The resolution is:\\ | ||
+ | cntratio = (18.2 x 101 / 500) x 100000 = 36400 | ||
+ | |||
+ | The settings must be: | ||
+ | // | ||
+ | // | ||
+ | |||
+ | To run a placement at 146 cm, must type | ||
+ | // | ||
+ | |||
+ | To set a speed of 10 centimeters per second, must type : | ||
+ | // | ||
+ | // | ||
+ | |||
+ | ==== - Analog output adjustment ==== | ||
+ | |||
+ | ^: | ||
+ | |||
+ | For the axis managing, the EPICPOS device using an analog output range ±10 V and 16 bit resolution with sign; with the calibration function this analog output can be command with a costant value in order to test links and functionality. | ||
+ | |||
+ | === - Preliminary motion === | ||
+ | |||
+ | * Remove the emergency condition with the //RESUME// command. | ||
+ | * The state //st_emrg// = 0 | ||
+ | * Enable calibration axis status with the //CALON// command; the //st_cal// state must take a value 1. | ||
+ | * Now you can set the analog voltage with the //vout// parameter; the value is expressed in tenths of a volt (-100 ÷ 100 = -10 ÷ 10 V). It is recommended to introduce low values (5, 10, 15 ... equal to 0.5, 1, 1,5 V). | ||
+ | * When the axis is moving the //frq// parameter indicates the frequency in Hz of the transducer phases. | ||
+ | * The //posit// parameter that shown the position, varies indicating the space covered by axis.\\ If setting a positive voltage the count will decrements, It is necessary to invert the phases of the transducer or reverse the direction in driving. | ||
+ | * You can reverse the direction of the count using the //CNTREV// command. | ||
+ | * If output voltage equal to zero the axis is not stopped, adjust the //offset// parameter pto correct the tension until movement does not stop. The inserted value (each bit corresponds to approximately 0.3 mV), will be added algebraically to the value of the analogue output; This operation allows to compensate for any drift of electronic component, from the QMOVE output and in the driver input. The value is expressed in bits with sign.\\ For an optimal result of calibration this operation must be performed with the system to temperature capacity. | ||
+ | * To disable calibration status send the //CALOFF// command. | ||
+ | * The state //st_cal// = 0 | ||
+ | |||
+ | === - Output adjustment === | ||
+ | |||
+ | The EPICPOS device generate the voltage value of the analogue output on the basis of a ratio between the maximum velocity of the axis and the maximum output voltage. Proportionality is obtained with the //maxvel// parameter, maximum axis speed representative on the analog voltage (10 V). Obviously the axle must behave symmetric compared to analog voltage zero value, Therefore the speed must be the same on both the positive and negative voltages at maximum.\\ | ||
+ | Before to determining the value of maximum velocity, We must establish the unit of time to use for the representation of the velocity in the device; the //unitvel// parameter defines the unit of time of speed (Um/min or Um/s). | ||
+ | |||
+ | === - Theoretical method for the determination of the maximum speed === | ||
+ | |||
+ | The theoretical method is a calculation that was performed on the basis of maximum motor speed. Once established the maximum revolutions per minute declared on the motor, We get the maximum velocity is expressed in the unit of measure the unit of time chosen.\\ | ||
+ | Enter the value of maximum velocity calculated in the //maxvel// parameter. | ||
+ | |||
+ | === - Practical method for determining the maximum speed === | ||
+ | |||
+ | The practical method is based on the reading of the speed detected by the device in the //vel// parameter, provide at the drive a known voltage. To provide the voltage to drive the device should be placed in a position of calibration as described in the previous paragraph. If the system permits, supply voltage operation 10 V and read the speed value in the //vel// parameter. If, on the other hand, is an excerpt of the output voltage (1, 2, ... 5 V), calculate the maximum velocity with a proportion.\\ | ||
+ | Enter the maximum speed value found in //maxvel// parameter. | ||
+ | |||
+ | ==== - Movement ==== | ||
+ | |||
+ | ^: | ||
+ | |||
+ | The procedures described here have allowed us to complete the first phase of setting parameters for the device. Now you can execute the simple movement of the axis. | ||
+ | * Move the axis in a position where we can make a specific area without touching the maximum quota limits. | ||
+ | * Set the current position of the axis to zero, by setting the parameter //posit// = 0. | ||
+ | * Set up the parameters that define the position of the limit switches software: //minpos// = 0 and //maxpos// at the value of the maximum stroke of the axis. | ||
+ | * Set the parameter that defines the time the axis to reach the maximum speed //taccdec// = 100. This parameter is expressed in hundredths of a second (100 = 1 sec.) | ||
+ | * Set the speed of positioning with the //setvel// parameter. | ||
+ | * Set the target quota with the //setpos// parameter. | ||
+ | * Set the parameter // | ||
+ | * If the device is in state of emergency (// | ||
+ | * Start positioning with the //START// comand. To stop the movement give the //EMRG// command. | ||
+ | |||
+ | This first movement was done without the feedback of space. The placement may have been executed with some error introduced by the non-linearity of the components or an imperfection in the maximum velocity calibration. Subsequently enabling space feedback this error goes away. | ||
+ | |||
+ | ==== - PID+FF adjustment ==== | ||
+ | |||
+ | The placement runs in the preceding paragraph has been made without considering any position errors.\\ | ||
+ | To check the correct position of the axis continuously and automatically, | ||
+ | Without going into the merits of a technical description of the theory of regulation, This section describes a series of actions to adjust the parameters that affect this control.\\ | ||
+ | In order to achieve a satisfactory adjustment is sufficient to use only the feedforward and proportional actions; integral and derivative actions are used only for adjustments under special conditions. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === - Feed forward action === | ||
+ | |||
+ | The feed-forward helps make the system more ready on placements, by providing the analog output voltage proportional to the theoretical speed of positioning. In practice it is the component which you performed the placements of the previous chapter.\\ | ||
+ | The contribution of this action can be adjusted with the //feedfw// parameter; This parameter is expressed as 1/1000 speed theoretical portion; so, to introduce such as 98.5% you must set 985 (thousandths). | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === - Proportional action === | ||
+ | |||
+ | This action provides an output proportional to the instantaneous axis position error. The extent of the proportional action is defined by the //pgain// parameter that defines the sensitivity of the system.\\ | ||
+ | The //pgain// parameter is introduced in thousandths; | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === - Integral action === | ||
+ | |||
+ | Integrates the position error of the system over time set in //integt// parameter updating the release until the error is not canceled.\\ | ||
+ | More lower the integration time of the error, more faster the recovery system error, but the system can become unstable, tending to swing. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === - Derivative action === | ||
+ | |||
+ | Anticipates the change of the motion of the system tends to eliminate the overshoot of the positioning. The magnitude of change is calculated over time set in //derivt// parameter.\\ | ||
+ | More higher the time of derivation of error and more faster the transient error recovery system, but if you enter a value that is too high the system becomes unstable, tending to fluctuate. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ==== - Preset search ==== | ||
+ | |||
+ | Searching for presets is a procedure to synchronize the count (//posit// parameter) with the real position of the axis. Can be execute in 3 different ways according to the //prsmode// parameter. | ||
+ | |||
+ | === - Preliminary considerations === | ||
+ | |||
+ | * In order to perform a search preset is need a input (acquired through the BUS QMOVE) we define “enabling zero transducer”. In its path, the axis must turn this entry into a particular point. | ||
+ | * The preset search procedure is started with the //PRESET// command; at the initial stage the count acquired from QMOVE can have any value and can be located anywhere. | ||
+ | * The axis must direct towards the cam allows the upload of preset. Not knowing which way to direct the axis to meet the enable input, search for preset lets you choose with the prsdir parameter two solutions: | ||
+ | * If during the preset search execution is give again the //PRESET// command, the direction of motion of the axis is reversed. | ||
+ | * It is to be noted that the presets quota contained in the //prspos// parameter must always be between the minimum and the maximum quota and that, after you load the preset quota, the axis is automatically positioned to the preset. | ||
+ | * During the preset search the software limits //maxpos// and //minpos// are not enable. | ||
+ | * When you set the search speed zero pulse - //sprsvel// - we must consider that in Mode 0 the input has a hardware filter that delays the acquisition and so influence the precision of the loading. In the 1 mode, the acquisition is execute on interrupt input so the speed is not determinative. We must ensure, however, that the time of zero impulse duration is sufficient to be acquired from the card. In order to know the acquisition time of the entrance and the minimum time of zero pulse signal refer to the technical documentation of the used cards. | ||
+ | |||
+ | Once you start search presets with the //PRESET// command, the axis towards the position where the zero pulse enable input transducer with speed //defined by prsvel//. The // | ||
+ | At this point the behavior depends on the manner of loading selected (Mode 0 or Mode 1). | ||
+ | |||
+ | === - Preset search - Mode 0 === | ||
+ | |||
+ | ^: | ||
+ | |||
+ | To the deactivation of the zero-pulse enable trasducer input, the preset quota is loaded on the counting (parameter // | ||
+ | Next, you disable the // | ||
+ | |||
+ | |Picture 1: preset loading using the only enabling cam.| | ||
+ | |{{ : | ||
+ | |||
+ | === - Preset search - Mode 1 === | ||
+ | |||
+ | ^: | ||
+ | |||
+ | To the deactivation of the zero-pulse enable transducer input, enables reading of the first zero-pulse provided by the transducer and, on this signal, it loads the preset quota in counting (parameter //posit = prspos//). To To allow the load of the preset quota with “Mode 1”, the card which is attached to the zero-pulse translator must transmit this signal on one of the 8 hardware interrupt lines. Moreover, the device must have been defined to use the same hardware interrupt line (See definition in the file .CNF).\\ | ||
+ | Subsequently, | ||
+ | |||
+ | |Picture 2: loading preset using the enable cam and zero-pulse transducer.| | ||
+ | |{{ : | ||
+ | |||
+ | === - Search preset - Mode 2 === | ||
+ | |||
+ | ^: | ||
+ | |||
+ | With this procedure, the preset search does not execute any positioning. The preset quota load command is supply from the activation of the enable input zero encoder and the // | ||
+ | If the input is a continuous load remains activated while, if at power up the input is already active, the first upload is executed only after its deactivation and activation. | ||
+ | |||
+ | ===== - Special functions ===== | ||
+ | |||
+ | ==== - Multi axis management ==== | ||
+ | |||
+ | In some applications you are prompted to place a large number of axes by moving a single axis at a time. The design choice falls on installing just one drive that depending on the axis to be placed electrically connects the motor interested in positioning; | ||
+ | The EANPOS device allows you to control access to the DAC device using the //REGON// and //REGOFF// commands. In this way through the QCL application defines a set of device many axes to be placed; in the definition, all devices use the same DAC resource (// | ||
+ | Normally all devices must be in the // | ||
+ | |||
+ | ==== - Change quota and counting in motion ==== | ||
+ | |||
+ | ^: | ||
+ | |||
+ | In some applications you are prompted to define the target quota during placement, according to external events to the device. This means you can also write to the //setpos// parameter with placements occurring. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | When positioning you can also change the value of the //posit// count. This function is usually used when a device must, under special conditions, continue a speed profile for a very long time, that exceeds the time axis takes to reach the limit quota (//maxpos// or // | ||
+ | |||
+ | ==== - Change speed and moving ramp time ==== | ||
+ | |||
+ | When positioning it is possible to vary the speed of the axis without affecting the location to get to. This can lead to an increase or a decrease in velocity, even more points with the same placement. This is accomplished with new writing in the //setvel// parameter. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | When positioning can be varied even acceleration/ | ||
+ | For special applications the ramp time can be varied even during a change of speed, in this case the new time is put into execution immediately. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== - Delta count ==== | ||
+ | |||
+ | ^:tip:^The command can be sent only if the axis is stopped, condition of st_still = 1.^ | ||
+ | |||
+ | The device always shows the absolute position of the axis; to execute incremental placements it is necessary to have a tool to subtract or add some value to the count (posit) without introducing errors. The change can also count with a direct writing to the new value in the //posit// parameter.\\ | ||
+ | Wanting to steal 100 units of measure you can count:\\ | ||
+ | // | ||
+ | |||
+ | ^:info:^The changing of the value of resolution (// | ||
+ | |||
+ | This operation introduces an error because it imposes the location "// | ||
+ | The //DELCNT// command, count sum an amount equal to the //delta// parameter without losing the fraction part of the position:\\ | ||
+ | // | ||
+ | //DELCNT Axis//\\ | ||
+ | The //DELCNT// command may be sent only with stationary axis (// | ||
+ | |||
+ | === - Example === | ||
+ | |||
+ | Reading the position of the axis is of 2 units and is located at point A. You want to add to the //posit// count three units of measure.\\ | ||
+ | With the instructions: | ||
+ | // | ||
+ | the axis takes the new position B.\\ | ||
+ | With the instructions: | ||
+ | // | ||
+ | //DELCNT Axis//\\ | ||
+ | C position is reached. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Note that with the first instructions the axis took a delta less than 3 units and then introduced an error.\\ | ||
+ | If you need to send //DELCNT// commands in succession, It is convenient to calculate the size to be summed and send once the command; otherwise beware not to send subsequent commands without a read statement on device parameter. | ||
+ | |||
+ | === - Example === | ||
+ | |||
+ | // | ||
+ | //DELCNT Axis//\\ | ||
+ | //WAIT Axis: | ||
+ | // | ||
+ | //DELCNT Axis// | ||
+ | |||
+ | |||
+ | ===== - Commands and parameters table ===== | ||
+ | |||
+ | ==== - Symbols used ==== | ||
+ | |||
+ | The **name** of the parameter, state or command is shown on the left of the table. | ||
+ | |||
+ | **R**\\ | ||
+ | Indicates whether its parameter or state is retentive (upon initialization of the device maintains the previously defined), or the state assumes upon initialization of the device.\\ | ||
+ | If the device does not need to initialize the field " | ||
+ | R = Retentive\\ | ||
+ | 0 = Upon initialization of the device the value is forced to zero.\\ | ||
+ | 1 = Upon initialization of the device the value is forced to one.\\ | ||
+ | - = Upon initialization of the device is presented significant value. | ||
+ | |||
+ | **D**\\ | ||
+ | Indicates **the size of the parameter**.\\ | ||
+ | F = Flag\\ | ||
+ | B = Byte\\ | ||
+ | W = Word\\ | ||
+ | L = Long\\ | ||
+ | S = Single Float | ||
+ | |||
+ | === - Conditions === | ||
+ | |||
+ | Are describes all the **conditions necessary for the parameter is considered correct or because the command is accepted**.\\ | ||
+ | In some cases, limit values are specified for the acceptance of the parameter: If any values outside the limits set, the data is still accepted; therefore appropriate controls of the application must be provided to ensure the proper functioning.\\ | ||
+ | To execute a command, all the conditions must be met; otherwise the command does not execute.\\ | ||
+ | |||
+ | **A**\\ | ||
+ | Indicates the **access mode**.\\ | ||
+ | R = Read.\\ | ||
+ | W = Write.\\ | ||
+ | RW = Read / Write. | ||
+ | |||
+ | ==== - Commands ==== | ||
+ | |||
+ | The commands were ranked by decreasing priority. For example, in the case of contemporary //INIT// and //EMRG// commands, is acquired first the //INIT// command. | ||
+ | |||
+ | ^ Name ^ Conditions | ||
+ | | INIT | st_init = 0 | **Initialization**\\ Initializing command device.\\ If the device is not initialized does not execute the calculations related to the axis and then sits idle. To power up you can download all parameters in DPR; Subsequently, | ||
+ | | EMRG | st_init = 1 | **Emergency**\\ Put the axis in emergency mode, interrupting without deceleration ramp, any ongoing positioning. It also disabled the reaction space of the axis. | | ||
+ | | RESUME | ||
+ | | START | st_init = 1\\ st_regoff = 0\\ st_emrg = 0\\ st_emrg = 0\\ st_still = 1 | **Start**\\ Control the positioning to the setpos quota and //setvel// speed. | ||
+ | | STOP | st_init = 1\\ st_regoff = 0\\ st_emrg = 0\\ st_cal = 0\\ st_still = 0 | **Stop**\\ Stops any ongoing axis positioning. The axis stopped follows the deceleration ramp in use. The axis remains in reaction to space. | ||
+ | | LOOPON | ||
+ | | LOOPOFF | ||
+ | | CNTLOCK | ||
+ | | CNTUNLOCK | ||
+ | | CNTREV | ||
+ | | CNTDIR | ||
+ | | PRESET | ||
+ | | CALON | st_init = 1 | **Calibration ON**\\ The analog output is used as a voltage source; in this case you cannot use it to position the axis. The output value is settable at will through the //vout// variable. | ||
+ | | CALOFF | ||
+ | | MANFW | st_init = 1\\ st_regoff = 0\\ st_prson = 0\\ st_still = 1 | **Manual forward**\\ Controls the forward manual positioning (towards maxpos) at the set speed. | ||
+ | | MANBW | st_init = 1\\ st_regoff = 0\\ st_prson = 0\\ st_still = 1 | **Manual backwar**\\ Controls the backward manual positioning (towards minpos) at the set speed. | ||
+ | | REGOFF | ||
+ | | REGON | st_init = 1\\ st_regoff = 1 | **Regulation OFF**\\ Re enable and updating the DAC, and all the movement commands. | ||
+ | | DELCNT | ||
+ | |||
+ | ==== - Parameters ==== | ||
+ | |||
+ | ^ Name ^ D ^ R ^ A ^ Conditions | ||
+ | | cntratio | ||
+ | | maxpos | ||
+ | | minpos | ||
+ | | prspos | ||
+ | | maxvel | ||
+ | | prsvel | ||
+ | | sprsvel | ||
+ | | toll | L | R | R-W | st_still = 1 | **Tolerance**\\ Defines a count range around the positioning quotas. If the placement ends within this range, it is considered correct. Value expressed in units of measurement (Um).\\ Valid range: -999999 ÷ 999999 | ||
+ | | maxfollerr | ||
+ | | rampmode | ||
+ | | taccdec | ||
+ | | tacc | W | R | R-W | if st_still = 1 writing always\\ enable, if st_still = 0 the new\\ value is saved but\\ processed only if the new times\\ of acceleration\\ and deceleration\\ make it possible to reach\\ the set quota. | ||
+ | | tdec | W | R | R-W | if st_still = 1 writing always\\ enable, if st_still = 0 the new\\ value is saved but\\ processed only if the new times\\ allows you to reach\\ the quota set. | **Deceleration time**\\ Definisce il tempo necessario all' | ||
+ | | tinv | W | R | R-W | No | **Direction inversion delay**\\ Is used to avoid mechanical stress caused by too rapid reversals of direction of motion. The input value is expressed in hundredths of a second.\\ Valid range: from 0 to 999 | | ||
+ | | rtype | B | R | R-W | No | **Reduction type**\\ **0** = The acceleration and deceleration times remain those of the speed set and is decreased proportionally speed.\\ **1** = Are lowered the values of both acceleration and deceleration times and speed. | ||
+ | | stopt | B | R | R-W | No | **Stop type**\\ **0** = When is execute the braking ramp, is completed before speeding up and then braking.\\ **1** = Is immediately executed braking | ||
+ | | toldly | ||
+ | | pgain | W | R | R-W | No | **Proportional ga**\\ By setting the value 1000, the coefficient is 1.000\\ Is the coefficient that is multiplied against the tracking error produces the proportional portion of control output.\\ Valid range: from 0 to 32767 | | ||
+ | | feedfw | ||
+ | | integt | ||
+ | | derivt | ||
+ | | prsmode | ||
+ | | prsdir | ||
+ | | unitvel | ||
+ | | decpt | B | R | R-W | st_still = 1 | **Decimal point**\\ Defines the accuracy with which you wish to set the presets and view the counts in relation to axis.\\ Valid range: from 0 to 3. | | ||
+ | | offset | ||
+ | | setpos | ||
+ | | setvel | ||
+ | | vout | B | 0 | R-W | st_cal = 1 | **Volt out**\\ Is the value of the output voltage, expressed in tenths of a volt, to be used in the calibration procedure. Value expressed in tenths of a V.\\ Valid range: -100 ÷ 100 | | ||
+ | | vel | L | 0 | R | No | **Velocity**\\Is the value of the instantaneous speed of the axis.\\ Value expressed in Um/s or Um/ | ||
+ | | frq | L | 0 | R | No | **Frequency**\\ Is the value of the instantaneous frequency of the axis.\\ Value expressed in Hz. | | ||
+ | | posit | L | R | R-W | if st_still = 1 writing\\ always enabled, if st_still = 0\\ il the new\\ value is stored but\\ processed only if the axis\\ is not decelerating for\\ meet the set quota\\ set. | **Actual position**\\ Is the value of the instantaneous position of the axis. Value expressed in units of measurement (Um).\\ Valid range: -999999 ÷ 999999 | ||
+ | | follerr | ||
+ | | ffwdreg | ||
+ | | propreg | ||
+ | | intreg | ||
+ | | derreg | ||
+ | | delta | L | R | R-W | No | **Delta counter**\\ Is the value that is added to the count when sending a DELCNT command. Value expressed in units of measurement(Um).\\ Valid range: -999999 ÷ 999999 | ||
+ | |||
+ | ==== - States ==== | ||
+ | |||
+ | ^ Name ^ D ^ R ^ A ^ Conditions | ||
+ | | st_init | ||
+ | | st_emrg | ||
+ | | st_toll | ||
+ | | st_prsok | ||
+ | | st_still | ||
+ | | st_prson | ||
+ | | st_movdir | ||
+ | | st_loopon | ||
+ | | st_foller | ||
+ | | st_regoff | ||
+ | | st_cal | ||
+ | | st_cntlock | ||
+ | | st_cntrev | ||
+ | |||
+ | |||
+ | ===== - Limitations ===== | ||
+ | |||
+ | * The //setvel// parameter can be written only if the axis is in constant speed | ||
+ | * The //rampm//, //tacc//, //tdec// and //taccdec// parameters can be written only if the axis is at constant speed; otherwise, the new value will be processed only when building the next ramp whose time is changed. | ||
+ | |||
+ | |||
+ | ===== - Application example ===== | ||
+ | |||
+ | ==== - Configuration file ==== | ||
+ | |||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Module Name: Ex_Epic.CNF | ||
+ | ; Autor: QEM srl Date: 01/05/99 | ||
+ | ; System: QMove1 / QCL3 | ||
+ | ; Functionality: | ||
+ | ; | ||
+ | ; [1] - Sample application using device EPICPOS | ||
+ | ; | ||
+ | |||
+ | ; | ||
+ | ; Constants definition | ||
+ | ; | ||
+ | CONST | ||
+ | |||
+ | ; | ||
+ | ; Variable Definition SYSTEM | ||
+ | ; | ||
+ | SYSTEM | ||
+ | slQuotaPos | ||
+ | slVelAsse | ||
+ | |||
+ | ; | ||
+ | ; Variable Definition GLOBAL | ||
+ | ; | ||
+ | GLOBAL | ||
+ | gfMovMan | ||
+ | ;manual movements | ||
+ | gfMovAuto | ||
+ | ;automatic movements | ||
+ | |||
+ | ; | ||
+ | ; Variable Definition TIMER | ||
+ | ; | ||
+ | TIMER | ||
+ | |||
+ | ; | ||
+ | ; DATAGROUP Definition | ||
+ | ; | ||
+ | ;DATAGROUP | ||
+ | |||
+ | ; | ||
+ | ;Bus Configuration | ||
+ | ; | ||
+ | BUS | ||
+ | 1 | ||
+ | 2 | ||
+ | 3 . | ||
+ | 4 . | ||
+ | |||
+ | ; | ||
+ | ; Variable Definition INPUT | ||
+ | ; | ||
+ | INPUT | ||
+ | ifAvMan | ||
+ | ifInMan | ||
+ | ifStart | ||
+ | ifStop | ||
+ | |||
+ | ; | ||
+ | ; Variable Definition OUTPUT | ||
+ | ; | ||
+ | OUTPUT | ||
+ | ofToll | ||
+ | ofAxeFermo | ||
+ | |||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | ;Name | ||
+ | Axis EPICPOS | ||
+ | |||
+ | END | ||
+ | </ | ||
+ | |||
+ | ==== - EPICPOS management ==== | ||
+ | |||
+ | <code QCL> | ||
+ | ; | ||
+ | ; File Name : TASK_00.MOD | ||
+ | ; Project | ||
+ | ; Description: | ||
+ | ; | ||
+ | |||
+ | ; | ||
+ | ; Initialization work Axis | ||
+ | ; | ||
+ | |||
+ | Axis: | ||
+ | ; | ||
+ | Axis:maxvel = 100000 | ||
+ | ; | ||
+ | Axis:maxpos = 999999 | ||
+ | Axis:minpos = -999999 | ||
+ | Axis: | ||
+ | Axis: | ||
+ | Axis:decpt = 0 ; | ||
+ | Axis: | ||
+ | Axis: | ||
+ | Axis:tacc = 0 ; | ||
+ | Axis:tdec = 0 ; | ||
+ | Axis:tinv = 0 ;Inversion time Axis | ||
+ | Axis:toll = 5 ;Tolerance | ||
+ | Axis:toldly = 10 ; | ||
+ | ; | ||
+ | Axis:rtype = 1 ; | ||
+ | Axis:stopt = 1 ;Type of stop | ||
+ | Axis: | ||
+ | Axis:prspos = 0 ;Preset quota | ||
+ | Axis:prsdir = 0 ;Preset search direction | ||
+ | Axis:prsvel = (20 * Axis: | ||
+ | Axis: | ||
+ | ;(10% of the maximum speed) | ||
+ | Axis:offset = 0 ;Offset voltage | ||
+ | Axis:pgain = 10 ; | ||
+ | Axis:feedfw = 1000 ; | ||
+ | Axis:integt = 0 ;Integral time | ||
+ | Axis:derivt = 0 ;Derivative time | ||
+ | INIT Axis ; | ||
+ | WAIT Axis: | ||
+ | CNTUNLOCK Axis ; | ||
+ | WAIT NOT Axis: | ||
+ | CNTDIR Axis ;Sets the direction of the count | ||
+ | WAIT NOT Axis: | ||
+ | ; | ||
+ | REGON Axis ; | ||
+ | WAIT NOT Axis: | ||
+ | RESUME Axis ;Remove the axis from the emergency state | ||
+ | WAIT NOT Axis: | ||
+ | LOOPON Axis ;Hook the loop of axis reaction | ||
+ | WAIT Axis: | ||
+ | ;axis reaction | ||
+ | IF (slVelAxis EQ 0) ;In case the set of speed | ||
+ | ;the axle is zero | ||
+ | slVelAxis = 50 ;Sets a positioning speed | ||
+ | ENDIF | ||
+ | IF (slQuotaPos EQ 0) ;In the event that the placement quota | ||
+ | ;of the axis is zero | ||
+ | slQuotaPos = 2000 ;Sets a quota of positioning | ||
+ | ENDIF | ||
+ | |||
+ | ; | ||
+ | ; Positioning operations | ||
+ | ; --------------------------------- variables used ----------------------------------- | ||
+ | ; slVelAxis: Adjustable variable that represents the speed of the axis | ||
+ | ; (expressed in % of the maximum speed) | ||
+ | ; slQuotaPos: Adjustable variable that represents the quota of axis positioning | ||
+ | ; ----------------------------------- flag sed --------------------------------------- | ||
+ | ; gfMovMan: Manual operation in progress | ||
+ | ; gfMovAuto: Automatic movement in progress | ||
+ | ; | ||
+ | MAIN: | ||
+ | |||
+ | ; | ||
+ | ; Managing outputs | ||
+ | ; | ||
+ | ofToll = Axis: | ||
+ | ;tolerance state | ||
+ | ofAxisStopped = Axis: | ||
+ | Axis stopped | ||
+ | |||
+ | ; | ||
+ | ; Managing automatic movements | ||
+ | ; | ||
+ | IF ifStart | ||
+ | IF NOT gfMovMan | ||
+ | ;movements | ||
+ | IF Axis: | ||
+ | Axis: | ||
+ | Axis:setpos = slQuotaPos | ||
+ | START Axis ;Execute the start of the axis | ||
+ | gfMovAuto = 1 ; | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | |||
+ | IF ifStop | ||
+ | IF NOT Axis: | ||
+ | STOP Axis ; | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | |||
+ | IF gfMovAuto | ||
+ | ;automatic movement | ||
+ | IF Axis: | ||
+ | gfMovAuto = 0 ; | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | |||
+ | ; | ||
+ | ; Management manual movements | ||
+ | ; | ||
+ | IF ifAvMan | ||
+ | IF NOT (gfMovAuto OR gfMovMan) | ||
+ | ;automatic or manual | ||
+ | IF Axis: | ||
+ | Axis: | ||
+ | MANFW Axis ;Forward axis in manual | ||
+ | gfMovMan = 1 ;Manual movement in progress reports | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | IF ifInMan | ||
+ | IF NOT (gfMovAuto OR gfMovMan) | ||
+ | ;automatic or manual | ||
+ | IF Axis: | ||
+ | Axis: | ||
+ | MANBW Axis ;Forward axis in manual | ||
+ | gfMovMan = 1 ;Manual movement in progress reports | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | IF gfMovMan | ||
+ | IF NOT (ifAvMan OR ifInMan) | ||
+ | ;manual are OFF | ||
+ | STOP Axis ;Stop the axis | ||
+ | gfMovMan = 0 ;Remove the manual movement | ||
+ | ;axis report | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | |||
+ | ; | ||
+ | ; Final operations | ||
+ | ; | ||
+ | WAIT 1 | ||
+ | JUMP MAIN | ||
+ | | ||
+ | END | ||
+ | </ | ||
+ | |||