=====Buttons, outputs and programs===== The controller work could be divided into two groups: controlling - where is set at which button which relays should be triggered and visualizing - where are set the names of the programs and their duration. {{ ::cwcontroller_buttons_relays.png?nolink |}} ==== Setting the buttons==== The controller maintains up to 16 different programs. Depending on the given signal or combination of signals it is chosen the relevant program. The inputs for the buttons are 6 and for the maintenance of more than 6 programs is needed the use of a combination of inputs, by separation diodes - look [[en:electrical_connections#buttons|Electrical connection]]. Setting the signals from the buttons to the corresponding program is done from the "Buttons and Relays" group, by setting the corresponding combination of "Input lines" for each group. ====Control of the relays==== For each program, is adjusted the state in which the six controlling relays should be. In the simplest control option, only the field "Relays on" is set, selecting one or a combination of several relays. Example 1: program 1 - relay 1, program 2 - relay 2, program 3 - relay 3.\\ Example 2: program 1 - relay 1, program 2 - relay 1+2, program 3 - relay 1+3, program 4 - relay 1+3+4. More complex programs, such as switching between hot and cold water, can be made through the field of "State-retaining relays". If relays 1-4 control the normal work and relay 5 turns on the hot water, then in the program with the button "hot water" will be set up: relays maintaining their state - 1, 2, 3, 4, turned on relay - 5. In this way, pushing the button will be turned on relay 5, without changing the work of the others. If the given relay is chosen in two groups - "Relays maintaining their state" and "Turned on relays" then t will work in a special way - as a switchable. If it was turned on, it will turn off and if it was turned off it will turn on. In this way, as in the previous example the program "hot water" can not only be activated, but with a second click could be turned off. For the "After the time is up" and "Switch relays (time)" fields, look at [[Outputs controlled by time]]. ====Visualization==== The group "View - work" consists of 16 subgroups presenting each program on the screen. The selection of the running group does not happen by pushing a button but with the state of the output relays. This is done to adequately reflect the different states and when using functions such as "Relays keeping their state" and [[Outputs controlled by time]]. Each group is identified by the "Relay Status" setting. It is also assigned a name to be displayed on the screen as well as colors for the remaining time sector in the stopwatch view. Additionally, individual counseling time can be set for a credit of 100 cents. At zero time, it is used, the total "Time per Coin". For more details on timings, look at [[Individual program times]]. ====Extra settings ==== **Buttons - normally closed inputs**\\ Some buttons, for instance, those for pause, are normally with closed contact. For them to be read simultaneously with their pressing and not upon release this setting is required. **Relays - normally closed outputs**\\ From here the work for one of the relays could be reversed. It could be turned on during the inactive state and turned off during the active state. **Relays - startup state**\\ The position of the relays when a coin is inserted. Here you can set a mode in which the machine starts immediately or for example to be set an extra piece of equipment - for example lights **Delay to switch the relays**\\ When switching from one mode to another, all the relays connected to the new mode are set in an inactive mode beforehand. Activate the new mode after the time is up.