This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (************************************************************************************** | |
| * Function Block: FB_IoLink_UC250_Distance | |
| * Version: 1.0 | |
| * Author: WMCP Lab | |
| * Date: 2025-10-25 | |
| * Description: Converts raw IO-Link data from a P+F UC250 sensor to a distance in mm. | |
| * | |
| * Disclaimer: | |
| * This code is provided for educational purposes. The author is not responsible | |
| * for any errors or omissions, or for the results obtained from the use of this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //declaring variables | |
| PROGRAM PLC_PRG | |
| VAR | |
| L_error AT %QX0.6: BOOL; //error light | |
| K_start AT %IX1.0: BOOL; //start button | |
| TimeL: TIME:= T#250MS; | |
| TimeH: TIME:= T#250MS; | |
| Blink_4hz: BLINK; //Creating an instance of the function BLINK | |
| END_VAR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROGRAM PLC_PRG | |
| VAR | |
| //MPS® control console for SysLink | |
| startButton AT %IX1.0: BOOL; | |
| stopButton AT %IX1.1: BOOL; //NC | |
| autoManButton AT %IX1.2: BOOL; | |
| resetButton AT %IX1.3: BOOL; | |
| emergencyBreak AT %IX1.5: BOOL; //NC | |
| startLed AT %QX1.1 : BOOL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROGRAM PLC_PRG | |
| VAR | |
| (* | |
| File : 2021-11-23_Assignment4_Scott_M_v1.4 | |
| Author : M. Scott | |
| Date : 23-11-2021 | |
| Course : Codesys - term 2 | |
| Version : 1.4 | |
| Tested by : John Taylor |