-

Y_CA_CamGenerator

Image

This function calculates positions required for various master / slave motion profiles. It was designed to replicate the formulas available in Yaskawa’s CamTool & Cam Editor Windows software and includes additional curve types. The CamData input is a structure of key data points required by the application, including a formula code for generating a pair of master / slave data points at the resolution specified. The output CamTable is a Yt_MS_CamStruct which can be downloaded to the Motion Engine using the Y_CamStructSelect function block.

Parameters

* Parameter Data Type Description Default
VAR_IN_OUT
V CamData Yt_CA_CamSegmentStruct This structure must be populated with the key datapoints required for the cam profile.
V CamTable Yt_MS_CamStruct Cam data structure. Can be downloaded to the motion engine using Y_CamStructSelect.
VAR_INPUT
B Execute BOOL Upon the rising edge, all other function block inputs are read and the function is initiated. To modify an input, change the value and re-trigger the execute input. FALSE
V TableSize UDINT This has been deprecated in v350. The function will now determine the TableSize using the UPPER_BOUND function. There is no need to connect a variable. Calculated using UPPER_BOUND function.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes control before the action is completed, the Done output will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error)
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

• In iCube Engineer, array sizes must be hard coded at design time. The default size of the CamSegmentArray DataType can be changed if more segments are required. Edit the Cam Toolbox’s DataType definition if necessary. The practical limit on the number of segments, however also depends on teh size allocate for Yt_MS_PAIR.

The default size of a Yt_MS_CamStruct is defined in the PLCopen Toolbox as:

Yt_MS_ArrayType:ARRAY[0..2880] OF Y_MS_PAIR.

If the application requires more than 2880 master / slave pairs, this value can be increased by editing the DataTypes Toolbox > DataTypes > MotionBlockTypes definition.

The resolution specified for each point in the CamData STRUCT is resolution of the master. For example, if MasterEnd = 100.0, and the previous segment's MasterEnd = 80.0, and the Resolution = 1.0, then 20 data points will be calculated along the CurveType specified.

SeeYt_CA_CurveType for further details about creating cam profiles.



Error Description

Refer to the Function Block ErrorID List .


 Example

Structured text to load a Yt_CA_CamSegmentStruct :

Example 1


Example 2



 


This help information is valid for iCube Engineer Online Help 2025.6

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