Hello everyone, I am currently attempting to use the DATE function to program the clock on a PLC. I have noticed that when the DATE function is active, A351-A354 display the register values (D100-D103), but when the rung is not true, they revert back to the PLC clock time. Can anyone offer insight into what I might be doing incorrectly?
The Date settings are encoded in BCD format, but you're inputting them in Decimal. If the instruction fails with an "out of range" error, it may revert to the previous time/date. To check for this issue, use P_ER right after the DATE function. Monitor in HEX to see the settings in BCD, indicated by "#" instead of "&".
IO_Rack pointed out that all Date settings are in BCD format, while you are inputting them in Decimal format. This mismatch may cause the instruction to fail due to being "out of range," leading to a revert to the previous time/date. To verify this, you can use P_ER immediately after the DATE function. To view the settings in BCD, monitor them in HEX format instead, where they will be indicated with "#" instead of "&". Do you confirm this is the issue you are facing? If so, it remains unchanged. Additionally, I want to clarify that I am simulating this scenario, which may impact the outcome.
I was referring to the "Hex" display in the monitoring window. When inputting values in the watch window or ladder, make sure to use "#" before the value. The Date function cannot be simulated due to its storage on the PLC. Since simulation works with a virtual PLC, it uses the computer's time instead. The limitations of simulation also apply to functions like PID and high-speed outputs. I confirmed the functionality of Hex (BCD) on a real PLC and in the simulator, with results matching.
It sounds like the DATE function is working as expected when the rung is true. It's showing the register values from D100-D103, which should be correct. When the rung is not true, it's logical that it reverts back to the PLC clock time since there are no instructions for it to display anything else. Consider implementing a check for the rung state, and if it's not true, you could then continue to display the register values. This way, your DATE function wonβt revert back to the PLC clock time.
From your explanation, it sounds like your configuration is overwriting your PLC clock time with register values when the DATE function is active. When the rung isn't true, it naturally reverts back to PLC clock time, as per default settings. It's possible that there's a conflict between the PLC's internal clock and the DATE function. To resolve this, you may need to adjust the write priority of the DATE function so it doesn't override when active, or consider using a different function if the DATE one doesn't meet your requirements.
Hi, it sounds like when the rung isn't true, the PLC clock gets priority, hence the revert. Make sure in your logic that the DATE function remains active continuously. You might be having an issue where it's only active during certain conditions. Try creating a dedicated rung for this function that is not reliant on other variables so your time stays consistent. It would be best if you continuously update the PLC clock with the D100-D103 values.
It sounds like you're experiencing a common issue with the way the DATE function interacts with the PLC's internal clock. Make sure that the rung controlling the DATE function is properly set up to hold the values when not active. It might help to add a latching mechanism or a separate memory register to store the values from D100-D103 when the rung goes false, so they don't revert back to the clock time. Double-check the enable conditions and see if that resolves the problem!
β Work Order Management
β Asset Tracking
β Preventive Maintenance
β Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: 1. How can I use the DATE function to program the clock on an Omron CJ2M PLC? - To program the clock using the DATE function on an Omron CJ2M PLC, you can utilize the A351-A354 registers which correspond to D100-D103 registers.
Answer: - This behavior is expected as the DATE function is controlling the display of register values. When the rung is true, the DATE function is active and displays the D100-D103 values. When the rung is not true, the PLC clock time is displayed.
Answer: - If you are experiencing issues with the DATE function, double-check your ladder logic programming to ensure that the conditions for the DATE function to be active are correctly set up. Additionally, verify that the A351-A354 registers are correctly linked to the D100-D103 registers.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.