-

Y_Yaskawa_Toolbox FB

Function block Description
Y_YA_Action
This function block is only for demonstration purposes. It is applied in the Enable_F_Template, Enable_ST_Template, Execute_FB_Template, and Execute_ST_Template function blocks to show how the inputs and outputs of nested functions can be interlocked to apply the PLCopen standards for I/O behavior.
Y_YA_Blink Functionality that will toggle an output at the 'Frequency' specified at the input. If 'Frequency' is set to 1.0, then the 'output' will be on for 500 mSec and off for 500 mSec. Note that the actual frequency may be affected by the application scan rate in which this function block is placed.
Y_YA_ByteSwap Functionality to swap the upper and lower byte of a word.
Y_YA_CTUD_Retained
Function block to count up or down and provide users the ability to retain their counters.
Y_YA_ChangeCase Functionality to convert the InputString to an OutputString after modifying the characters to be lower case, upper case, or title case. Title case mode will capitalize the first letter of each word.
Y_YA_CheckSumCalculate_Byte
Function block to calculate and output a check sum for an array of bytes. Checksum value calculated is a byte.
Y_YA_CheckSumCalculate_Word
Function block to calculate a checksum word for an array of bytes.
Y_YA_CheckSumValidate_Byte
Function block to validate a given byte check sum created for an array of bytes.
Y_YA_CheckSumValidate_Word

Function block to validate a given word check sum created for an array of bytes.
Y_YA_CommWatchdog This function block allows the application program to monitor data being transmitted from a master device. If the data does not change within two times the Watchdog period, the OK output goes FALSE to indicate that the heartbeat is not being updated by the master.
Y_YA_DataRecord This function block will record Data into the array. Data can be stored continuously or intermittently. The default datatype for Data to be recorded can be customized by the user to satisfy other recording needs.
Y_YA_DataSort
This function block will sort data from the lowest to highest value of X data. This generic function can be customized for other sorting needs.
Y_YA_DateCompare This function block will calculate the difference between two real time clock values and provide the difference as a real time clock value. The clock values may be obtained using the RealTimeClock function block.
DEC_TO_HEX_Dint This function block converts DINT numeric input into a hexadecimal signed 2s complement STRING output
Y_YA_Enable_FB_Template This function block is a template which can be used when developing functions with Enable type input which adhere to the PLCopen output behavior.
Y_YA_Enable_ST_Template This function block is a template which can be used when developing FUs/FBs in structured text which adhere to the PLCopen output behavior.
Y_YA_Execute_FB_Template This function block is a template which can be used when developing functions/function blocks in Ladder diagram which have Execute type input and adhere to PLCopen output behavior.
Y_YA_Execute_ST_Template This function block is a template which can be used when developing functions/function blocks in Structured text using Execute input and adhere to PLCopen output behavior.
HEX_TO_DEC_Dint This function block converts a hexadecimal signed 2s complement STRING into a base 10 output value as a DINT.
Y_YA_IsInteger This function block checks if InputString is an integer (Any non floating point value such as BYTE, SINT, INT, UINT, DINT, UDINT). If InputString is an integer, Result will be set high. This function block is useful when preparing to copy string data into other datatypes using the STRING_TO_* functions. If the data is corrupt or not an integer when using the STRING_TO_ functions, a String Conversion Exception will occur. This function block helps to eliminate that risk.
Y_YA_IsNumeric If InputString is numeric, Result will be set high. This function block is useful when preparing to copy string data into other datatypes using the STRING_TO_* functions. If the data is corrupt or not a valid number when using the STRING_TO_ functions, a String Conversion Exception will occur. This function block helps to eliminate that risk. Valid strings may include a '+', '-' or '.' character as the first character, otherwise every character must be between or including '0 -9'. If there is an 'E' for scientific notation, another '+' or'-' may immediately follow the 'E'.
Y_YA_LAU This function block generates a linear ramp from a current value to the target value with a slope based on the Rate input on the function block. The input can be continuously changing on the fly.
Y_YA_MovingAverage This function block will provide the MovingAverage of a series of samples. The NewValue can either be streamed continuously or updated only when the Trigger input goes high.
Y_YA_PackByte This function converts 8 BOOL inputs to a single BYTE output.
Y_YA_PackWord This function converts 16 Boolean inputs to a single WORD output.
Y_YA_PID_Control This function block can be used as a generic control loop feedback mechanism. A PID controller calculates an "error" value as the difference between a measured process variable and a desired set point, or reference. PIDParameters must be adjusted to allow the process to provide the proper ControlOutput for a given error situation.
Y_YA_PWM This function block can be used for generally lower performance PWM requirements. For higher performance PWM applications, consider a SLIO PWM remote I/O module.
Y_YA_RangeCheck This function will set the output if the Value input is between the Minimum and Maximum. The check is inclusive, meaning that if Value=Minimum or Value=Maximum, then the output will be on.
Y_YA_RateCalculator This function block determines the frequency and number of occurrences of an event, such as determining the part output rate of a machine. RateCalculator counts the number of times an input 'Sensor' signal produces a rising edge and determines the frequency of that signal with respect to a chosen time period. It can account for real-time changes to the time period.
Y_YA_RealTimeClock This function block provides the controllers real time clock as an Yt_YA_RTC_Struct  containing year, month, day, hour, minute, second, and millisecond.
Y_YA_Scaler This function block performs the calculation y:= mx + b.
Y_YA_SLAU This function block generates an S-curve profile to the input value based on a moving average calculation. First, a slope is calculated based on the ramp input. Second, a moving average is applied to the ramp profile. The input value can be changed continuously on the fly.
Y_YA_StripSpaces This function block will copy an InputString to the OutputString while omitting all space characters (ASCII 32 decimal).
Y_YA_Sweep This function block generates an output that rises and falls between the minimum and maximum outputs specified by the inputs. . The OutputValue increases up to the specified Maximum value , reaches the maximum value and then decrements to the minimum value specified. Once the minimum is achieved, the cycle repeats over. This function block is useful for testing purposes by forcing other portions of application code to be tested with a full range of expected valuesThe OutputValue is changed every scan by the Increment input value
Y_YA_TemperatureControl
This function block contains an autotuning and temperature control solution. Thisblock automatically maintains process temperature to within a few percent of a desired temperature.
Y_YA_UnpackByte This function block converts a byte into discrete bits
Y_YA_UnpackWord This function block separates a word into individual bits.
Y_YA_WindowCheck This function sets the InWindow output high if the InputValue is within +/- (Window/2) of the TargetValue. This function is useful when making a comparison that only relies on the InputValue to be close to the Target, but an exact match is not required.
Y_YA_XYLookup This function block will do a binary search on the XYdata to find the X value, then output the corresponding Y value. This function will perform linear interpolation if the X value is between two data points in the XYData and calculate the appropriate Y value.
Y_YA_GetTaskInterval
Function block that reports the update rate of the task the function block is placed in.
Y_YA_PLC_mSec
This function converts PLC system ticks to a value that counts milliseconds.
Y_YA_PLC_uSec

This function block converts the PLC system ticks to a value that counts mircoseconds.
Y_YA_PI_Control
PI control block calculates an "error" value as the difference between a measured process variable and a desired set point, or reference. This error is used to calculate a control output which can be added to the control variable to drive the measured process variable towards the reference value. PI Parameters must be adjusted to allow the process to provide the proper ControlOutput for a given error situation. This block uses proportional and integral components in the control output calculation. This block does not have derivative gain adjustment.
Y_YA_CTU_Retained
Function block that allows users to count up and retain the counter variable.
Y_YA_CTD_Retained
Function block to count down and retain the counter value.
STRING_TO_BOOL This function checks if the input string contains 'TRUE', 'true', '1', 'BOOL#1'
Y_YA_ForLoopControl_Template
The Y_YA_ForLoopControl_Template function block provides sample code that shows how a FOR loop can be split into batches. This will help prevent a large FOR loop to attempt a run in one task interval starving other tasks.

 


This help information is valid for iCube Engineer Online Help 2025.6

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