You are on page 1of 6

Library Description:

CoDeSys V 3.x
SysPort.library

Document Version 1.0


libdoc_e.dot / V1.0

3S - Smart Software Solutions GmbH Page 1 of 7


SysPort_V3x_E.doc
Library SysPort.library

CONTENT

1 OVERVIEW 1

2 LIBRARY MODULES 2
2.1 SysPortIn 2
2.2 SysPortInD 2
2.3 SysPortInW 2
2.4 SysPortOut 2
2.5 SysPortOutD 3
2.6 SysPortOutW 3

CHANGE HISTORY 4
libdoc_e.dot / V1.0

3S - Smart Software Solutions GmbH Page 3 of 7


SysPort_V3x_E.doc
Library SysPort.library

1 Overview

Please regard: It depends on the target system, which system libraries can be used in the application program.

This library can be used to communicate with external hardware devices via their port
addresses; e.g. realtime clock, graphic controller etc. The port addresses can accessed
reading and writing. The execution is synchronous.

The functions for reading from port addresses:

SysPortIn
SysPortInD
SysPortInW

The functions for writing from port addresses:

SysPortOut
SysPortOutD
SysPortOutW
libdoc_e.dot / V1.0

3S - Smart Software Solutions GmbH Page 1 of 7


SysPort_V3x_E.doc
Library SysPort.library

2 Library modules

2.1 SysPortIn
This function reads the current BYTE-value at the given port address.

The return value of type BYTE contains the read value.


Input Variable Data type Description

ulAddress UDINT Port address

pResult POINTER TO Pointer on error code. See document Runtime Error


UDINT Codes.

2.2 SysPortInD
This function reads the current UDINT-value at the given port address.

The return value of type BYTE contains the read value.


Input Variable Data type Description

ulAddress UDINT Port address

pResult POINTER TO Pointer on error code. See document Runtime Error


UDINT Codes.

2.3 SysPortInW
This function reads the current UDINT-value at the given port address.

The return value of type BYTE contains the read value.


Input Variable Data type Description

ulAddress UDINT Port address

pResult POINTER TO Pointer on error code. See document Runtime Error


UDINT Codes.

2.4 SysPortOut
This function writes the specified BYTE-value on the certain port address.

The return value of type UDINT returns the error code of the operation.
Input Variable Data type Description

ulAddress UDINT Port address

byVal BYTE Value to be written to the port.


libdoc_e.dot / V1.0

3S - Smart Software Solutions GmbH Page 2 of 7


SysPort_V3x_E.doc
Library SysPort.library

2.5 SysPortOutD
This function writes the specified UDINT-value on the certain port address.

The return value of type UDINT returns the error code of the operation.
Input Variable Data type Description

ulAddress UDINT Port address

udVal UDINT Value to be written to the port.

2.6 SysPortOutW
This function writes the specified WORD-value on the certain port address.

The return value of type UDINT returns the error code of the operation.
Input Variable Data type Description

ulAddress UDINT Port address

usVal WORD Value to be written to the port.


libdoc_e.dot / V1.0

3S - Smart Software Solutions GmbH Page 3 of 7


SysPort_V3x_E.doc
Library SysPort.library

Change History
Version Description Date

0.1 Issued 15.06.2007


0.2 Review; Description of the SysPortOut function return 18.07.2007
values adapted.
1.0 Translation acc. german doc version 1.0, Release 18.07.2007
libdoc_e.dot / V1.0

3S - Smart Software Solutions GmbH Page 4 of 7


SysPort_V3x_E.doc

You might also like