joeburmeister
Member
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?
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?