Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:appnote:an006 [2017/04/26 16:45] – [Calibrazione del sensore di presenza pezzo] qem103 | en:appnote:an006 [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== AN006 - Example of using and calibrating the HEAD2 device ===== | ||
+ | In this section we want to describe the first steps that will make the first approach to the HEAD2 device.\\ | ||
+ | We can divide in the following sections, the proceed of the operation: | ||
+ | |||
+ | * device declaration in the configuration unit | ||
+ | * introduction of the parameters to correctly calibrate inputs and outputs | ||
+ | * development of the application according to the needs | ||
+ | |||
+ | ==== Device declaration in the configuration unit ==== | ||
+ | |||
+ | As was already explained in the description of the device, you must program properly the configuration unit of application. It is very important to the piece of code that declares the device, here you should indicate the hardware resources to be used to ensure proper operation. It will be the responsibility of the programmer to pick and choose the most appropriate inputs and outputs. For example with the following line of code: | ||
+ | |||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | Heads HEAD2 0002 2.CNT01 3.INP01 X.X X.X 3.OUT01 3.OUT02 3.OUT03 3.OUT04 X.X X.X X.X X.X | ||
+ | </ | ||
+ | |||
+ | You define an HEAD2 device with " | ||
+ | |||
+ | An application that has just inside the device declaration in the configuration unit and a qcl unit that it does not run anything (except WAIT forced) already allows to perform the first operations using the device capabilities. In fact, after you download the application on the instrument and having done work, it can change the parameters, observe the states or give commands to devices using the appropriate monitor from QView.\\ | ||
+ | This is very convenient in the early stages of planning When you just want to make some runs or being debugged.\\ | ||
+ | Ensure that the device operates properly however, some parameters that are configured correctly carrying out a proper calibration to adapt the capabilities of the instrument to the physical issues of the machine. | ||
+ | |||
+ | ==== Correct device parameterization ==== | ||
+ | |||
+ | At this point it is worth recalling how could a machine controlled by the HEAD device: a conveyor belt allows you to move material below some machining heads, This is connected to an encoder that allows the tool to know his speed. It should be noted that this speed is only measured and that there is no control of axis movement.\\ | ||
+ | At the beginning of the tape is usually placed a sensor (optical or mechanical) that determines the presence and length of a piece of material to be processed, it is possible also to use more two sensors at different distances in order to verify the presence of the piece.\\ | ||
+ | The heads are controlled using the digital outputs. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | As you can deduce from the declaration line device they identify three basic elements that are controlled by device: | ||
+ | |||
+ | * the signals from the encoder to detect the speed of the belt | ||
+ | * the signal sent by the sensor piece presence it will also determine the length of the piece of material to be processed | ||
+ | * the heads of processing must be controlled so that fall when below is material and go up when this ends | ||
+ | |||
+ | ==== Calibration for the measurement of the speed tape ==== | ||
+ | |||
+ | === Measure and pulse introduction === | ||
+ | |||
+ | Let us consider the case (widespread) where the bi-directional transducer is a digital encoder directly keyed on the roller axis that moves the tape. You will need to set the correctly //measure// and //pulse// parameters of the device so that it can interpret the pulses arriving at QMove, the instrument then you can calculate the speed of the axis.\\ The //measure// and //pulse// introduction establishes a correspondence between a space in a unit of your choice and a certain number of pulses. In the event that the user already knows the space covered in a round encoder then you'll proceed directly to projecting values.\\ | ||
+ | Let's clarify this concept with an example: If the encoder emits 1000 pulses/Rev and you know that the axis moves about 5 cm When the encoder performs exactly one lap then you can insert the following values: | ||
+ | |||
+ | <code QCL> | ||
+ | AxisX: | ||
+ | AxisX:pulse = 4000 | ||
+ | </ | ||
+ | |||
+ | The //measure// value introduced It also involves choosing a unit of measure of mm for measuring the positions, in the //pulse// parameter Yes it's introduced a value equal to the number of pulses is multiplied for 4. Remember that the // | ||
+ | |||
+ | When the user does not know in advance the measurement parameters, will still be able to make the correct calibration by following these steps: | ||
+ | |||
+ | * through the " | ||
+ | * set //measure// and //pulse// both to value 1 | ||
+ | * move the axis manually by having him make a move a position easily measurable | ||
+ | * read the //posit// value | ||
+ | *now insert the desired measurement unit the measured value in the //measure// parameter and the value of the //posit// parameter in the //pulse// parameter | ||
+ | |||
+ | The encoder resolution is now correctly set. | ||
+ | |||
+ | === Calculation of belt speed === | ||
+ | |||
+ | The device, to calculate the speed at which it moves the tape, count the number of pulses received from the encoder for a short period of time (sampling time), dividing that value for the duration of the interval you get the average speed within the period.\\ | ||
+ | The //tbf// parameter allows you to choose the length of sampling time, was given this possibility to the user because, in the event that the tape moves at very low speed you will have to set a long time. Otherwise it could happen that in sampling time you do not receive sufficient samples to determine the speed.\\ | ||
+ | It is recalled that, a long sampling time involves a rather slow speed update. | ||
+ | |||
+ | Was introduced also a filter software that can be used in the calculation of the band speed. This filter is lowpass and its time constant can be set with the //tfilter// parameter, You can also choose whether to enable this filter when the belt speed undergoes a change in a sample time exceeds a certain parameter. This parameter is set through //dvelf//. This filter returns to avoid a measured value of speed that oscillate too, It can be said that its function is to " | ||
+ | |||
+ | The unit of measurement of the instantaneous speed of the tape is chosen through //unitvel// and //decpt// parameters. You can select the unit of time of speed with //unitvel// parameter: if this is equal to 0 then the speed is measured in Um/min, if is equal to 1 then the speed is measured in Um/s. The //decpt// parameter instead determines whether multiple speed-measuring of fundamental units Um. For example, if the fundamental unit of measure is Um=mm, and unitvel=1 you get the speed indicator in the vel in:\\ | ||
+ | mm/s (with decpt = 0),\\ | ||
+ | cm/s (with decpt = 1),\\ | ||
+ | dm/s (with decpt = 2),\\ | ||
+ | m/s (with decpt = 3).\\ | ||
+ | Later, if needed, we must properly configure the display to adjust the correct decimal point position. | ||
+ | |||
+ | ==== Calibrating presence piece sensor ==== | ||
+ | |||
+ | The presence piece sensors have fixed positions in machine configuration: | ||
+ | The //disti02// and //disti03// parameters allow you to set the distance from the sensors to 2 and 3 from first. | ||
+ | |||
+ | The first sensor will also identify the beginning of the conveyor, whenever this will activate the //posit// parameter and encoder is reset.\\ | ||
+ | In case the sensor piece is a mechanical limit switch It may be necessary to introduce an advance or delay the end of piece than the falling edge of the signal. This can be set with the // | ||
+ | The // | ||
+ | |||
+ | ==== Setup working heads ==== | ||
+ | |||
+ | The machining heads configuration is different from the simple introduction of a value in a parameter. In fact, you must use the appropriate commands (// | ||
+ | The first parameters to be introduced will be the ones using the // | ||
+ | //dist// determines the distance between the first piece present sensor and the head center of work involved,\\ | ||
+ | //mode// determines the function that will have the head,\\ | ||
+ | the //riseadv// and //downlag// parameters configure the advances/ | ||
+ | |||
+ | How to introduce the parameters is as follows: | ||
+ | |||
+ | <code QCL> | ||
+ | [...] | ||
+ | Heads: | ||
+ | Heads:dist = 100 ;set distance to 100 Um from the piece presence sensor | ||
+ | Heads:mode = 1 ;head set as the Sander | ||
+ | Heads: | ||
+ | Heads: | ||
+ | Heads: | ||
+ | Heads: | ||
+ | Heads: | ||
+ | Heads: | ||
+ | Heads: | ||
+ | WRITESET Heads ; | ||
+ | WAIT Heads: | ||
+ | [...] | ||
+ | </ | ||
+ | |||
+ | This procedure (choice of head to be set with the headin parameter, changing parameters, sending the command) must be done even when using read and write commands //WRITEPRG, READPRG, WRITEVAR, READVAR//. | ||
+ | |||
+ | Through // | ||
+ | |||
+ | // | ||
+ | The same mechanism of reading parameters works with the // | ||
+ | |||
+ | When you want to read continuously parameter values for all heads, you can simply use a for cucle to read and store it in an array the parameters in which you are interested: | ||
+ | |||
+ | <code QCL> | ||
+ | [...] | ||
+ | FOR (gbCount=1, gbCount LE 8, 1) ; | ||
+ | Heads: | ||
+ | Heads:dist = gbCount * 10 ; | ||
+ | Heads:mode = 1 ;all honing heads | ||
+ | WRITESET Heads ;send write command | ||
+ | WAIT Heads: | ||
+ | NEXT | ||
+ | [...] | ||
+ | </ | ||
+ | |||
+ | <code QCL> | ||
+ | [...] | ||
+ | FOR (gbCount=1, gbCount LE 8, 1) ; | ||
+ | Heads: | ||
+ | READVARSET Heads ;send read command | ||
+ | WAIT Heads: | ||
+ | Heads: | ||
+ | Heads: | ||
+ | Heads: | ||
+ | NEXT | ||
+ | [...] | ||
+ | </ |