F_IOPortRead
Most times a digital I/O port is a one byte wide I/O Position, which is mapped in the memory or as port. If you write a value at this place, the electrical signal at the output pins is changed according to the written bits.If you read a value from the input positon, the current logistic level is returned at the input pins as individual bit values.
The function F_IOPortRead reads a one eSize wide I/O position. The read value is returned from the function as return value. See description of the function F_IOPortWrite
FUNCTION F_IOPortRead : DWORD
VAR_INPUT
nAddr : UDINT;
eSize : E_IOAccessSize;
END_VAR
nAddr: I/O Port address.
eSize: Number of data byte to be read.
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v2.10.0 Build > 1257 | PC or CX (x86) | TcSystem.Lib |