How to use CharBufferString type from StringUtils.lib?
CODESYS Forge
talk
(Thread)
How to use CharBufferString type from StringUtils.lib?
Last updated: 2017-07-17
Symbol Configuration / Datasource enum type on HMI
CODESYS Forge
talk
(Thread)
Symbol Configuration / Datasource enum type on HMI
Last updated: 2019-09-18
Property that returns REFERENCE TO Interface type?
CODESYS Forge
talk
(Thread)
Property that returns REFERENCE TO Interface type?
Last updated: 2021-11-23
C0032 Error to type Pointer to IoConfigParameter
CODESYS Forge
talk
(Thread)
C0032 Error to type Pointer to IoConfigParameter
Last updated: 2024-03-25
Error 'Library not found' and 'Unkown type'
CODESYS Forge
talk
(Thread)
Error 'Library not found' and 'Unkown type'
Last updated: 2024-10-10
Post by apurv on Cannot pass array of constant size to a function as a reference
CODESYS Forge
talk
(Post)
I have a Array of constant size defined like this Var Constant MAX_SIZE :UINT := 10; End_var VAR array : ARRAY[0..MAX_SIZE] OF INT; END_VAR Now I want to pass this array to a function by reference, Function fun : INT VAR_IN_OUT CONSTANT MAX_SIZE : UINT; END_VAR VAR_INPUT array : REFERENCE TO ARRAY[0..MAX_SIZE] OF INT; END_VAR but when I run this it gives strange Errors Error : Cannot Convert type 'ARRAY [0..MAX_SIZE] OF INT' to type 'ARRAY[0..MAX_SIZE] OF INT'
Last updated: 2024-01-07
Post by rafaelbrito on User management - User Tab missing
CODESYS Forge
talk
(Post)
Click in "Convert to Legacy"
Last updated: 2023-10-17
Post by fefefede on Get the numer of day
CODESYS Forge
talk
(Post)
Hello i tro to create a program to turn on or off the air condition in relationship temperature and numer of day. I can't get the number of day. I try this after installing SysTime library but this not work and have this error on debug ------ Build started: Application: Device.Sim.Device.Application ------- Typify code... Generate code... [ERROR] giorno_accensione_aria: PLC_PRG Device: PLC Logic: Application: C0032: Cannot convert type 'Unknown type: 'SysTimeCore(TRUE)'' to type 'TIME' [ERROR] giorno_accensione_aria: PLC_PRG Device: PLC Logic: Application: C0035: Program name, function or function block instance expected instead of 'SysTimeCore' [ERROR] giorno_accensione_aria: PLC_PRG Device: PLC Logic: Application: C0032: Cannot convert type 'Unknown type: 'DayOfWeek(CurrentTime)'' to type 'INT' [ERROR] giorno_accensione_aria: PLC_PRG Device: PLC Logic: Application: C0035: Program name, function or function block instance expected instead of 'DayOfWeek' [INFORMATION] giorno_accensione_aria: PLC_PRG Device: PLC Logic: Application: C0181: Related position Build complete -- 4 errors, 0 warnings : No download possible PROGRAM PLC_PRG VAR Temperatura: UDINT; AriaCondizionata: BOOL := FALSE; CurrentDayOfWeek: INT; //Variabile Giorno CurrentTime: TIME; GiornoDellaSettimana: INT; DayOfWeek: INT; END_VAR CurrentTime := SysTimeCore(TRUE); // Ottieni l'ora corrente CurrentDayOfWeek := DayOfWeek(CurrentTime); CASE GiornoDellaSettimana OF 1: // Azioni per Lunedì 2: // Martedì se più 10° accend altrimenti spegni IF Temperatura >= 10 THEN AriaCondizionata := TRUE; ELSE AriaCondizionata := FALSE; END_IF 3: // Mercoledì se più di 50° accendi altrimenti spegni IF Temperatura >=50 THEN AriaCondizionata := TRUE; ELSE AriaCondizionata := FALSE; END_IF 4: // Giovedì se più di 40° accendi altrimenti spegni IF Temperatura >=40 THEN AriaCondizionata := TRUE; ELSE AriaCondizionata := FALSE; END_IF 5: // Venerdì se più di 50° accendi altrimenti spegni IF Temperatura >=50 THEN AriaCondizionata := TRUE; ELSE AriaCondizionata := FALSE; END_IF 6: // Sabato se più di 25° accendi altrimenti spegni IF Temperatura >=25 THEN AriaCondizionata := TRUE; ELSE AriaCondizionata := FALSE; END_IF 7: // Domenica sempre spenta AriaCondizionata := FALSE; END_CASE
Last updated: 2023-09-14
Post by davidbo on I want to convert a WORD to a hex string like 15.432 to '3C48'
CODESYS Forge
talk
(Post)
I try with BYTE_TO_HEXinASCII but I cant get it right. How do I convert a word value like 15432 to the HEX text string '3C48'
Last updated: 2024-04-19
Post by dkugler on I want to convert a WORD to a hex string like 15.432 to '3C48'
CODESYS Forge
talk
(Post)
you try to convert a WORD with BYTE_TO_HEX directly? Using https://de.helpme-codesys.com/ lead to the SM3_shared lib. There is a function: https://content.helpme-codesys.com/en/libs/SM3_Shared/Current/SM3_Shared/StringFormat/Word_To_HexString.html
Last updated: 2024-04-19
Eine Nummer (Data Type=Double) Schicken mit TCP Client Server Codesys
CODESYS Forge
talk
(Thread)
Eine Nummer (Data Type=Double) Schicken mit TCP Client Server Codesys
Last updated: 2021-09-08
<identifier>: POINTER TO <data type | function block | program | method | function>;
CODESYS Forge
talk
(Thread)
<identifier>: POINTER TO <data type="" |="" function="" block="" program="" method="">;</data></identifier>
Last updated: 2022-03-23
Why is no more possible use REFERECE OF in return method type?
CODESYS Forge
talk
(Thread)
Why is no more possible use REFERECE OF in return method type?
Last updated: 2021-12-10
addressin an array of byte containing bits of type bool
CODESYS Forge
talk
(Thread)
addressin an array of byte containing bits of type bool
Last updated: 2018-11-14
Eine Nummer (Data Type=Double) Schicken mit TCP Client Server Codesys
CODESYS Forge
talk
(Thread)
Eine Nummer (Data Type=Double) Schicken mit TCP Client Server Codesys
Last updated: 2021-09-08
Modify the 0x1600 access type of CAN Local Device in Codesys
CODESYS Forge
talk
(Thread)
Modify the 0x1600 access type of CAN Local Device in Codesys
Last updated: 2018-11-23
Maximizing Struct type Variable in offline mode and adding comments to each element
CODESYS Forge
talk
(Thread)
Maximizing Struct type Variable in offline mode and adding comments to each element
Last updated: 2021-04-28
ENI server: Object type registry not found in the database
CODESYS Forge
talk
(Thread)
ENI server: Object type registry not found in the database
Last updated: 2010-02-19
changing the type of an existing POU from FB to PRG
CODESYS Forge
talk
(Thread)
changing the type of an existing POU from FB to PRG
Last updated: 2012-12-14
CmpIecVarAccess to get name of a type, not of a variable (instance)
CODESYS Forge
talk
(Thread)
CmpIecVarAccess to get name of a type, not of a variable (instance)
Last updated: 2016-06-08
How to use Jerk input and Velocity ramp type in MC_MoveAbsolute
CODESYS Forge
talk
(Thread)
How to use Jerk input and Velocity ramp type in MC_MoveAbsolute
Last updated: 2018-07-09
Problem configuring the 750-638 Counter for Hall-type sensor
CODESYS Forge
talk
(Thread)
Problem configuring the 750-638 Counter for Hall-type sensor
Last updated: 2012-10-29
Data Sources Manager causing exception due to float or double type in OPC server
CODESYS Forge
talk
(Thread)
Data Sources Manager causing exception due to float or double type in OPC server
Last updated: 2024-07-01
Post by struccc on Release SP20 - Changes in behaviour?
CODESYS Forge
talk
(Post)
Dear all, I've just started to migrate some of my ancient projects to SP20. There is one strange error (?) I have noticed so far. In a method call, depending on the circumstances I would like to return reference to an object, or an invalid reference: METHOD Add_EVT_OUT : REFERENCE TO FB_MSG VAR END_VAR IF __ISVALIDREF(refMSG_Entry) THEN Add_EVT_OUT REF= MANAGER.AddMsg_EVT_OUT( refMSG_Entry, _Get_EVT_Message(MSG_EVENT.OUT), _Get_EVT_AddCode(MSG_EVENT.OUT) )^; ELSE Add_EVT_OUT := 0; END_IF So far setting a reference variable to 0, did this. But now, the expression Add_EVT_OUT := 0; gives an error: [ERROR] DB_WTP_370: Add_EVT_ACK MSG_TRIGGER_EXT: C0032: Cannot convert type 'BIT' to type 'REFERENCE TO FB_MSG' Naturally... I can write: Add_EVT_OUT := DWORD#0; But is this the correct way? Is there any constant I could use instead, like "NULL"? Or this is totally wrong and to be avoided?
Last updated: 2024-03-24
Post by pethun on Upgrade from codesys 3.5.19 to 3.5.20
CODESYS Forge
talk
(Post)
Hi We upgraded our ptoject from 3.5.19 to 3.5.20 but we get an error message in the latest version. We made our own trend function and its related to this we get error message: Trend_Menu Device: PLC Logic: Application: C0032: Cannot convert type 'RTS_SYSTIMEDATE(systimertc, 3.5.20.0 (system))' to type 'RTS_SYSTIMEDATE(systimertc, 3.5.17.0 (system))' The variables are defined as follow: start : SysTimeRtc.SYSTIMEDATE; end : SysTimeRtc.SYSTIMEDATE; The code that creates the error is the variable start and end IF xAssign THEN xAssign := FALSE; xPanEnable := FALSE; xZoomEnable := FALSE; drs.liFrom := VisuTrendStorageAccess.TrendStorageConvertToTimestamp(start, 0 (us)); drs.liTo := VisuTrendStorageAccess.TrendStorageConvertToTimestamp(end, 0 (us)); drs.m_itfDateRangeSelectorClient.SetCurrentRange(drs.liFrom, drs.liTo); END_IF I cant understand really what the error message means and what can be the cause of the error? It compiles fine in dthe older codesys 3.5.19. If anyone has some experience of this please help us out? We must upgrade due to the new licenses. Thanks
Last updated: 2024-04-20
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND
or OR
.