Post by hanoues on setting date and time on CPX-E
CODESYS Forge
talk
(Post)
Hello, Can anybody here tell me how to modify the time and date on my CPX-E? I used the code I found on CODESYS online help, but it doesn't work. What am I missing? FUNCTION current_date_time : STRING VAR stUTC_Timestamp : SysTime; //utc time // ULINT#1528280694913 stLocal_TimeStamp : SysTime; //local time but is in general equal // ULINT#1528280694913 stdNow : SysTimeDate; //local time in an object to access each number (day, month...) dtNow : DATE_AND_TIME;//DT#2018-6-6-10:24:54 todNow : TIME_OF_DAY; // TOD#10:24:54.913 datNow : DATE; // D#2018-6-6 END_VAR SysTimeRtcHighResGet(stUTC_Timestamp); // ULINT#1528273494913 SysTimeRtcConvertHighResToLocal(stUTC_Timestamp, stdNow); //convert UTC ULINT to Local SysTime // stdNow.wYear = UINT#2018 // stdNow.wMonth = UINT#6 // stdNowy.wDay = UINT#6 // stdNow.wHour = UINT#10 // stdNow.wMinute = UINT#24 // stdNow.wSecond = UINT#54 // stdNow.wMilliseconds = UINT#913 // stdNow.wDayOfWeek = UINT#3 // stdNow.wYday = UINT#157 SysTimeRtcConvertDateToHighRes(stdNow, stLocal_TimeStamp); // ULINT#1528280694913 dtNow := TO_DT(stLocal_TimeStamp / 1000 ( ms )); // DT#2018-6-6-10:24:54 todNow := TO_TOD(stLocal_TimeStamp MOD TO_ULINT(T#1D)); // TOD#10:24:54.913 datNow := TO_DATE(dtNow); // D#2018-6-6 (convert to appropriate string) current_date_time := concat('$N[', TO_STRING(dtNow)); current_date_time:= concat(current_date_time,'.'); current_date_time:= concat(current_date_time, TO_STRING(stdNow.wMilliseconds)); current_date_time:= concat(current_date_time,'] - '); RETURN;
Last updated: 2024-05-21
Post by bruceae on Ethernet/IP Scan
CODESYS Forge
talk
(Post)
Hello, I have a robot configured as a Generic Ethernet Module under Ethernet/IP Scanner. I can not see the change of state of the outputs coming from the robot on the codesys side in real-time. (The robot has it's own internal program that would changes the values of remote outputs 0-3 off and on). Also when I send data down to the inputs of the robot it doesn't transfer over as expected. As an example I'll send to the robot's input bit 0 a value of 1. It doesn't see that value change. However, when I write that input bit 0 back to a value of 0, the robot changes state and shows a value of 1. And if I change the state of a different bit, the other bits update properly, except for the bit that I changed. Any advice would be greatly appreciated, and if anything else is needed let me know.
Last updated: 2024-09-10
CODESYS V35SP12 does not save data setting with rapsberry after reboot
CODESYS Forge
talk
(Thread)
CODESYS V35SP12 does not save data setting with rapsberry after reboot
Last updated: 2018-04-17
2D array , data move from a column to another column
CODESYS Forge
talk
(Thread)
2D array , data move from a column to another column
Last updated: 2011-03-23
Which kinds of data is transferred with 'Scan for devices' command?
CODESYS Forge
talk
(Thread)
Which kinds of data is transferred with 'Scan for devices' command?
Last updated: 2020-12-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
"Out of global data memory". Is there a way to increase the memory?
CODESYS Forge
talk
(Thread)
"Out of global data memory". Is there a way to increase the memory?
Last updated: 2022-03-28
store trend data in the PLC - How to use it (Codeys 2.3.9.7)
CODESYS Forge
talk
(Thread)
store trend data in the PLC - How to use it (Codeys 2.3.9.7)
Last updated: 2022-04-07
[SOLVED][ModBus TCP/IP] How to read data from thermostat.
CODESYS Forge
talk
(Thread)
[SOLVED][ModBus TCP/IP] How to read data from thermostat.
Last updated: 2017-06-08
How do I configure a visualisation text object to enter data?
CODESYS Forge
talk
(Thread)
How do I configure a visualisation text object to enter data?
Last updated: 2016-05-20
3.5.17: Setting up OPCUA Client data source to another PLC OPCUA server
CODESYS Forge
talk
(Thread)
3.5.17: Setting up OPCUA Client data source to another PLC OPCUA server
Last updated: 2021-11-02
i need to do a data logging with 750-842
CODESYS Forge
talk
(Thread)
i need to do a data logging with 750-842
Last updated: 2013-08-26
exporting or copying the COE online data from an ethercat slave device
CODESYS Forge
talk
(Thread)
exporting or copying the COE online data from an ethercat slave device
Last updated: 2019-10-30
PM564 ETH for reading data from modbus serial slave using COM1 port
CODESYS Forge
talk
(Thread)
PM564 ETH for reading data from modbus serial slave using COM1 port
Last updated: 2017-11-28
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
Save the data log file in the USB from the visualization
CODESYS Forge
talk
(Thread)
Save the data log file in the USB from the visualization
Last updated: 2021-01-25
Send Data to a specified Register with TCP/IP Cleint Server
CODESYS Forge
talk
(Thread)
Send Data to a specified Register with TCP/IP Cleint Server
Last updated: 2021-08-25
Can't link process data variables to IO from a positionsensor while using a demo soft PLC
CODESYS Forge
talk
(Thread)
Can't link process data variables to IO from a positionsensor while using a demo soft PLC
Last updated: 2022-03-04
can I send data over udp/tcp in simulation mode?
CODESYS Forge
talk
(Thread)
can I send data over udp/tcp in simulation mode?
Last updated: 2016-06-05
Profinet Master on RPI3 with CodeSys Control - No live data on I/O
CODESYS Forge
talk
(Thread)
Profinet Master on RPI3 with CodeSys Control - No live data on I/O
Last updated: 2017-07-06
Wie kann ich auf alle Benutzerdaten zugreifen? How to access User-Data?
CODESYS Forge
talk
(Thread)
Wie kann ich auf alle Benutzerdaten zugreifen? How to access User-Data?
Last updated: 2018-01-16
Wago_IO-Link Master 750-657 unable to read all data frame
CODESYS Forge
talk
(Thread)
Wago_IO-Link Master 750-657 unable to read all data frame
Last updated: 2022-06-10
Error 3803: (2): Out of data global memory. Variable 'CAN1_CANREMOTE_INFO'. 5904 bytes.
CODESYS Forge
talk
(Thread)
Error 3803: (2): Out of data global memory. Variable 'CAN1_CANREMOTE_INFO'. 5904 bytes.
Last updated: 2019-09-10
Trend to display Wago 750-880 SD memory data logging
CODESYS Forge
talk
(Thread)
Trend to display Wago 750-880 SD memory data logging
Last updated: 2012-10-24
Error 3803: (2): Out of data global memory. Variable 'CAN1_CANREMOTE_INFO'. 5904 bytes.
CODESYS Forge
talk
(Thread)
Error 3803: (2): Out of data global memory. Variable 'CAN1_CANREMOTE_INFO'. 5904 bytes.
Last updated: 2019-09-06
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
.