en:software:qview:qview_6:qcl_library:dc22rotcut

This translation is older than the original page and might be outdated. See what has changed.

DC22RotCut

D = Device( camming3, camming4)

C = Calculation functions

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 “manual” cut command that is not synchronized to the length of the material that is executed immediately after the command (only for single-blade).

Picture 1

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/1000.
The “Synchronous space” parameter (aslParam[6]) establishes how much space (in degrees) the cutting cylinder keeps his peripheral speed equal to the speed of the line (cutting stroke).
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.

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 “IAZero” (enable input zero pulse).
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/2)

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 (“Synchronous space” )
For clarification see the examples below.

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's some slippage between the movement of the cylinder and the encoder.
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).

By setting to 1 the value of 19 parameter (aslParam[19]), it's possible to control a not synchronized cut (or manual) to the Slave axis. This command is valid only if the cutting cylinder stops at Home position during the cycle. If this does not happen, the command is canceled during the next synchronisation phase.
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.

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. The photocell makes sure that the system takes into account any material slips on your encoder, using the notch as a position reference. In the case, on a piece, the notch is placed is found executing the length of the piece set, plus any fix detected in the previous piece.
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)

DC22RotCut (cmCam, aslParam, sfChangeExe, slMaxVelChM, sbErrore)

Parameters:

The array “aslParam” must be at least 21 elements
Master = Axis which carries the material of line
Slave = Axis that moves the cutting cylinder

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN CAMMING3
CAMMING4
cmCam Device name to which you can apply the function
IN COUNTER3 cnContM Name of device to be declared in the configuration file
IN ARRSYS aslParam[1] L Length of workpiece (UM Master)
IN ARRSYS aslParam[2] L Number of blades into the cutting cylinder [1 ÷ 6]
IN ARRSYS aslParam[3] L Cylinder cutting radius (UM Master) (for calculating speed in the synchro stretch)
IN ARRSYS aslParam[4] L UM Slave (1=degrees, 10=tenths degrees, 100=cents degrees, 1000=housandths degrees)
IN ARRSYS aslParam[5] L Ramp type fpr acc/decel Slave (0=trapezoidal, 1=epicycloidal)
IN ARRSYS aslParam[6] L Synchro Slave Spazio of speed for the cut (UM Slave)
IN ARRSYS aslParam[7] L Input type of Slave correction
0=none
1=interrupt input (***)
2=normal input
IN ARRSYS aslParam[8] L Edge of the input power factor correction (0=descent, 1=ascent)
IN ARRSYS aslParam[9] L Value to load on the counter to the phase correction sensor activation (UM Slave)
IN ARRSYS aslParam[10] L Percentage of extra speed of shearing cylinder from the line, in the stretch at constant speed (%) [-99 ÷ 99]
IN ARRSYS aslParam[11] L Input type to catch notch on material
0=none
1=interrupt input (***)
IN ARRSYS aslParam[12] L Edge of the input for the dell'ingresso per la catch notch on material (0=descent,1=ascent) (*)
IN ARRSYS aslParam[13] L Distance between notch photocell and the center cutting cylinder (UM master) (*)
IN ARRSYS aslParam[14] L On the workpiece: Distance between the notch and the end of the piece. (UM Master) (*)
IN ARRSYS aslParam[15] L 'CodeM' value to set on the cut sector. This value can be read during dynamic operation on 'codeMex'. variables (the values: -99, -100 and -9999 are used internally to the function and cannot be set)
IN ARRSYS aslParam[16] L Maximum line speed (UM master/sec)
IN ARRSYS aslParam[17] L Sampling time of the camming device (msec)
IN ARRSYS aslParam[18] L Quota di HOME per l'asse Slave (UM Slave) (**)
IN ARRSYS aslParam[19] L Not synchronized cutting command (or manual).
The value is reset to 0 internally by the function.
0 = Not activated
1= Activated
(**)
IN ARRSYS aslParam[20] L Cam hooking type
0 = With immediate cut
1 = With cut to measure length piece
(**)
IN ARRSYS aslParam[21] L Max correctable error at once to catch notch on material (0=disabled control) (UM Master) (*)
OUT SYSTEM sfChangeExe F Flag that when is to 1 indicates that the change of parameters on the fly is in executing. Once completed the Exchange parameters, the flag back to 0.
OUT SYSTEM slMaxVelChM L Maximum Master Speed in order to change parameters on the fly.
(UM Master/sec)
OUT SYSTEM sbError B Variable containing the eventual error arising from the function (see the chapter)

(*) = 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)

At each call of the function if errors, these are shown on the error variable (referred to as “sbErrore” on the table).
The values of the variables from 10 onwards are considered “warnings”, reports that do not cause an emergency to the Slave axis. The values below 10, affect the operation causing, in the event of an outbreak in dynamic phase, a stop of the axis.
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, one time and continuously (in a piece of code that runs on every task-round).
  • 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], aslParam[5], aslParam[6], aslParam[10]. If the changed parameter is only length piece (aslParam[1]) the new cam will execute immediately after the cutting in progress (which happens with old length). If the changed parameter is one of the other 3 the new cam will be executing after 2 cuts (in executed and subsequent).
  • 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:

;                        TCamp  CountS  CountMA CountMB IntL IAZero IntLM IAZeroM  InG   InGInt  IoutA   Out
cmCam CAMMING3  1     2.CNT02  2.CNT01     X.X      1   2.INP01   X        X.X    2.INP08 1     2.AN02  X.X

IMPLEMENTATION OF THE FUNCTION ON A TASK

WITHOUT PHOTOCELL ON MATERIAL

INIT:
aslParam[1] = 10000	;Piece length (UM Master)
aslParam[2] = 3		;Cutting blades number into the cutting cylinder
aslParam[3] = 4000	;Cylinder cutting radius (to stroke to vel kost)(UM Master)
aslParam[4] = 10	;UM (10=tenths of a degree)
aslParam[5] = 0		;Ramps type (0=trapezoidal)
aslParam[6] = 400	;Synchronous space for cutting (40°)
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/10)
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	;Maximum Line speed (1000 UMMaster/sec)
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, slMaxVelChM, sbError)	;Call to function
 
IF ifPreset							;Preset Management
	IF gfFrn01
		gfFrn01 = 0
		IF (NOT cmCam:st_camex)
		PRESET cmCam
		gfPresetOn = 1
	ENDIF
ENDIF
ELSE
	gfFrn01 = 1
ENDIF
 
IF gfPresetOn							;Positioning after the Preset
	IF cmCam:st_prsok
		cmCam:setpos = 3600 - (aslParam[6] / 2)	        ;Quota_pos = angle_round - (space_sync/2)
		cmCam:setvel = (10 * cmCam:maxvel) / 100	;10% of max. speed
		START cmCam
		gfPresetOn = 0
	ENDIF
ENDIF
 
IF ifStart                  					;Start input management
	IF gfFrn02
		gfFrn02 = 0
		IF (NOT cmCam:st_camex) AND (NOT sbError)
            		STARTCAM cmCam
		ENDIF
        ENDIF
ELSE
	gfFrn02 = 1
ENDIF
 
IF ifStop			        			;Stop input management
	IF gfFrn03
		gfFrn03 = 0
		IF cmCam:st_camex
         		STOPCAM cmCam
		ENDIF
        ENDIF
ELSE
	gfFrn03 = 1
ENDIF
 
WAIT 1
JUMP MAIN
 
END

WITH PHOTOCELL ON MATERIAL

INIT:
aslParam[1] = 10000	;Piece length (UM Master)
aslParam[2] = 3		;Cutting blades number into the cutting cylinder
aslParam[3] = 4000	;Cylinder cutting radius (to stroke to vel kost)(UM Master)
aslParam[4] = 10	;UM (10=tenths of a degree)
aslParam[5] = 0		;Ramps type (0=trapezoidal)
aslParam[6] = 400	;Synchronous space for cutting (40°)
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/10)
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	;Distance between the notch detection photocell and the center of shearing cylinder
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	;Maximum Line speed (1000 UMMaster/sec)
aslParam[17] = 2	;Sampling time of the "cmCam" device
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  AND cmCam:st_prsok
      DC22RotCut (cmCam, aslParam, sfChangeExe, slMaxVelChM, sbError)	;Function 
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							;Preset Management
	IF gfFrn01
		gfFrn01 = 0
		IF (NOT cmCam:st_camex)
        		PRESET cmCam
	        	gfPresetOn = 1
		ENDIF
        ENDIF
ELSE
	gfFrn01 = 1
ENDIF
 
IF gfPresetOn							;Positioning after the Preset
	IF cmCam:st_prsok
 
		cmCam:setpos = 3600 - (aslParam[6] / 2)	        ;** **Quota_pos = round_angle - (space_sync/2)
		cmCam:setvel = (10 * cmCam:maxvel) / 100	;10% of max. speed.
		START cmCam
		gfPresetOn = 0
	ENDIF
ENDIF
 
IF ifStop				        		;Stop input management
	IF gfFrn03
		gfFrn03 = 0
		IF cmCam:st_camex
          		STOPCAM cmCam
		ENDIF
        ENDIF
ELSE
	gfFrn03 = 1
ENDIF
 
WAIT 1
JUMP MAIN
 
END
  • Last modified: 2019/08/29 17:01