LPTSIGNAL

This function sets a defined output bit in a Centronics interface to a logical high or low level, and can, for example, be used for run-time measurements with an oscilloscope.
FUNCTION LPTSIGNAL: BOOL
Inputs
VAR_INPUT
PortAddr : UINT;
PinNo : INT;
OnOff : BOOL;
END_VAR
Name | Type | Description |
---|---|---|
PortAddr | UINT | Address of the port which is available for the desired LPT interface. |
PinNo | INT | Number of the pin (pin 0 .. 7 ) to be written by the PLC. |
OnOff | BOOL | State to be written to the pin. |
Sample of calling the function in FBD:

In the example, bit 7 of port 378 (hex) is set to 1.
Prerequisites
Development Environment | Target platform | PLC libraries to be integrated (category group) |
---|---|---|
TwinCAT v3.1.0 | PC or CX (x86, x64, Arm®) | Tc2_System (system) |