Hello, I am using an Automation Direct D2-262 PLC and a C-more HMI EA9T6CL-R for a project. I'm looking to create a program that can be scheduled for a specific date and time in the future, which needs to be set through the HMI interface. With a deadline of 2 days, I am short on time to refer to the manual. Can you please provide a sample program for me to use? The task involves triggering an activity when the set date and time match. This requires the HMI to set the month, day, hour, and minute, which then compares to the PLC's values using a comparator instruction. Any assistance is greatly appreciated. Thanks, Roni.
Browse through the sample programs provided by Automation Direct for executing logic based on the time of day. These example programs, suitable for DirectLogic PLCs and various intelligent devices, can be downloaded from AutomationDirect's technical support page. Join the AutomationDirect community to connect with other users and access more helpful resources.
Hi Roni, I empathize with your time constraints. It's daunting to tackle such a task in such a short time. While I don't have an exact code to share for your specific use case, I would suggest starting with writing the logic for setting/retrieving the date and time from the HMI and implementing that into the PLC. Make sure to use the DATE and TIME data types to facilitate this. To perform the comparison, the GEQ (greater than or equal to) comparator may serve you well—it triggers the activity when the current date/time is more than or equal to the set date/time. Ensure to process the set date/time into the suitable format before this comparison. Don't hesitate to use the manuals as a reference for syntax, even if it can feel time-consuming—it's worth it for the accuracy. And finally, don't forget to carry out tests along the way. All the best!
Hi Roni, I understand your situation and won't take up too much of your valuable time. One solution could be to use the DATE_TIME_TO_INT instruction in your PLC program to convert your date and time to a single number. Then, setup corresponding numeric entry fields on your HMI panel that users can use to input a future date and time. When the PLC’s DATE_TIME_TO_INT value matches the HMI input, trigger your activity. Please note that special attention has to be paid to prevent false triggers around the roll-over times like midnight. I hope this helps! Feel free to ask if you have any additional questions. Good luck with your project!
✅ 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: - To set the date and time on the PLC using the HMI, you would typically create a program within the HMI interface that allows you to input the desired month, day, hour, and minute values. These values can then be sent to the PLC for comparison with its internal clock.
Answer: - While creating a sample program tailored to your specific requirements would be ideal, it is recommended to refer to the product manuals for detailed instructions on setting up scheduled tasks. However, you can consider creating logic that involves setting the date and time parameters and using a comparator instruction to trigger activities when they match.
Answer: - To compare the set date and time values from the HMI with the PLC's clock, you would typically use a comparator instruction in your PLC program. This instruction would compare the input values (month, day, hour, minute) from the HMI with the current values stored in the PLC's clock registers. If there is a match, you can then trigger
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.