Modicon M580 PLC - Comparing DateTime

joeburmeister

Member
Join Date
Apr 2019
Location
augusta, ga
Posts
15
How do you go about implementing, on the M580 PLC, how many days, hours, minutes before a predefine event in the future?

The RRTC_DT yields the PLC datetime stamp in Datetime (DT ) format. Doing a DT_TO_ARINT type conversion gives the PLC datetime stamp (DT format) to an Integer Array of 4 elements with date and time in BCD format.

Example:
If the input is:
DT_Variable = dt#2006-05-11-10:46:16
Then the output is:
DateAndTime_ARRAY[1] = 16#1600
DateAndTime_ARRAY[2] = 16#1046
DateAndTime_ARRAY[3] = 16#0511
DateAndTime_ARRAY[4] = 16#2006

But dealing with arrays is tedious. Does anyone know a quick way to perform an excel equivalent DATEDIFF function on M580 PLC?

Also, the old 984 PLCs used to have a STAT word to check the health status of the various drops. Is there something similar on the M580?
 
Yup - you are correct! Upon further investigation, Modicon has a SUB_DT_DT function that compares to two DT values and outputs their difference in TIME format.

Ok, next question....is there a equivalence for the old STAT function.
How do i detect changes to the hardware (field devices, hardware changes, etc)

SUB? I'm pretty sure you just subtract one from the other and it gives you a TIME (duration) as a result.
 

Similar Topics

Hi, I am using M580 PLC as modbus server and Scadapack 535E RTU as modbus client for a project. Both are connected via Modbus TCP protocol.I have...
Replies
1
Views
2,294
Hi all, I'm really new to this. I need to export the Modbus register mapping from a Modicon M580 through Control Expert for the registers that...
Replies
4
Views
937
We are now planning to upgrade from Quantum 140CPU11303 to Modicon M580. The software protect was written by Proworx NxT (.DCF). Is it possible...
Replies
1
Views
995
Hi, Does anyone know if programming a Modicon M580 is basically the same format as an M340? Also do they use the same software package? Thanks...
Replies
2
Views
1,755
I need to convert some Siemens PLC logic using Siemens TIA V16 to Modicon M580 logic. Is there a tool out there that will get me started? How...
Replies
3
Views
2,675
Back
Top Bottom