Differences
This shows you the differences between two versions of the page.
en:software:qview:qview_6:qcl_library:dc22rotcut [2017/04/04 16:56] – created qem103 | en:software:qview:qview_6:qcl_library:dc22rotcut [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DC22RotCut ====== | ||
+ | |||
+ | **D = **//Device( camming3, camming4)// | ||
+ | |||
+ | **C = **// | ||
+ | |||
+ | ===== GENERAL DESCRIPTION ===== | ||
+ | |||
+ | The DC22RotCut function __execute the necessary calculations and provides for the writing of the cam table to a CAMMING3 or CAMMING4 devices to execute a //circular fly cut//.__\\ | ||
+ | In particular the function manages the control of an axis (Slave) consisting of a single or multi blade cutting cylinder (maximum 6 blades) by syncing it to the material to be cut by reading the count given by an encoder (Master) placed on the material.\\ | ||
+ | The function has the possibility (opzional) to re-adjust the cutting counting rotary axis (Slave) through a power input that can be plain or to interrupt, placed in a known point of the same axis path.\\ | ||
+ | The function also can the ability to synchronize the cut on material via a photocell, positioned before cutting, reading a notch on the material. | ||
+ | For cutting material to be discarded, the function can be manage the " | ||
+ | |||
+ | Picture 1\\ | ||
+ | {{.: | ||
+ | |||
+ | ===== DETAILED DESCRIPTION ===== | ||
+ | |||
+ | The Slave axis resolution (measure and pulse parameters) should be set so that the unit of measurement of the counter is in degrees, degrees/10, degrees/100 or degrees/ | ||
+ | The " | ||
+ | In the space between the cuts, the shearing cylinder accelerates or decelerates his run in order to be ready to meet the next cut. If the workpiece is greater of cutting cylinder develop plus acceleration and deceleration space, the cutting cylinder stops. The stop is at the point of Home in the case of a single blade, halfway between two blades in the case of a multi-blades.\\ | ||
+ | In the configuration file must be configured (__in any case__) also a COUNTER3 device that is used by the function to manage the photocell on the material. This device will have input encoders count as a reference of the master.\\ | ||
+ | The function should be placed on a point of the application that runs continuously (every logical round of Qmove). To attach the Slave to Master simply give a STARTCAM command after you execute the preset. | ||
+ | |||
+ | ==== PRESET ==== | ||
+ | |||
+ | The preset operation (zero point search) of the cutting cylinder axis, must be done at every system power-up. The preset uses a sensor whose declaration must be made in the configuration of the CAMMINGx device, on the configuration file. This sensor (that can be the same as the one used for power factor correction of the axis) must be declared as " | ||
+ | The preset must reset the count (or upload a share), so when the count value is 0 the blade (or one of the blades) you are exactly on the cutting point (see the picture 1)\\ | ||
+ | Before putting STARTCAM the device to attach the Slave to the Master ou must put the Slave axis in HOME position.\\ | ||
+ | In the event of a Slave axis consisting of **single-balde** cylinder the placement quota will be:\\ | ||
+ | QUOTA_POS = HOME QUOTA | ||
+ | In the case the Slave Axis is composed to a **multi-balde** cylinder the placement quota will be:\\ | ||
+ | QUOTA_POS = ROUND_ANGLE - (SPACE_SYNC/ | ||
+ | |||
+ | Where:\\ | ||
+ | HOME QUOTA = quota placed in the aslParam[18] parameter\\ | ||
+ | ROUND_ANGLE = 360° (in the used unit of measure, if 360 degrees, 3600 if tenths, etc…)\\ | ||
+ | SPACE_SYNC = is the aslParam[6] parameter (" | ||
+ | For clarification see the examples below. | ||
+ | |||
+ | ==== CUTTING CYLINDER AXIS PHASE CORRECTION ==== | ||
+ | |||
+ | Cutting cylinder axis can be phase corrected at every turn through a digital input normal or fast (interrupt).\\ | ||
+ | The phase correction It is useful in all cases in which the relationship between a round cutting cylinder and a tour of the encoder is not an integer number, or in the case that there' | ||
+ | A limitation of the phase correction input is when you use a single-blade cylinder. In this case it is necessary that at the moment of the activation of the phase correction sensor, the cutting cylinder is with the blade in cutting phase (the axis is along the stretch of synchronicity). | ||
+ | |||
+ | ==== NOT SYNCHRONIZED CUT COMMAND (or manual) ==== | ||
+ | |||
+ | By setting to 1 the value of 19 parameter (aslParam[19]), | ||
+ | After setting the manual command, if the slave axis is in the Home position, goes straight to cut and move back into the Home position, where to wait for you to leave again to cut the cutting set. | ||
+ | |||
+ | ==== SYNCHRONIZATION ON THE MATERIAL VIA PHOTOCELL ==== | ||
+ | |||
+ | There is the possibility to synchronize the cutting of the material with a notch on the material (aslParam[11] = 1).\\ | ||
+ | The notch is detected by a photocell fast entering as Qmove interrupt. | ||
+ | In the case of use of the photocell detecting notch on material, you no longer need to give the command to STARTCAM to the slave,as the engagement is done automatically at the first mark detected. | ||
+ | |||
+ | |SPEED GRAPH/TIME OF THE CIRCULAR CUTTING CAM (Picture 2)| | ||
+ | |{{.: | ||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | **DC22RotCut (cmCam, aslParam, sfChangeExe, | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | The array " | ||
+ | Master = Axis which carries the material of line\\ | ||
+ | Slave = Axis that moves the cutting cylinder | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | CAMMING3\\ CAMMING4\\ | ||
+ | | IN | COUNTER3 | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | IN | ARRSYS | ||
+ | | OUT | SYSTEM | ||
+ | | OUT | SYSTEM | ||
+ | | OUT | SYSTEM | ||
+ | |||
+ | (*****) = Optional. To revert only when using a photocell to read the notch on the material.\\ | ||
+ | (%%**%%) = To set/use only in case of single-blade cutting cylinder.\\ | ||
+ | (%%**%%*) = Interrupt can be used only with Slave or power factor correction with catch notch on material (never together) | ||
+ | |||
+ | ==== Error ==== | ||
+ | |||
+ | At each call of the function if errors, these are shown on the error variable (referred to as " | ||
+ | The values of the variables from 10 onwards are considered " | ||
+ | __The error variable must never be reset__ (the function executes automatically when there are no more errors).\\ | ||
+ | The meaning of these values is summarized below:\\ | ||
+ | 0: No errors\\ | ||
+ | 1: Incorrect Slave units of measurement\\ | ||
+ | 2: Length piece, measuring the radius or the number of blades are not correct\\ | ||
+ | 3: Incorrect Slave axis resolution\\ | ||
+ | 4: Insufficient Synchronous space (aslParam[6] parameter)\\ | ||
+ | 5: Insufficient Master Space (of material) between a stretch of synchronism and the other\\ | ||
+ | 6: Incorrect Synchronous space (aslParam[6] parametr)\\ | ||
+ | 7: Incorrect Percentage of extra-speed (aslParam[10] parameter) in a stretch of synchronism\\ | ||
+ | 8: Insufficient Acc or Dec Master speed (move the Home quota further away from synchronicity)\\ | ||
+ | 9: Two catches on interrupt enabled on the same input (modify the aslParam[7] or aslParam[11] parameters)\\ | ||
+ | 10: Warning: Phase correction is not possible (Synchronous sector too small)\\ | ||
+ | 11: Warning: Synchronous Space incorrect (parameter change impossible)\\ | ||
+ | 12: Warning: Percentage of extra speed cut incorrect (parameter change impossible)\\ | ||
+ | 13: Warning: Too small Master Space (of material) between a stretch of synchronism and the other\\ | ||
+ | 14: Warning: Negative Master Space. Proceed with minor variations\\ | ||
+ | 15: Warning: Too small Vkost Space\\ | ||
+ | 16: Warning: Analog saturation Slave during the stretch out of sync\\ | ||
+ | 17: Warning: Master Speed too long for return parameters | ||
+ | |||
+ | === Operation notes === | ||
+ | |||
+ | *The function must be called, within the application, | ||
+ | *The function, in addition to the calculation of the areas, will also write directly on the device. | ||
+ | *In the field of cutting the codeMex takes the value that you set in the aslParam[15] parameter. | ||
+ | *The aslParam[3] parameter (cylinder cutting radius) must be expressed in the same units of the Master (UM Master), in order to have a calculation of the peripheral speed of the cylinder (Slave) comparable with that of line (Master). | ||
+ | *The aslParam[10] parameter need to increase or decrease (in percentage) constant speed in the synchronous space. | ||
+ | *The parameters that you can change on the fly (during operation with engaged cam) are: aslParam[1], | ||
+ | *In the case of use of the photocell detecting notch on material, you no longer need to give the command to STARTCAM to the slave, because the engagement is done automatically at the first notch detected by photocell. | ||
+ | *The function allocate in memory 6 array composed of 60 long each (total 1440 byte), invisible to the user. | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | __**CONFIGURATION OF DEVICES IN THE CONFIGURATION FILE**__ | ||
+ | |||
+ | In the configuration file must be configured two devices. A CAMMING3 (or 4) and a COUNTER3.\\ | ||
+ | They are described below: | ||
+ | <code QCL> | ||
+ | ; TCamp CountS | ||
+ | cmCam CAMMING3 | ||
+ | </ | ||
+ | {{.: | ||
+ | |||
+ | __**IMPLEMENTATION OF THE FUNCTION ON A TASK **__ | ||
+ | |||
+ | __WITHOUT PHOTOCELL ON MATERIAL__ | ||
+ | |||
+ | <code QCL> | ||
+ | INIT: | ||
+ | aslParam[1] = 10000 ; | ||
+ | aslParam[2] = 3 ;Cutting blades number into the cutting cylinder | ||
+ | aslParam[3] = 4000 ; | ||
+ | aslParam[4] = 10 ;UM (10=tenths of a degree) | ||
+ | aslParam[5] = 0 ;Ramps type (0=trapezoidal) | ||
+ | aslParam[6] = 400 ; | ||
+ | aslParam[7] = 1 ;Phase correction type (1=interrupt input) | ||
+ | aslParam[8] = 1 ;Rising of phase correction input (1=acent) | ||
+ | aslParam[9] = 0 ;Quota for uploading to phase correction sensoror (degrees/ | ||
+ | aslParam[10] = 5 ;Speed percentage in + or - in the Synchronous stretch (% vel sync) | ||
+ | aslParam[11] = 0 ;Input type to catch notch on material (0=no) | ||
+ | aslParam[12] = 0 ;Not used | ||
+ | aslParam[13] = 0 ;Not used | ||
+ | aslParam[14] = 0 ;Not used | ||
+ | aslParam[15] = 1000 ;codeM Value to se on the cutting sector | ||
+ | aslParam[16] = 10000 ; | ||
+ | aslParam[17] = 0 ;Home Quota (not used as multi-blade cutting cylinder) | ||
+ | aslParam[18] = 1800 ;Slave Home Quota (not used because multi-blade) | ||
+ | aslParam[19] = 0 ;Not synchronized cutting command (not used because multi-blade) | ||
+ | aslParam[20] = 0 ;Cam hooking type (not used because multi-blade) | ||
+ | aslParam[21] = 0 ;Max correctable error at once to catch notch on material | ||
+ | |||
+ | MAIN: | ||
+ | |||
+ | DC22RotCut (cmCam, aslParam, sfChangeExe, | ||
+ | |||
+ | IF ifPreset ; | ||
+ | IF gfFrn01 | ||
+ | gfFrn01 = 0 | ||
+ | IF (NOT cmCam: | ||
+ | PRESET cmCam | ||
+ | gfPresetOn = 1 | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ELSE | ||
+ | gfFrn01 = 1 | ||
+ | ENDIF | ||
+ | |||
+ | IF gfPresetOn ; | ||
+ | IF cmCam: | ||
+ | cmCam: | ||
+ | cmCam: | ||
+ | START cmCam | ||
+ | gfPresetOn = 0 | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | |||
+ | IF ifStart | ||
+ | IF gfFrn02 | ||
+ | gfFrn02 = 0 | ||
+ | IF (NOT cmCam: | ||
+ | STARTCAM cmCam | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ELSE | ||
+ | gfFrn02 = 1 | ||
+ | ENDIF | ||
+ | |||
+ | IF ifStop | ||
+ | IF gfFrn03 | ||
+ | gfFrn03 = 0 | ||
+ | IF cmCam: | ||
+ | | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ELSE | ||
+ | gfFrn03 = 1 | ||
+ | ENDIF | ||
+ | |||
+ | WAIT 1 | ||
+ | JUMP MAIN | ||
+ | |||
+ | END | ||
+ | </ | ||
+ | |||
+ | __WITH PHOTOCELL ON MATERIAL__ | ||
+ | |||
+ | <code QCL> | ||
+ | INIT: | ||
+ | aslParam[1] = 10000 ; | ||
+ | aslParam[2] = 3 ;Cutting blades number into the cutting cylinder | ||
+ | aslParam[3] = 4000 ; | ||
+ | aslParam[4] = 10 ;UM (10=tenths of a degree) | ||
+ | aslParam[5] = 0 ;Ramps type (0=trapezoidal) | ||
+ | aslParam[6] = 400 ; | ||
+ | aslParam[7] = 2 ;Phase correction type (2=normal digital input) | ||
+ | aslParam[8] = 1 ;Rising of phase correction input (1=ascent) | ||
+ | aslParam[9] = 0 ;Quota for uploading to phase correction sensoror (degrees/ | ||
+ | aslParam[10] = 5 ;Speed percentage in + or - in the Synchronous stretch (% vel sync) | ||
+ | aslParam[11] = 1 ;Input type to catch notch on material (1=inp interr.) | ||
+ | aslParam[12] = 1 ;Input rising to catch notch on material (1=ascent) | ||
+ | aslParam[13] = 1000 ; | ||
+ | aslParam[14] = 200 ;On the workpiece: Distance between the notch and the end of the piece (UM Master) | ||
+ | aslParam[15] = 1000 ;codeM Value to se on the cutting sector | ||
+ | aslParam[16] = 10000 ; | ||
+ | aslParam[17] = 2 ;Sampling time of the " | ||
+ | aslParam[18] = 1800 ;Slave Home Quota (not used because multi-blade) | ||
+ | aslParam[19] = 0 ;Not synchronized cutting command (not used because multi-blade) | ||
+ | aslParam[20] = 0 ;Cam hooking type (not used because multi-blade) | ||
+ | aslParam[21] = 30 ;Max correctable error at once to catch notch on material | ||
+ | |||
+ | MAIN: | ||
+ | |||
+ | IF gfStart | ||
+ | DC22RotCut (cmCam, aslParam, sfChangeExe, | ||
+ | ENDIF | ||
+ | |||
+ | ;gfStart is a flag that indicates that the Slave is enable to receive one start and automatic movement | ||
+ | ;(The function will also start taking place with the first pulse of photocell) | ||
+ | |||
+ | IF ifPreset ; | ||
+ | IF gfFrn01 | ||
+ | gfFrn01 = 0 | ||
+ | IF (NOT cmCam: | ||
+ | PRESET cmCam | ||
+ | gfPresetOn = 1 | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ELSE | ||
+ | gfFrn01 = 1 | ||
+ | ENDIF | ||
+ | |||
+ | IF gfPresetOn ; | ||
+ | IF cmCam: | ||
+ | |||
+ | cmCam: | ||
+ | cmCam: | ||
+ | START cmCam | ||
+ | gfPresetOn = 0 | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | |||
+ | IF ifStop | ||
+ | IF gfFrn03 | ||
+ | gfFrn03 = 0 | ||
+ | IF cmCam: | ||
+ | STOPCAM cmCam | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | ELSE | ||
+ | gfFrn03 = 1 | ||
+ | ENDIF | ||
+ | |||
+ | WAIT 1 | ||
+ | JUMP MAIN | ||
+ | |||
+ | END | ||
+ | </ | ||