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

LPTSIGNAL 2: 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:

LPTSIGNAL 3:

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)