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
Hello and thank you so much for your replay. I'm a beginner and i have install the library but i cant use..how can i use a library and function on codesys?
I try to insert on my POU VAR
rtcInstance: SysTimeRtc.ReadTime; // Dichiara una variabile per la funzione di lettura
And then on my program
// Leggi il tempo reale
rtcInstance();
But have this error
"C0035: Program name, function or function block instance expected insted of "rtcInstance"
Where i'm wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello and thank you so much for your replay. I'm a beginner and i have install the library but i cant use..how can i use a library and function on codesys?
I try to insert on my POU VAR
rtcInstance: SysTimeRtc.ReadTime; // Dichiara una variabile per la funzione di lettura
And then on my program
// Leggi il tempo reale
rtcInstance();
But have this error
"C0035: Program name, function or function block instance expected insted of "rtcInstance"
Where i'm wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
For a demo application related to date/time, see:
https://forge.codesys.com/prj/codesys-example/date-and-time/home/Home/
The SysTimeRtcConvertUtcToDate function does this for you and applies the output to RTS_SYSTIMEDATE struct. This is part of the SysTimeRtc library.
Hello and thank you so much for your replay. I'm a beginner and i have install the library but i cant use..how can i use a library and function on codesys?
I try to insert on my POU VAR
rtcInstance: SysTimeRtc.ReadTime; // Dichiara una variabile per la funzione di lettura
And then on my program
// Leggi il tempo reale
rtcInstance();
But have this error
"C0035: Program name, function or function block instance expected insted of "rtcInstance"
Where i'm wrong?
Hello and thank you so much for your replay. I'm a beginner and i have install the library but i cant use..how can i use a library and function on codesys?
I try to insert on my POU VAR
rtcInstance: SysTimeRtc.ReadTime; // Dichiara una variabile per la funzione di lettura
And then on my program
// Leggi il tempo reale
rtcInstance();
But have this error
"C0035: Program name, function or function block instance expected insted of "rtcInstance"
Where i'm wrong?