This example shows you how to create a project where a machine is working according to a time and date entered by the user via the keypad.
Select Indirect Clock Functions from the Clock menu of the Ladder toolbar.
Select Time from the Indirect Clock Functions menu.
Enter the desired Operand, Address and Symbol.
The Hour function appears with the selected Operand and Address. Note that the hour function is checking a range between two MIs / SIs. Therefore, two Operands are needed: the beginning and the end of the range.
The program automatically takes the next Operand from the one you enter. According to the following example, you enter MI 1 and the program assigns the end of the range to MI 2, the next MI.
Select Day Of The Week from the Indirect Clock Function menu.
Place the Day Of The Week function on the desired net. Enter the desired Operand, Address and Symbol.
The Day Of The Week function appears with the selected Operand, Address and Symbol on the net.
Select Day of the Month from the Indirect Clock Function menu.
Enter the desired Operand, Address and Symbol. The Day of the Month function is a 32 - bit Bit map. Therefore it requires two MIs / SIs.
The program automatically takes the next Operand from the one you enter. According to the following example, you enter MI 4 and the program assigns the end of the range to MI 5, the next MI.
Select Month from the Indirect Clock Functions menu.
Enter the desired Operand, Address and Symbol.
Place a Direct Coil at the end of the rung. Enter the desired Operand, Address and Symbol.
The net appears as shown in the next figure.
To enable the user to view and modify the Indirect Clock function values, you must now create HMI Displays and Variables. Click Variables on the Standard toolbar.
The Variable Editor opens. Select Time Functions for each Variable. Link the Variable to the appropriate MI. Select the appropriate Variable Information Format for the time. Below is the Start Time Variable for the time in hours.
The End Time Variable for the time in hours.
The Day of the Week Variable.
The Day of Month Variable.
The Month Variable.
Create the Displays for the Variables. Below is an example for viewing the time range in hours.
When you download the application to the controller, the user will use the Up/Down arrow keys to scroll through the days of the week, days of the month and month. When the display shows the correct day, the user selects it by pressing the Enter key.
Note that in M90/91 controllers the Up key is numeric key 3, and the Down key is numeric key 6.
Known issue: In Jazz controllers, when the keypad is taken over by the Indirect Clock functions Day of Week, Day of Month, and Month, the current Up key is numeric key 3, and the Down key is numeric key 6. This will be fixed in a future release.