Back to top

The following video goes through the steps needed to create a subprogram (sometimes called User Defined Function Block or UDFB), call the UDFB in another PLC program, and monitor code inside the UDFB while a project is running. This is useful for when similar or identical code needs to be called in multiple locations or for multiple axis.

Attached are two subprograms that can be imported to the Project Explorer of the KAS IDE software. They are companions to the built in GetCtrlErrors function block which has a Q output that lets the user know if there is an active Alarm or Error, and will populate two boolean arrays of size 100 to let the user know which specific Alarms and Errors are currently active.