en:software:qview:qview_6:qcl_library:dc12rotcut

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

DC12RotCut

D = Device( camming3, camming4)

C = Calculation functions

The DC12RotCut 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 has the ability to synchronize the cut on material via a photocell, positioned before cutting, reading a notch on the material.

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 shearing 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 great, It is likely that these intermediate spaces, the shearing cylinder making a stop. The stop is always in the midpoint between a blade and the subsequent (in the case of a single blade, in the half cylinder on the side opposite the blade).
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)
After preset command, You must control a cylinder axis positioning to the quota:
QUOTA_POS = ROUND_ANGLE - (SPACE_SYNC/2)
Where:
ANG_GIRO = 360° (in the unit of used measure, 360 if 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).
Tha phase correction It is useful in all cases where the encoder resolution (ratio of the number of pulses/Rev encoder and peripheral space path from shearing cylinder), It is not a finite number, or in the case that there's some slippage between the movement of the cylinder and the encoder shaft.
A limitation of the power 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 with the blade during cutting phase (and that is, while it is executing the synchronism).

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)

DC12RotCut (cmCam, cnContM, aslParam, sfChangeExe, sbError)

Parameters:

The array “aslParam” must be at least 16 elements
Master = Axis which carries the material of line
Slave = Cutting cylinder axis

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN CAMMING3
CAMMING4
CmCam Device type to which you can apply the function
IN COUNTER3 cnContM Type of device to be declared in the configuration file (required)
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 and -100 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)
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 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.

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: Incorrect measurement of radius or number of blades
3: Incorrect Slave axis resolution
4: Too small Synchronous space (aslParam[6] parameter)
5: Too small Master Space (of material) between a stretch of synchronism and the other
6: Incorrect Synchronous space (aslParam[6] parametr)
7: Incorrect Percentage of speed (aslParam[10] parameter) in a stretch of synchronism
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

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].
  • 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

;                                TCamp    Count      IntL     IAZero  InG  InGInt
cnContM  COUNTER3       1       2.CNT01     2         X.X          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] = 2	;Sampling time of the "cmCam" device
 
 
MAIN:
 
DC12RotCut (cmCam, cnContM, aslParam, sfChangeExe, 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] = 1		;Phase correction type (1=ingresso ad interrupt)
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
 
MAIN:
 
IF gfStart  AND cmCam:st_prsok
      DC12RotCut (cmCam, cnContM, aslParam, sfChangeExe, sbError)	;Call to 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 = angle_round - (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