Nombre Libreria FED‐CEC CPX‐CEC CECX‐C1 CECX‐M1 Proveedor Notas PD =Por defecto SysLibCallback.lib si si, PD si si 3S, Adaptadas This library provides the functions SysCallbackRegister and SysCallbackUnregister, which serve to activate defined callback functions for runtime events. SysLibCom.lib si si si 3S, Adaptadas This library supports the serial communication with a target system. If the target system provides the functionality, then the following library functions can be used to open or close a serial port and to read or write data via this port (The execution is synchronous.): SysLibDir.lib si si si 3S, Adaptadas handle a file directory system on the target system. Entries of the directory can be read and modified. The execution is synchronous. SysLibDirect.lib si si The functions of this library serve to access variables by indices with which they are referenced in the runtime system. For detailed information see the description of the particular runtime system. SysLibEvent.lib si si si 3S, Adaptadas This library serves to synchronize and control the processing of two (IEC‐) tasks. SysLibFile.lib si si si si 3S, Adaptadas Manjo de Archivos SysLibFileAsync.lib si si si 3S, Adaptadas This library supports asynchronous file access from the IEC‐application SysLibFileStream.lib si si si 3S, Adaptadas This library provides functions which correspond to ANSI C functions for file stream operations. The execution is synchronous. SysLibGetAddress.lib si si si si 3S, Adaptadas the start address and the size of a data segment (Memory, Input, Output, Retain or Global) in a DWORD SysIECTasks.lib si si si 3S, Adaptadas this library can be used to call information on the configuration of IEC tasks. (To create, delete, prioritize, stop and restart a task you can use the library SysLibTasks.lib.) The execution is synchronous. SysLibInitLibrary.lib si si This library contains a function which can be used to initialize an external library, which is available as an obj‐file. The execution is synchronous. SysLibInt.lib use this library to set and remove an interrupt handler for a function. The execution is synchronous. SysLibMem.lib si si si si 3S, Adaptadas This library can be used for memory management. If the target system supports the functionality, the following library functions are available to allocate, to free, to define, to compare memory locations and to copy, move or swap between different memory locations. The execution is synchronous. SysLibPciCards.lib This library is designed for access to a Pci card plugged to the Plc SysLibPLCConfig.lib si si si 3S, Adaptadas This library supports the reading of the configuration data of the PLC Configuration SysLibPlcCtrl.lib si si This library contains the following functions for controlling a PLC. The execution is synchronous. SysLibPorts.lib 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. SysLibProjectInfo.lib si si si 3S, Adaptadas then the functions contained in this library can be used to read the Project Info (CoDeSys Menu 'Project' 'Project Info') respectively the Project ID. SysLibRtc.lib si si si si 3S, Adaptadas This library contains functions for accessing the realtime clock of the local system SysLibSem.lib si si si 3S, Adaptadas This library can be used to create and use semaphores for the synchronization of tasks. The semaphores serve to avoid any concurrent access on critical data, which are used by several tasks. SysLibShm.lib si si This library provides functions for accessing a memory area which is used in common by several processes resp. referencing a physical address (Shared‐ Memory, shortcut ShM). SysLibSockets.lib si si si si 3S, Adaptadas This library supports the access on sockets for the communication via TCP_IP and UDP. SysLibSocketsAsync.lib si si si 3S, Adaptadas This library offers the same functionality as SysLibSockets.lib, however function blocks instead of functions are used and the processing is asynchronous. SysLibStr.lib si si si si 3S, Adaptadas This library provides functions for string operations. If the target system is supporting the functionality, the following functions can be used to compare or copy strings or to retrieve the length of a string. The execution is synchronous. SysLibSymbols.lib si 3S, Adaptadas SysLibTasks.lib si si si 3S, Adaptadas can be used to manage tasks. That means to generate, to delete, to modify priority level, to stop and restart tasks. The execution is synchronous. SysLibTime.lib si si, PD si si 3S, Adaptadas This library provides function blocks for reading the realtime clock of the local system. The execution is synchronous. por desglosar SysLibVisu.lib si 3S, Adaptadas por desglosar SysTaskInfo.lib si, PD si si 3S, Adaptadas por desglosar NetVarUdp_LIB_V23.lib si en dir en dir 3S, Adaptadas por desglosar ModbusTCPSrv.lib si si si 3S Modules for communicating via Modbus TCP. Festo_EasyIP.lib si en dir en dir Festo Modules for easy data exchange between EasyIP‐compatible controllers and devices. Festo_Motion.lib si no esta Festo Modules for parameterising and controlling motor units and motor controllers from Festo. Festo_CPX.lib si Festo Function blocks for the CPX valve terminal. Festo_CPX_extern.lib si Festo Hidden library that is loaded automatically in a CPX‐CEC project. FestoMotion_V0.2.lib en dir no esta The library provides functions that are required by other Festo libraries. Standard.lib si, PD si 3S, Standard libraries for CoDeSys Modules that the IEC61131‐3 requires as standard modules for an IEC programming system.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Nombre Libreria FED‐CEC CPX‐CEC CECX‐C1 CECX‐M1 Proveedor Notas
PD =Por defecto
SysLibCallback.lib si si, PD si si 3S, Adaptadas
This library provides the functions SysCallbackRegister and
SysCallbackUnregister, which serve to activate defined callback functions for
runtime events.
SysLibCom.lib si si si 3S, Adaptadas
This library supports the serial communication with a target system. If the
target system provides the functionality, then the following library functions
can be used to open or close a serial port and to read or write data via this port
(The execution is synchronous.):
SysLibDir.lib si si si 3S, Adaptadashandle a file directory system on the target system. Entries of the directory can
be read and modified. The execution is synchronous.
SysLibDirect.lib si siThe functions of this library serve to access variables by indices with which they
are referenced in the runtime system. For detailed information see the
description of the particular runtime system.
SysLibEvent.lib si si si 3S, AdaptadasThis library serves to synchronize and control the processing of two (IEC‐) tasks.
SysLibFile.lib si si si si 3S, Adaptadas Manjo de Archivos
SysLibFileAsync.lib si si si 3S, Adaptadas This library supports asynchronous file access from the IEC‐application
SysLibFileStream.lib si si si 3S, AdaptadasThis library provides functions which correspond to ANSI C functions for file
stream operations. The execution is synchronous.
SysLibGetAddress.lib si si si si 3S, Adaptadasthe start address and the size of a data segment (Memory, Input, Output,
Retain or Global) in a DWORD
SysIECTasks.lib si si si 3S, Adaptadas
this library can be used to call information on the configuration of IEC tasks. (To
create, delete, prioritize, stop and restart a task you can use the library
SysLibTasks.lib.) The execution is synchronous.
SysLibInitLibrary.lib si si This library contains a function which can be used to initialize an external
library, which is available as an obj‐file. The execution is synchronous.
SysLibInt.libuse this library to set and remove an interrupt handler for a function. The
execution is synchronous.
SysLibMem.lib si si si si 3S, Adaptadas
This library can be used for memory management. If the target system
supports the functionality, the following library functions are available to
allocate, to free, to define, to compare memory locations and to copy, move or
swap between different memory locations. The execution is synchronous.
SysLibPciCards.lib This library is designed for access to a Pci card plugged to the Plc
SysLibPLCConfig.lib si si si 3S, AdaptadasThis library supports the reading of the configuration data of the PLC
Configuration
SysLibPlcCtrl.lib si siThis library contains the following functions for controlling a PLC. The execution
is synchronous.
SysLibPorts.libcan 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.
SysLibProjectInfo.lib si si si 3S, Adaptadas then the functions contained in this library can be used to read the Project Info
(CoDeSys Menu 'Project' 'Project Info') respectively the Project ID.
SysLibRtc.lib si si si si 3S, AdaptadasThis library contains functions for accessing the realtime clock of the local
system
SysLibSem.lib si si si 3S, Adaptadas
This library can be used to create and use semaphores for the synchronization
of tasks. The semaphores serve to avoid any concurrent access on critical data,
which are used by several tasks.
SysLibShm.lib si siThis library provides functions for accessing a memory area which is used in
common by several processes resp. referencing a physical address (Shared‐
Memory, shortcut ShM).
SysLibSockets.lib si si si si 3S, AdaptadasThis library supports the access on sockets for the communication via TCP_IP
and UDP.
SysLibSocketsAsync.lib si si si 3S, Adaptadas This library offers the same functionality as SysLibSockets.lib, however function
blocks instead of functions are used and the processing is asynchronous.
SysLibStr.lib si si si si 3S, AdaptadasThis library provides functions for string operations. If the target system is
supporting the functionality, the following functions can be used to compare or
copy strings or to retrieve the length of a string. The execution is synchronous.
SysLibSymbols.lib si 3S, Adaptadas
SysLibTasks.lib si si si 3S, Adaptadas can be used to manage tasks. That means to generate, to delete, to modify
priority level, to stop and restart tasks. The execution is synchronous.
SysLibTime.lib si si, PD si si 3S, AdaptadasThis library provides function blocks for reading the realtime clock of the local
system. The execution is synchronous.
por desglosar SysLibVisu.lib si 3S, Adaptadas
por desglosar SysTaskInfo.lib si, PD si si 3S, Adaptadas
por desglosar NetVarUdp_LIB_V23.lib si en dir en dir 3S, Adaptadas
por desglosar ModbusTCPSrv.lib si si si 3S Modules for communicating via Modbus TCP.
Festo_EasyIP.lib si en dir en dir FestoModules for easy data exchange between EasyIP‐compatible controllers and
devices.
Festo_Motion.lib si no esta FestoModules for parameterising and controlling motor units and motor controllers
from Festo.
Festo_CPX.lib si Festo Function blocks for the CPX valve terminal.
Festo_CPX_extern.lib si Festo Hidden library that is loaded automatically in a CPX‐CEC project.
FestoMotion_V0.2.lib en dir no esta
The library provides functions that are required by other Festo libraries.
Standard.lib si, PD si 3S, Standard libraries for CoDeSysModules that the IEC61131‐3 requires as standard modules for an IEC
programming system.
mx0gni
Typewritten Text
mx0gni
Typewritten Text
mx0gni
Typewritten Text
Enero 2010 Version Preliminar Festo Gerardo Niembro
mx0gni
Typewritten Text
mx0gni
Typewritten Text
mx0gni
Typewritten Text
Util.lib si, PD si 3S, Standard libraries for CoDeSys
Modules for BCD conversion, bit/byte functions, mathematical help functions,
controllers, signal generators, function manipulators and analogue value
processing.
AnalyzationNew.lib si si 3S, Standard libraries for CoDeSys Modules for analysing expressions.
IecSfc.lib si, PD 3S, Standard libraries for CoDeSys ActionControl
por desglosar AnaLyZATION.lib en Dir 3s 3S, Standard libraries for CoDeSys
por desglosar 3S_CanDrv.lib si si si 3S, CANopen libraries Only for internal use in combination with the CANopen master.
por desglosar 3S_CANopenManager.lib si si si 3S, CANopen libraries Only for internal use in combination with the CANopen master.
por desglosar 3S_CANopenMaster.lib si si si 3S, CANopen libraries Only for internal use in combination with the CANopen master.
por desglosar 3S_CanOpenDevice.lib en dir en dir
por desglosar BusDiag.lib si si si 3S, Adaptada Diagnosis for CANopen bus systems.
Ethernet.lib si si Librerias especificas para tajet Modules for network configuration
EventData.lib si si Librerias especificas para tajet Modules for evaluating interruptible inputs
IncEnc.lib si si Librerias especificas para tajet Modules for latch functions of incremental encoders
PLCService.lib si si Librerias especificas para tajetModules for control services (e.g. operating hours counter, version
information,….)
SysLibComEx.lib si si Librerias especificas para tajet Modules for switching the mode between RS485/422.
pend KSys.lib si si Librerias especificas para tajet Internal modules.
pend TestFunctions.lib si si Librerias especificas para tajet Internal modules.
por desglosar HilscherPBInfo.lib si si En subDir Profibus
por desglosar Hilscher.lib si si En subDir Profibus
por desglosar
SysLibDPV1Hilscher.lib si si En subDir Profibus
This library supports the acyclic Profibus DPV1, Class 1, Read‐ and Write‐
Services for the data transfer between Master and Slaves. The data are
addressed within the slaves by slot and index. (Concerning this see the PB‐DP
standard.)
ModbusTCPSrv.lib en dir si si 3S, Adaptada ModBus TCPServer
por desglosar Dummydrive.lib en dir Motion
por desglosar SM_CNC.lib en dir Motion
por desglosar SM_CNCDiagnostic.lib en dir Motion
por desglosar SM_DriveBasic.lib en dir Motion
por desglosar SM_Error.lib en dir Motion
por desglosar SM_FileFBs.lib en dir Motion
por desglosar SM_PLCopen.lib en dir Motion
por desglosar SM_Startup_Diagnostic.lib en dir Motion
por desglosar SM_Trafo.lib en dir Motion
por desglosar 3S_CanDrv.lib en dir Motion
por desglosar FestoCANdrive.lib en dir Motion
por desglosar SM_CAN.lib en dir Motion
por desglosar SM_CANWatch.lib en dir Motion
Dudas
Porque CECX‐C1 y CECX‐m1 no tienen la librería de FestoMotion
La librería de Analyzation y AnalyzationNew son diferentes, porque se usan así, y se diferencia a losPLC que la usan
Pendientes:
Verificar contra listado real del directorio de cada equipo
OPERADORES IECListado Parcial, es posible que falten algunas funciones
Operadores IEC
ADDAddition of variables of the types: BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT,
REAL and LREAL.
MULMultiplication of variables of the types: BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT,
UDINT, REAL and LREAL.
SUBSubtraction of one variable from another of the types: BYTE, WORD, DWORD, SINT, USINT, INT,
UINT, DINT, UDINT, REAL and LREAL.
DIVDivision of one variable by another of the types: BYTE, WORD, DWORD, SINT, USINT, INT, UINT,
DINT, UDINT, REAL and LREAL.
MODModulo Division of one variable by another of the types: BYTE, WORD, DWORD, SINT, USINT, INT,
UINT, DINT, UDINT. The result of this function will be the remainder of the division. This result will
be a whole number.
MOVEAssignment of a variable to another variable of an appropriate type. As MOVE is available as a box
in the graphic editors LD, CFC, there the (unlocking) EN/EN0 functionality can also be applied on a
variable assignment. In the FBD editor this is not possible however.
INDEXOF This function is not prescribed by the standard IEC61131‐3.
SIZEOF This function is not prescribed by the standard IEC61131‐3.
ANDBitwise AND of bit operands. The operands should be of the type BOOL, BYTE, WORD or DWORD.
ORBitwise OR of bit operands. The operands should be of the type BOOL, BYTE, WORD or DWORD.
XORBitwise XOR of bit operands. The operands should be of the type BOOL, BYTE, WORD or DWORD.
NOTBitwise NOT of a bit operand. The operand should be of the type BOOL, BYTE, WORD or DWORD.
SHL Bitwise left‐shift of an operand : erg:= SHL (in, n)
SHR Bitwise right‐shift of an operand: erg:= SHR (in, n)
ROL Bitwise rotation of an operand to the left: erg:= ROL (in, n)
ROR Bitwise rotation of an operand to the right: erg = ROR (in, n)
Selection OperatorsAll selection operations can also be performed with variables. For purposes of clarity we will limit
our examples to the following which use constants as operators.
SEL Binary Selection
MAX Maximum function. Returns the greater of the two values.
MIN Minimum function. Returns the lesser of the two values.
LIMIT Limiting
MUX Multiplexer
GT Greater than
LTA Boolean operator that returns the value TRUE when the value of the first operand is less than
that of the second. The operands can be BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT,
DINT, UDINT, REAL, LREAL, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.
LEA Boolean operator that returns the value TRUE when the value of the first operand is less than or
equal to that of the second. The operands can be BOOL, BYTE, WORD, DWORD, SINT, USINT, INT,
UINT, DINT, UDINT, REAL, LREAL, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.
GE Greater than or equal to
EQ Equal to
NE Not equal to
ADR Address Function not prescribed by the standard IEC61131‐3.
ADRINST Address Function not prescribed by the standard IEC61131‐3.
BITADR Adress function, not prescribed by the standard IEC61131‐3.
Content OperatA pointer can be dereferenced by adding the content operator "^" after the pointer identifier
CAL Calling a function block or a program
Type Conversion Functions
Its is forbidden to implicitly convert from a "larger" type to a "smaller" type (for example from INT
to BYTE or from DINT to WORD). Special type conversions are required if one wants to do this.
One can basically convert from any elementary type to any other elementary type.
BOOL_TO ConversionsConversion from type BOOL to any other type:
BOOL_TO_INT
BOOL_TO_STRING
BOOL_TO_TIME
BOOL_TO_TOD
BOOL_TO_DATE
BOOL_TO_DT
TO_BOOL ConversionsBYTE_TO_BOOL
INT_TO_BOOL
TIME_TO_BOOL
STRING_TO_BOOL
Conversion between Integral Number TypesINT_TO_REAL
REAL_TO_INT
TIME_TO/TIME_OF_DAY ConversionsTIME_TO_STRING
TIME_TO_DWORD
TOD_TO_SINT
DATE_TO/DT_TO ConversionsDATE_TO_BOOL
DATE_TO_INT
DT_TO_BYTE
DT_TO STRING
STRING_TO ConversionsSTRING_TO_BOOL
STRING_TO_WORD
STRING_TO_TIME
TRUNC Converting from REAL to INT
ABS Returns the absolute value of a number. ABS(‐2) equals 2.
SQRT Returns the square root of a number
LN Returns the natural logarithm of a number.
LOG Returns the logarithm of a number in base 10.
EXP Returns the exponential function
SIN Returns the sine of a number.
COS Returns the cosine of number. The result is calculated in arch minutes.
TAN Returns the tangent of a number. The value is calculated in arch minutes. IN can be type BYTE,
WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT, OUT must be type REAL.
ASIN Returns the arc sine (inverse function of sine) of a number. .
ACOSReturns the arc cosine (inverse function of cosine) of a number. The value is calculated in arch
minutes.
ATAN Returns the arc tangent (inverse function of tangent) of a number.
EXPT Exponentiation of a variable with another variable:
INIThe INI operator can be used to initialize retain variables which are provided by a function block
instance used in the POU.
Librerias de 3S
Parte de la información de estas librerias se encuentra en los directorios del Tarjet
Standard.lib
String functionsLEN Returns the length of a string. Input STR is of type STRING
LEFT Left returns the left, initial string for a given string
RIGHT Right returns the right, initial string for a given string.
MID returns a partial string from within a string
CONCAT Concatenation (combination) of two strings
INSERT INSERT inserts a string into another string at a defined point.
DELETE DELETE removes a partial string from a larger string at a defined position.
REPLACE REPLACE replaces a partial string from a larger string with a third string.
FIND FIND searches for a partial string within a string.
Bistable FunctionSR Making Bistable Function Blocks Dominant
RS Resetting Bistable Function Blocks
SEMA A Software Semaphore (Interruptible)
TriggerR_TRIG The function block R_TRIG detects a rising edge.
F_TRIG The function block F_TRIG a falling edge.
CounterCTU Function block Incrementer
CTD Function Block Decrementer:
CTUD Function Block Incrementer/Decrementer
TimerTP The function block Timer is a trigger
TON The function block Timer On Delay implements a turn‐on delay..
TOF The function block TOF implements a turn‐off delay..
RTC The function block Runtime Clock returns, starting at a given time, the
current date and time.
Util.lib This library contains an additional collection of various blocks which can
be used for BCD conversion, bit/byte functions, mathematical auxiliary
functions, as controller, signal generators, function manipulators and for
analogue value processing.
As some of the functions and function blocks contain REAL variables, an
accessory library named UTIL_NO_REAL exists in which these POUs are
excluded.
BCD conversionBCD_TO_INT This function converts a byte in BCD format into an INT value
INT_TO_BCD_ This function converts an INTEGER value into a byte in BCD format
Bit/Byte FunctionsExtract Inputs to this function are a DWORD X, as well as a BYTE N. The output is
a BOOL value, which contains the content of the Nth bit of the input X,
whereby the function begins to count from the zero bit.
Pack This function is capable of delivering back eight input bits B0, B1, ..., B7
from type BOOL as a BYTE
PutBit PUTBIT sets the Nth bit from X on the value B, whereby it starts counting
from the zero bit.
unpack UNPACK converts the input B from type BYTE into 8 output variables
B0,...,B7 of the type BOOL, and this is the opposite to PACK.
Mathematic Auxiliary FunctionsDerivative This function block approximately determines the local derivation.
Integral This function block approximately determines the integral of the
function.
Lin_Trafo This function block transforms a REAL‐value, which lies in a value range
defined by a lower and upper limit value, to a REAL‐value which lies
correspondingly in another range also defined by a lower and upper limit
Statics_Int This function block calculates some standard statistical values
Statics_real This function block corresponds to STATISTICS_INT, except that the input
IN is of the type REAL like the outputs MN, MX, AVG.
Variance VARIANCE calculates the variance of the entered values.
ControllerPD The library util.lib provides the following PD controller function block
PID The library util.lib provides the following PID controller function block
PID_FIXCYCLE The PID_FIXCYCLE controller function block:
Signal GeneratorsBlink The function block BLINK generates a pulsating signal
Freq_Measure This function block measures the (average) frequency (Hz) of a boolean
input signal.
Gen The function generator generates typical periodic functions
Function ManipulatorCharCurve This function block serves to represent values, piece by piece, on a linear
function:
Ramp_Int RAMP_INT serves to limit the ascendance or descendance of the
function being fed
Ramp_Real RAMP_REAL functions in the same way as RAMP_INT, with the simple
difference that the inputs IN, ASCEND, DESCEND and the output OUT are
of the type REAL.
Analog Value ProcessingHysteresis The input to this function block consists of three INT values IN, HIGH and
LOW. The output OUT is of the type BOOL.
LimitAlarm This function block specifies, whether the input value is within a set
range and which limits it has violated if it has done so.
AnalyzationNew.libAnalyzeExpression returns in a string the components of the expression, which are adding
to the total value FALSE
AppendErrorString is used for this purpose, separating the particular components in the
output string by "|" characters
IecSfc.libSFCActionControl Action control block for IEC 61131‐3 SFC actions
ModBusTCPSrv.lib Implementación de ModBus
MODBUSSERVER_TCPIP Implementación de Modbus
Librerias del SistemaNum a librería funcion Descripción
1 1SysLibCallback.lib This library provides the functions SysCallbackRegister and SysCallbackUnregister, which
serve to activate defined callback functions for runtime events.
SysCallbackRegister
SysCallbackUnregister
2 2
SysLibCom.libThis library supports the serial communication with a target system. If the target system
provides the functionality, then the following library functions can be used to open or
close a serial port and to read or write data via this port (The execution is synchronous.):
3 SysComOpen This function of the library SysLibCom.lib serves to open a serial port.
4
SysComSetSettings
serves to set values like baudrate, stopbits, parity, function‐timout, buffer‐size and scan‐
time for a serial port. The parameter value is of type POINTER TO COMSETTINGS; the
structure COMSETTINGS is used.
5
SysComSetSettingsEx
This function of the library SysLibCom.lib of type BOOL with the parameters of type
POINTER TO COMSETTINGSEX is used to set all relevant parameters of a serial
communication port. Not only the parameters of the above function are set, but also the
parameters for flowcontrol and character size can be set with this function. This is
performed by filling them into the structure COMSETTINGSEX.
6
SysComClose This function of the library SysLibCom.lib of type BOOL closes the COM port. For that
purpose the port handle, which has been got by SysComOpen, must be given as input
parameter. The return value will be TRUE after a successful operation, otherwise FALSE.
7
SysComRead
This function of the library SysLibCom.lib of type DWORD reads the data of COM‐PORT.
The input parameters are the port handle got by SysComOpen, the number of expected
bytes and the timeout of the function. Besides that the address to which the read data
should be copied, will be passed on.
8
SysComWrite
This function of the library SysLibCom.lib of type DWORD writes the data to that port
which is defined by the handle got by SysComOpen. Besides the handle also the address
from which the data should be taken, the number of data which should be written and
the timeout of the function must be passed on.
9
SysComGetVersion2300
This function of the library SysLibCom.lib (type DWORD, always returns 0) is only used
for an automatic internal version check and is not to be called explicitly in the application
program
10 3SysLibDir.lib
handle a file directory system on the target system. Entries of the directory can be read
and modified. The execution is synchronous.
11 SysDirCreate can be used to create a new directory.
12SysDirOpen
can be used, to open a directory in order to read the directory entries (files,
subdirectories) via function SysDirRead
13 SysDirRead can be used to read directory entries.
14 SysDirRemove can be used to delete a directory.
15 SysDirRename can be used to rename a directory
16 4SysLibDirect.lib
The functions of this library serve to access variables by indices with which they are
referenced in the runtime system. For detailed information see the description of the
particular runtime system.
17 5
SysLibDPV1Hilscher.libThis library supports the acyclic Profibus DPV1, Class 1, Read‐ and Write‐Services for the
data transfer between Master and Slaves. The data are addressed within the slaves by
slot and index. (Concerning this see the PB‐DP standard.)
18 6SysLibEvent.lib
This library serves to synchronize and control the processing of two (IEC‐) tasks.
19SysEventCreate
serves to create a new event and to name it. A handle will be returned, which is used by
the other functions of the library to access the event.
20SysEventDelete
deletes an event. The event is defined by the handle which was returned by the function
SysEventCreate when creating the event.
21
SysEventSet
is used to set an event. The event is defined by the handle which was returned by the
function SysEventCreate when creating the event. TRUE will be returned if as the event
has been set successfully, otherwise FALSE.
22
SysEventWaitis used to set the timeout for an event. The event is defined by the handle which was
returned by the function SysEventCreate when creating the event. TRUE will be returned
if as the timeout has been set successfully, otherwise FALSE
23 7 SysLibFile.lib
24 SysFileOpen serves to open a file, which already exists or which should be created.
25SysFileWrite
serves to write data to a file, which has been opened before by the function
SysFileOpen. The return value is the number of successfully written bytes.
26SysFileRead
serves to read a file, which has been opened before by SysFileOpen. The return value is
the number of successfully read bytes.
27 SysFileClose serves to close a file, which has been opened before by SysFileOpen.
28 SysFileDelete serves to delete a file
29 SysFileCopy serves to copy the file content to another file (different file name).
30SysFileEOF
if the current offset is at the end of the file; it will return 0, if the end of file has not yet
been reached.
31SysFileGetPos
returns the currently set offset position in the file, which is identifed by the file number
that you have got from the SysFileOpen function before
32 SysFileGetSize returns the size of the file (in Bytes), which is identified by the file name.
33SysFileGetTime
returns the creation date, the date of last access and the date of the last modification of
the file (which is identified by the file name).
34 SysFileRename serves to rename a file.
35SysFileSetPos
serves to change the current offset (which can be read by the function SysFileGetPos) for
a file access
36 8 SysLibFileAsync.lib This library supports asynchronous file access from the IEC‐application
37SysFileOpenAsync
This function block (see library SysLibFileAsync.lib) retrieves the current read‐/write
position of the file.
38SysFileCloseAsync
This function block (see library SysLibFileAsync.lib) is used to close a file. From now on
the file handle is invalid and the file is free for other processes
39SysFileWriteAsync
This function block (see library SysLibFileAsync.lib) is used for writing to a file. The file
has to be opened with the FB SysFileOpenAsync.
40SysFileReadAsync
This function block (see library SysLibFileAsync.lib) is used to read from an open file.
41 SysFileDeleteAsync This function block (see library SysLibFileAsync.lib) is used to delete a file.
42SysFileGetPosAsync
This function block (see library SysLibFileAsync.lib) retrieves the current read‐/write
position of the file.
43SysFileEOFAsync
This function block (see library SysLibFileAsync.lib) is used to determine, whether the
read‐/write pointer has reached the end of the file.
44SysFileGetSizeAsync
This function block (see library SysLibFileAsync.lib) is used to retrieve the size in bytes of
a file.
45SysFileGetTimeAsync
This function block (see library SysLibFileAsync.lib) retrieves the modification times of a
file.
46SysFileCopyAsnc
This function block (see library SysLibFileAsync.lib) is used to copy a file to another
name/location
47 SysFileRenameAsync This function block (see library SysLibFileAsync.lib) is used to rename a file.
48
SysFileCloseAllOpenAsync With this function block(see library SysLibFileAsync.lib) one can close all currently open
files, without knowing any handles or names. The system always knows these handles.
49 9SysLibFileStream.lib
This library provides functions which correspond to ANSI C functions for file stream
operations. The execution is synchronous.
50
51SysFileStreamFOpen
File with name filename will be opened as stream; possible values for inputvariable
PLCGetSerialNo Returns serial number of the control
PLCGetSystemVersion Returns system version
PLCGetVendorName Returns vendor name
PLCReboot Triggers reboot of the control.
SysLibComEx.lib
(CAA‐Merger‐8.chm) The SysLibComEx library is an extension for the handling of serial
interfaces.
All serial interfaces can in principle be operated via the SysLibCom.lib. A special port
must be specified when opening the interface of a serial interface module.
SysComSetMode For the switching over to RS‐485 and vice versa. ???
KSys.lib Librería Interna utilizada en conjunto con IncEnc.lib
TestFunctions.lib Librería solo para uso Interno de otras librerias
to CoDeSys_SoftMotion_V23_E.pdf
Librerí Función Comentario
SM_PLCopen.libSe recoienda leer la especificación "Function blocks for motion control, version 1.0"
Al parecer la librería cuenta con más funciones de las aquí mostradas1 Modulos para control de ejes Individuales
2 MC_ReadStatus provides some particular states of an axis3 MC_ReadAxisError provides information on general errors which have occurred at the drive4 SMC_Reset reset the axis‐state (SMC_AXIS_STATE) from "error_stop" to "standstill".5 MC_ReadParameter can be used to read some standard parameters of the drive structure6 MC_ReadBoolParameter can be used to read some standard parameters of the drive structure7 MC_WriteParameter can be used to set some standard parameters of the drive structure8 MC_WriteBoolParameter can be used to set some standard parameters of the drive structure9 MC_ReadActualPosition provides the current position of the drive10 MC_ReadActualVelocity provides the current velocity of the drive.
11 MC_ReadActualTorque provides the current torque resp. the current power of the drive.
12 MC_Power controls the ON‐/OFF‐switch and the status of the brakes of the drive. If a drive has not
been switched ON in this way, if the controller has not been unblocked or if the brake has
not been released, no motion control is possible13 MC_Home starts a manufacturer‐specific (!) reference move in the drive. This motion is solely initiated
by the Drive Interface14 MC_Stop
decelerates the axis to velocity 0. No interrupt is possible and the axis will be blocked as
long as the input "Execute" is TRUE and the axis not yet has been stopped completely15 mc_halt decelerates the axis to velocity 0. The module can be interrupted and in contrast to
MC_Stop does not block the axis. 16 MC_MoveAdditive
has two different modes of action, depending on the current state of the axis:
discrete_motion:
The Distance value will be added to the target position of the module which is currently
processing on the axis. The motion will aim at the new target position then.
continuous_motion or standstill:
The Distance will be covered referring to the current position, regarding the given
parameters.17 MC_MoveAbsolute moves the axis to an absolute position according to the defined velocity, deceleration and
acceleration values18 SMC_MoveContinuousAbsolute moves the axis to a fix position according to the defined velocity, deceleration and
acceleration values. In contrast to MC_MoveAbsolute the user additionally can define an
end velocity, which the axis should have at this fix position and which is shown by output
InEndVelocity19 MC_MoveRelative
moves the axis by a relative distance according to the defined velocity, deceleration and
acceleration values. The distance can have positive or negative values.
20 smc_movecontinuousrelative moves the axis by a relative distance according to the defined velocity, deceleration and
acceleration values21 MC_MoveSuperImposed causes, where appropriate, additionally to the currently active motion another one, which
makes the axis passing a defined distance. 22 MC_MoveVelocity causes a non‐stop motion of the axis with a predefined velocity (AXIS_REF). 23 MC_PositionProfile follows a defined position profile.24 MC_VelocityProfile is analog to the module MC_PositionProfile. But here in the input variable of type structure
MC_TV_REF the position points are defined by their velocities.
25 MC_AccelerationProfileis analog to the MC_PositionProfile module. But here in the input variable of type structure
MC_TA_REF the position points are defined by their acceleration values.26 MC_SetPosition shifts the zero point of the axis
Librerias de Motion
27 MC_TouchProbe can be used to detect very precisely the position of the drive via a fast input28 MC_AbortTrigger aborts a latching which is currently done on the trigger input..29 Modulos para control sincronizado de motores30 MC_CamTableSelect you can select a CAM, determine the master and the slave axes for this CAM and do some
presettings.31 MC_CamIn you can realize a CAM which has been selected by MC_CAMTABLESELECT.
In addition to the offsets and scaling also the start mode can be defined.
32 MC_CamOut you can disengage the slave drive from the master. The slave will be driven on with the
current velocity.33 MC_GearIn you can couple the slave axis to the master axis34 MC_GearOut you can disengage the slave drive from the master. The slave will be driven on with the
current velocity.
35 MC_GearInPosyou can couple the slave axis to the master axis synchronously to position and velocity
36 MC_Phasing you can effect a constant distance between master axis and slave axis. In this case master
and slave of course have identical velocity and acceleration.37 Elementos adicionales de la librería38 SMC_GetCamSlaveSetPosition This module calculates the current target position of an axis (slave) for the case that the axis
would be coupled via a CAM to the motion of another axis (Master). Therby both axes are
not moved or affected.39 SMC_CAMBounds
This function block calculates the maximum set points for position, velocity and
acceleration/deceleration of the slave, if that is absolutely bound to a master, which is
moved according to a prescribed maximum velocity and acceleration/deceleration.
40 SMC_CAMEditor, SMC_CAMVisu With these modules an Online‐CAM‐Editor can be created41 SMC_CAMRegister
represents a tappet control unit. It works ‐ like MC_CamIn – on a MC_CAM_REF‐structure,
negating the original path information and only reading the tappet information.42 SMC_GetTappetValue This function block, which is part of the SM_PLCopen.lib, evaluates the output Tappets of
function block MC_CamIn and contains the current tappet status.
43 mc_digitalcamswitch This function block like SMC_CamRegister represents a tappet control unit. Up to 32
outputs can be switched. Moves in all directions are allowed44 SMC_ReadSetPosition reads the currently set position of the drive.45 SMC_SetTorque can be used to create a torque, if the drive is in controller mode "torque".46 SM_CAN.lib Motion\Drives\CAN47 SMC_ReadCANParameter The functionality is similar to that of the modules MC_ReadParameter and
MC_WriteParameter:48 SMC_WriteCANParameter The functionality is similar to that of the modules MC_ReadParameter and
MC_WriteParameter:49 SM_CNC.lib
This library provides modules for realizing the SoftMotion functionality in an IEC‐program50 SMC_NCDecoder Decoding of the path which has been programmed in the CNC‐Editor in order to get
structure objects51 SMC_GCodeViewer It gathers and stores the textual representation (G‐Code) of the particular GeoInfo objects
and dumps those as an ARRAY OF STRING, which e.g. via a table can be displayed in a
visualization52 SMC_ToolCorr Path‐preprocessing: tool radius correction53 SMC_AvoidLoop Path‐preprocessing: avoids loops in the path54 SMC_SmoothPath Path‐preprocessing: slurs the path by splines55 SMC_RoundPath Path‐preprocessing: rounds the path by circular arcs56 SMC_CheckVelocities Check of the end velocities of the segments57 SMC_Interpolator Check of the end velocities of the segments
58 SMC_LimitCircularVelocities This module (SM_CNC.lib) checks the particular elements of the OutQueue and limits the
path velocities of circular elements against their radii.
59 SMC_Interpolator Moduleis used to convert a continuous path which is described by SMC_GEOINFO‐objects, into
discrete path position points, thereby regarding a defined velocity profile and time pattern. 60 SMC_GetMParameters
This function block can be used – if the Interpolator currently works on a M‐Function ‐ to
poll the parameters which have been set for this M‐Function (K, L, O, see HERE).
61 SMC_Interpolator2Dir This module corresponds concerning function and allocation of its inputs and outputs to
function block SMC_Interpolator, with the difference that it can also reversely interpolate a
path.
62 Auxiliary Modules for Path Rotations, Translations and Scalings63 SMC_ROTATEQUEUE2D
The path stored in poqDataIn will be rotated around the Z‐axis by the angle given by dPhi
[°]. A positive angle effects a positive rotation in mathematical sense (counterclockwise).64 SMC_TRANSLATEQUEUE3D The path stored in poqDataIn will be translated according to the vector given by vec, which
is of structure type SMC_VECTOR3D (see SMC_VECTOR3D).
65 SMC_SCALEQUEUE3D� The path contained in poqDataIn will be stretched by factor fScaleFaktor.
66 Settings via global variab67 g_fSMC_CNC_EPS Epsilon value for accurate examination for zero68 g_fSMC_CNC_EPS_RELUCTANT Epsilon value for tolerant examination for zero69 SM_Trafo.lib This library is an extension for the SM_CNC.lib and provides modules, which can be used for
transformation of GEO‐ to drive coordinates and the axis control (position,
position/velocity, velocity).70 Portal Systems71 SMC_TRAFO_Gantry2 For portal systems no transformation must be done, thus the modules of the SM_Trafo.lib
SMC_TRAFOF_Gantry3, GantryCutter) just add offset on the x‐, y‐ and z‐axes.
72 SMC_TRAFOF_Gantry2 ""73 SMC_TRAFO_Gantry3 ""74 SMC_TRAFOF_Gantry3, ""75 GantryCutter These function blocks do transformations for portal systems with one rotation axis, which is
controlled in a way, that it points along the current path tangent.76 H‐Portal System with stationary drives77 SMC_TRAFO_GantryH2
This function block for H‐Portal systems with stationary drivesis part of the SM_Trafo.lib.78 SMC_TRAFOF_GantryH2
This function block for H‐Portal systems with stationary drivesis part of the SM_Trafo.lib.
79 2‐Jointed Scara‐Systems80 SMC_TRAFO_Scara281 SMC_TRAFOF_Scara282 Portal Systems with Tool Offset83 SMC_TRAFO_Gantry2Tool184 SMC_TRAFOF_Gantry2Tool185 SMC_TRAFO_Gantry2Tool286 SMC_TRAFOF_Gantry2Tool287 3‐Jointed Scara‐Systems88 SMC_Trafo_Scara3
89 SMC_TRAFOF_Scara390 Parallel‐Kinematics91 SMC_TRAFO_Tripod92 SMC_TRAFOF_Tripod93 Spacial Transformations94 SMC_CoordinateTransformation3D95 SMC_UnitVectorToRPY96 SMC_DetermineCuboidBearing97 SM_CNCDiagnostic.lib This library provides auxiliary modules which can be very useful during the implementation
phase of a CNC program, because they help to display the data which are exchanged
between the modules.98 SMC_ShowCNCREF can display the first ten lines of a NC program, which is available in form of a data structure
SMC_CNC_REF, in text strings (Din66025).99 SMC_ShowQueue rovides the first ten SMC_GeoInfo objects of an OutQueue in form of an ARRAY OF POINTER
TO SMC_GeoInfo.100 SM_DriveBasic.lib CoDeSys will automatically generate structure objects based on the drive image which has
been configured in the PLC Configuration editor. These structures can be accessed by the
IEC program101 SMC_ErrorString returns a string representation of the error, depending on the inputs ErrorID (SMC_Error)
and Language (SMC_LANGUAGE_TYPE (English, German)).102 SMC_sgn returns the value of the sign of the input; thus –1 if the input is negative, +1 if it is positive
and 0 if it is zero.103 SMC_fmod calculates the modulo value of the input x for period m. The return value always is within
the interval [0, m].104 SMC_atan2 calculates and returns the angle alpha, which solves the following equations:
sin(alpha) * f = Sinus and cos(alpha) * f = Cosine.105 SMC_ChangeGearingRatio can change the gearing ratio and the type of the drive.
106 SMC_CheckLimits checks whether the actual set points of the drive exceed the maximum values configured in
the controller and indicates the check result in output bLimitsExceeded.
107 SMC_ControlAxisByPos writes target positions n to a drive structure and checks the structure for jumps
108 SMC_ControlAxisByPosVel This module of SM_DriveBasic.lib works similar to SMC_ControlAxisByPos, but additionally
the velocity can be defined.109 SMC_ControlAxisByVel works similar to SMC_ControlAxisByPos, but the axis is not controlled by the position but by
the velocity110 SMC_FollowPosition writes position set points to the axis and does no checks.
111 SMC_FollowPositionVelocity writes position and velocity set points to the axis without doing any checks. The user must
care for a reasonable matching of the values.112 SMC_FollowVelocity writes set velocities to the axis without doing any checks.
113 SMC_IsAxisGroupReady tells about the status of an axisgroup
114 SMC_IsAxisGroupReady by a boolean variable returns whether the startup, which implicitly is done for each
axisgroup, has been terminated and thus the group with its axes is operable (TRUE), or
whether the startup is still going on or an error has occurred (FALSE).
115 SMC_ResetAxisGroup With this function block of SM_DriveBasic.lib a complete axisgroup can be reinitialized.
116 SMC_SetControllerMode If supported by the drive this module of SM_DriveBasic.lib can be used to switch to another
controller mode.
117 SM_Error.libThis library must be available in each project, because it contains all error definitions. It is
used to display each error produced by a SoftMotion module as a string.118 SMC_ErrorString Depending on the inputs ErrorID (enumeration SMC_Error) and Language
(SMC_LANGUAGE_TYPE (English, German)) the function SMC_ErrorString returns a string
representing the error.
119 SM_FileFBs.lib This library provides modules for the file functionality.
mx0gni
Typewritten Text
120 SMC_ReadNCQueue This module reads an OutQueue file, which has been created by the CNC editor, from the
PLC file system and provides an OutQueue structure, which typically is processed by the
Interpolator.
121 SMC_ReadNCFile
reads a NC‐ASCII‐file from the file system of the controller, in order to make it available for
the SMC_NCDecoder. Thus at runtime a NC program can be read in and realized.
122 SMC_ReadCAM is used to load a CAM, which has been created in the CAM editor and has been saved in a
*.CAM file, at runtime and to make it available for the modules MC_CamTableSelect and
MC_CamIn.
123 SMC_AxisDiagnosticLog
This module (SM_FileFB.lib) can be used to write cyclically a selection of values of an axis to
a file. A file created in this way ideally can be used for diagnosis purposes.
Librerias por Desarrollar
SM_Startup_Diagnostic.lib
3S_CanDrv.lib checar
FestoCANdrive.lib
SM_CANWatch.lib
Dummydrive.lib
nes por ubicar en la inea de softmotion drive interfazse