IEC programming manual index 61131-3

This manual lists all the functions and function blocks that can be used in the programming of our systems. For those who need to consult the Off-line manual it is possible to download a mirror site with the complete manual.

1. Data type definitions

  1. TASK_ID, definition of execution task
  2. VR_TYPE, definition of variables type
  3. VAR_CHECK, variable value check mode definition
  4. DI_MODE, definition of digital input acquisition mode
  5. DO_MODE, definition of digital output management mode
  6. AI_MODE, definition of analogue input acquisition mode
  7. AO_MODE, definition of analogue output management mode
  8. DTR_MODE, definition of DTR management mode
  9. SWAP_MODESwap mode definition
  10. FSEEK_ORIGIN, definition of research origin
  11. SPY_MODE, definition of espionage mode
  12. FIND_MODE, search execution mode definitions
  13. CAN_SPEED, CAN bit rate definitions
  14. SYS_ID, definition of system ID
  15. PHR_INFOS_ID, ID information peripheral modules
  16. DAYLIGHT_ZONE, definition of sunlight areas
  17. CHECK_TYPE, frame control type definition
  18. TLS_MODE, TLS communication mode definition
  19. TLS_CERT_VERIFY, TLS certification definition
  20. TLS_CHIPER_SUITEcipher suite definition
  21. SNMP_VERSION, SNMP protocol version definition
  22. SNMP_PDU, SNMP PDU type definition
  23. SNMP_VT, SNMP variable type definition
  24. SNMP_ERROR, SNMP protocol error definition
  25. MODEM_TYPE, modem type definition
  26. OW_ITYPE, One-Wire interface type
  27. OW_BSTATUS, One-Wire bus status
  28. HTTP_REQUEST, HTTP request definition
  29. CO_NMT_STSCANOpen node management status
  30. MODBUS_PROTOCOL, Modbus protocol type definition
  31. YOTTA_A1_MDEFS, Yottacontrol modules definition
  32. MILESIGHT_DWID, Milesight variables in downlink
  33. FILEMDUMP_MODE, FileMemoryDump operation mode

2. Data structure definitions

  1. SYSSERIALMODE, serial port communication mode
  2. SYSCANMESSAGE, CAN message
  3. LDATETIMESTRUCT, long Date / Time struct
  4. ACMODBUS_DATA, Array command Modbus data
  5. TCPDEXCHNODEDEFS, structure definition of node parameters
  6. CO_ABORT, CANopen abort data
  7. MQTT_TS_DATA, MQTT topic subscribe data structure

3. Programming support

  1. Definition of system values
  2. Void pointer management
  3. eToPVoid, cast value to a PVOID pointer
  4. VarVCheck, variable value check
  5. ArrayVarTxfer, arrays to variable transfer
  6. MemCompare, compares memory buffers

4. Standard functions and FBs

  1. F_TRIG, falling edge trigger
  2. R_TRIG, raising edge trigger
  3. RS, Reset / Set flip flop
  4. SR, Set / Reset flip flop
  5. TON, timer On
  6. TOF, Off timer
  7. TP, pulse timer
  8. CTD, counter Down
  9. CTU, counter Up
  10. CTUD, counter Up / Down

5. Data conversion

  1. VBitTest, variable bit test
  2. VBitSet, variable bit set
  3. BitToByte, bit to byte conversion
  4. ByteToBit, byte to bit conversion
  5. ByteToWord, byte to word conversion
  6. WordToByte, word to byte conversion
  7. DoubleToWord, double to word conversion
  8. WordToDouble, word to double conversion
  9. VarSwap, swap variable value
  10. DWSplitBitToVar, DWMergeVarToBit, divide and concatenate variable 32 bits

6. Mathematical library

  1. Mathematical operations
  2. Trigonometric operations
  3. Management of numbers in 16 bit floating format
  4. SunRiseSet, sunrise and sunset calculator
  5. SHA1 Encryption, encrypt data with SHA1 algorithm
  6. SHA256 Encryption, encrypt data with SHA256 algorithm
  7. Base64Encode, Base64 encoding
  8. Base64Decode,Base64 decoding

7. System management

  1. Time management operators
  2. SysTimeGetMs, returns system time in mS
  3. SysTimeGetUs, returns system time in US
  4. SysTimeGetNs, returns system time in nS
  5. SysGetEndianness, get the system endianness
  6. SysGetRandom, get random number
  7. SysPCodeVerify, check the protection code
  8. SysSetTaskLpTime, set task loop time
  9. SysOSIDValue, get or set an operating system variable
  10. SysGetLastError, get last error
  11. SysGetCheck, gets the check
  12. SysMAlloc, memory allocation
  13. SysWrSpyData, system write spy data
  14. SysRMAlloc, SysRMGetSize, SysRMFree, relocatable memory management functions

8. Date / Time Management

  1. Date / Time management operators
  2. IsLeapYear, is leap year
  3. DayOfYearGet, returns the day of year
  4. SysDateGetS, get the system date on second
  5. SysDateGetNs, get the system date on nanoseconds
  6. SysDateSetS, set the system date on second
  7. Datetimeformat, format the Date / Time
  8. SysDateLocalize, locate date and time
  9. DateTimeToJDay, converts Date / Time to Julian day
  10. JDayToDateTime, converts Julian day to Date / Time

9. String management

  1. String management functions
  2. Sysstrlen, string length
  3. Sysmemset, memory set
  4. Sysmemmove, memory move
  5. Systolower, converts a given letter to lowercase
  6. Systoupper, converts a given letter to uppercase
  7. SysStrFind, string find
  8. SysMemFind, memory find
  9. SysVsnprintf, variable print to string
  10. SysCVsnprintf, concat string with variable print
  11. SysVarsscanf, extracts values ​​from string

10. I / O terminal management (Streams)

  1. SysFfopen, open file
  2. Sysfclose, file close
  3. SysFIsOpen, get the file open status
  4. SysFGetIBfSize, get file Rx input buffer size
  5. SysFGetIChars, get input available characters from file
  6. SysFIBfClear, file input buffer clear
  7. Sysfgetc, get character from file
  8. Sysfread, read data from file
  9. SysFGetOBfSize, get file Tx output buffer size
  10. SysFGetOSpace, get output available space on file
  11. SysFOBfClear, file output buffer clear
  12. Sysfputc, put character to file
  13. Sysfwrite, write data to file
  14. SysVfprintf, variable print to file
  15. SysFOBfFlush, file output buffer flush

11. File system management

  1. Sysfseek, file seek
  2. SysGetFileLenfile length
  3. SysFileRename, rename file
  4. SysFileRemove, file remove
  5. SysGetFileInfos, get file infos
  6. FSFileCopy, file system copy file

12. Communication Streams

  1. SysSerialPort, manage serial port
  2. SysTCPServer, accepts TCP / IP connections
  3. SysTCPClient, opens a TCP / IP connection
  4. SysUDPServer, accepts UDP connections
  5. SysUDPClient, opens at UDP connection
  6. SysGetSerialCTS, get serial CTS signal status
  7. SysSetSerialDTR, set DTR signal status
  8. SysGetSerialMode, get serial mode
  9. SysSetSerialMode, set serial mode
  10. SysGetPeerInfos, returns peer info

13. CAN bus management

  1. SysCANSetMode, set the CAN controller mode
  2. SysIsCANRxTxAv, checks if CAN Rx or Tx is available
  3. SysCANRxMsg, receives a CAN message
  4. SysCANTxMsg, transmit a CAN message
  5. CANopenMaster, manages the CANopen master
  6. CANopenMNode, manages a CANopen master node

14. Device manager

  1. SysGetPhrInfos, get infos from peripheral modules
  2. SysGetPhrDI, get peripheral digital input
  3. SysSetPhrDO, set peripheral digital output
  4. SysGetAnInp, get analog input
  5. SysSetAnOut, set analog output
  6. SysGetCounter, get counter
  7. SysGetEncoder, get encoder input
  8. SysSetPWMOut, set PWM output
  9. SysPhrVRd, read variable from peripheral module
  10. SysPhrVWr, write variable to peripheral module
  11. SysI2CWrRd, writes / reads on I2C extension bus
  12. SysDMXMng, DMX management
  13. StrainGaugeAcq, strain gauge acquisition
  14. HMIAInOnePicoface, Manages the Picoface HMI
  15. HMIAInOneNetlog, manages the Netlog HMI
  16. HMICustomMng, manages a custom HMI

15. General utility library

  1. BLINK, blink command
  2. BlinkValue, blink out value
  3. OnOffCycle, on / off cycle with random times
  4. Step Relay with On / Off commands
  5. Debouncingsignal debounce
  6. PWMOUT, PWM output management
  7. Average, value average
  8. ValueScale, scales to value
  9. Hysteresis, manages hysteresis on a value
  10. VaPotentiometer, acquisition of potentiometer from analogue input
  11. lINEARIZE, linearize at non linear value
  12. LRamp, linear ramp
  13. PIDMng, PID management
  14. DewPointCalculator, calculates the dew point
  15. CLIServer, manages a command-line user interface
  16. CLICKlient managed a command-line user interface
  17. ArrayToFString, converts a value array to formatted string
  18. FStringToArray, extracts a value array from formatted string
  19. DataTransfer, transfer data between systems
  20. DataStreamExch, exchanges data between two I / O streams

16. Modems library

  1. ModemCore, modem core management
  2. ModemSMSReceive, receives SMS messages
  3. ModemSMSSend, sends a SMS message

17. One-Wire management library

  1. OWireCore, One-Wire interface core
  2. OWSearch, One-Wire search devices
  3. OWRdIdentifier, One-Wire read ROM identifier
  4. OWRdTemperature, One-Wire read temperature

18. I2C device library

  1. I2CBusManager, I2C Bus manager
  2. SHT3xAcquire, SHT3x humidity and temperature sensor

19. Modbus device library

  1. MModbusFrame, Master modbus frame manager
  2. ModbusMaster, modbus master
  3. ModbusSlave, modbus slave
  4. Modbus Gatewaymodbus protocol gateway
  5. EastronSDM120, Eastron SDM120 energy meter
  6. EastronSDM630, Eastron SDM630 energy meter
  7. SensitSTHC102, Sensit STHC 102 thermometer acquisition
  8. MBTHLThermostat, Setecna MB-THL Thermostat
  9. InvtGD20EU, INVT GD20-EU inverter manager
  10. YottaA1MMng, Yottacontrol remote I/O modules

20. Management of NMEA sentences

  1. NMEASInterface, NMEA sentence interface
  2. NMEARMCSentence, Recommended Minimum sentences
  3. NMEAGLLSentence, Geographic Position sentence

21. Data historicization management

  1. StringToLogFile, save string in a log file
  2. FileMemoryDump, dump memory on file
  3. FIFOFile, manages FIFO registry on file

22. Networking management

  1. SysPing, execute a ping
  2. SNTPRequest, sends a SNTP request
  3. DNSRequest, sends a DNS request
  4. EMailSend, sends an email
  5. FTPClient, connects to a FTP server

23. MQTT protocol library

  1. MQTTClient, client for a MQTT server
  2. MQTTCBeebotte, Beebotte MQTT client
  3. MLSGateway, Milesight LoRaWAN gateway manager
  4. MLSDevice, Milesight devices data decoding

24. HTTP communication library

  1. HTTPClient, HTTP client
  2. RESTClient, connected to REST web service
  3. HTTPServer, HTTP server management
  4. SysTLSClient, TLS client manager
  5. Telegram, manages Telegram messenger through web APIs
  6. JSONE encoder, encodes a JSON message
  7. JSONDecoder, decodes a JSON object

25. Data exchange library between systems

  1. TCPDataExchServer, TCP data exchange (Server)
  2. TCPDataExchClient, TCP data exchange (Client)

26. SNMP protocol management library

  1. SNMPManager, sends a SNMP message
  2. SNMPAgent, managed the SNMP Agent

27. Identification and Authentication

  1. WiegandDcd, decodes the Wiegand code
  2. RFiDMWD7xSetUp, Netronix MW-D7x RFiD reader set up
  3. RFiDMWD7xTAGRd, Netronix MW-D7x RFiD TAG read

28. AES encryption library

  1. AES Encryption, AES data encryption
  2. AES Decryption, AES data decryption

29. Vending bookshop

  1. ccTalkProtocol, ccTalk protocol management

30. Motion library

  1. IOEncoder, incremental encoder over I / O
  2. EncoderPulses, pulse calculation from encoder
  3. MotorPositioning, engine positioning management

31. Cloud Service Management Library

32. Tips and tricks

  1. Access the system from Modbus
  2. Access bit variables
  3. Backup & restore PLC program
  4. Automatic FOTA update of systems
  5. Expand a DWORD variable in 32 BOOL variables
  6. Manage LCD display connected to the expansion bus
  7. Serial string reception and decoding
  8. ROUND function, truncate digits of a floating

33. LogicLab environment

  1. LogicLab transition from XTarget to XUnified
  2. LogicLab project migration on version 5.22.x.xx
  3. How to use Functions (F) and Function Blocks (FB)
  4. Documentation not found

34. Appendices

  1. How to use the examples
  2. Use connected FB with waterfall model
  3. Process I / O image
  4. Placeholders of the printf format
  5. Format string of the scanf function
  6. Function and function block protection
  7. How to use the espionage console
  8. PLC programming best practices
  9. “ELLabDTimeAdjLib” library deprecated Date / Time objects
  10. Library "eLLabObsoleteLib" obsolete objects
  11. Error list
  12. Exceptions of execution
Was this article helpful?