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.
Parameters:
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
|
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 | DutyCycle | UINT | DutyCycle / MaxWidth indicates the number of scans the output will be on. | UNIT#0 |
| V | MaxWidth | UINT | The maximum DutyCycle that can be applied. The task interval in which this function block is executed will dictate the cycle period. | UINT#0 |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | TRUE if the function is executing correctly. | |
| B | Output | BOOL | Boolean value of the pulse in the scan. | |
Note:
This functions performance is governed by the task interval in which it is executed. For example, if this function block is executed in a 50 mSec task and MaxWidth is set to 250, the total cycle duration is 50 mSec * 250 = 12.5 seconds with a resolution of 50 mSec. If this function block is executed in a fast task, such as 1 mSec with a MaxWidth of 100, the output could be controlled with a resolution of 1% and updated 10 times per second.