LPTSIGNAL

LPTSIGNAL 1:

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

VAR_INPUT
    PortAddr : UINT;
    PinNo    : INT;
    OnOff    : BOOL;
END_VAR

PortAddr: Address of the port which is available for the desired LPT interface.

PinNo: Number of the pin (Pin 0 .. 7 ) which is to be written by the PLC.

OnOff: State which is to be written to that pin.

Example of calling the function in FBD:

LPTSIGNAL 2:

In the example, bit 7 of port 378 (hex) is set to 1.

Requirements

Development environment

Target system type

PLC libraries to include (Category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_System (System)