-

Y_CA_CamSlave_FeedToLength

Image

CamSlave_FeedToLength was designed for use with camming applications that index a slave axis forward in one direction, and require on the fly adjustments of the actual index length based on a sensor input that occurs while the slave is moving. The sensor input is on the slave axis.


 Parameters

* Parameter Data Type Description Default
VAR_IN_OUT
B Master AXIS_REF A logical reference to the master axis.
B Slave AXIS_REF A logical reference to the slave axis.
V SlavePrms Yt_AX_AxisParameterStruct User Defined DataType declared in the PLCopen Toolbox.
E TriggerData MC_TRIGGER_REF Reference to the trigger signal source. Refer to the PLCopen Plus Function Block Manual for more details.
VAR_INPUT
B Enable BOOL The function will continue to execute every scan while Enable is held high and there are no errors. FALSE
V ProductSize LREAL This value must be the same as the total one way index of the cam profile for this slave. LREAL#0.0
V DistanceAfterLatch LREAL The desired additional travel distance after the registration mark is detected LREAL#0.0
V MaxPosCorrection LREAL Limits the amount of positive correction that can be applied.
V MaxNegCorrection LREAL Limits the amount of negative correction that can be applied.
V AdjustMode #27264 An ENUM for TIME or range of master correction, with the following values:
V MasterDistance LREAL Relative amount the master will travel (in cam master units) from when the function block first executes until the correction is complete. Only used if AdjustMode = Y_AdjustMode#MasterDistance.
V Duration LREAL Time of the correction used if AdjustMode is set for TIME mode
V StartCorrection LREAL Earliest master position where the correction can begin. LREAL#0.0
V FinishCorrection LREAL Latest master position where the correction must be completed. LREAL#0.0
V SensorMinimum LREAL The earliest slave position where a sensor position is valid for correction. LREAL#0.0
V SensorMaximum LREAL The latest slave position where a sensor position is valid for correction. LREAL#0.0 (function block defaults to ProductSize if unconnected.)
V MissedLatchLimit UINT The number of consecutive DefaultDistances allowed to occur without seeing a registration mark in the window, and not cause an Error. Valid registration marks will reset the internal counter. UINT#0 (interpreted as infinite)
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V ActualSize LREAL The actual indexed distance.
V LatchPosition LREAL The slave's position in the CamTable when the latch occurred.
B RecordedPosition LREAL The slaves latch position as reported by MC_TouchProbe.
V LimitedPosCorrection BOOL Indicates that the MaxPosCorrection is limiting the required correction.
V LimitedNegCorrection BOOL Indicates that the MaxNegCorrection is limiting the required correction.
V Adjusting BOOL Indicates that an adjustment is currently taking place (Busy output of Y_SlaveOffset)
V MissedLatch BOOL Indicates that a latch was detected, but it was outside of the window parameters specified.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low.


 Notes


 Missed Latch Detection feature:

There are two parts to this feature.

1) It will report an ErrorID 10021 if the user enters a non zero value for the MissedLatchLimit and a consecutive number of latches are not counted. (To detect a hardware failure or other problem with system such as a sensor blockage.)

2) If latches are detected, but are outside of the SensorMinimum and SensorMaximum range, it is not considered a missed latch in terms of counting up to the MissedLatchLimit. In this condition, the function block will pulse the MissedLatch output to indicate that no correction will be made because the latch is not in the specified area. The user can track the MissedLatch output pulses to make adjustments to the machine, or open the window for first time synchronization of the master and slave.

In Cam Toolbox v204, this function block was modified to report the RecordedPosition as a new output so that applications can use this information to re position or re home the axis after a manual operation without adding a separate MC_TouchProbe function block in the application. The function was also modified to prohibit its internal Y_SlaveOffset from executing if no cam is engaged.


 Error Description

Refer to the Function Block ErrorID List .


 Applications

 Overview of Supporting Function Blocks

 Example

Consider a form fill and seal application as shown below. Feed belts control payout of film for the form fill and seal machine.

Distance After Latch is set to align the end of bag with the cutter/punch

The film drive belt is the slave to a constantly running master. The nominal cam table is shown below. The master cycle is 0 - 1 units and the slave cycle is also between 0 and 1 units.

A sample screen shot of data that must be entered for the system described above is shown in the figure below. Care should be taken to ensure that the input parameters will generate motion that is physically achievable by the slave axis.




In the screen shot of the CamSlave_FeedToLength block shown below, the sensor detects a registration mark at 0.36201 units of the slave cycle. Assuming that the previous registration mark was captured at 0.5 units of the slave cycle, the distance between two successive registrations is 0.86201 units (0.5 + 0.36201). The actual bag length in this case is 0.86201 units.



The calculation for the adjustment required by the slave axis (film feed) to place the film exactly at the cutter/pinch location is explained below:

Correction = Nominal part size (1.0) Actual bag length (0.86201)= -0.1379

This will be the offset added/subtracted (for this cycle) to any previous offsets in the slave position.

A continuous sequence of short, long, short bag lengths is illustrated in the logic analyzer plots below.

The first occurrence of TouchProbe.Done triggers a calculation that results in a short bag. A small negative offset is calculated and can be seen by the dip to negative velocity at the end of the first master cycle. The registration mark in the middle of the second master cycle triggers a calculation that results in a long bag and a positive offset. Notice the spike in slave velocity between 0.65 and 0.86 units of the master cycle. The last registration mark in the middle of the third master cycle triggers a calculation that results in a short bag and a negative offset. Notice the dip in slave velocity between 0.65 and 0.86 units of the master cycle.



 


This help information is valid for iCube Engineer Online Help 2025.6

Copyright © 2025 YASKAWA EUROPE GmbH and © 2025 YASKAWA America, Inc.