-
Notifications
You must be signed in to change notification settings - Fork 125
Typical_T2n
A detailed description of the T2n class is included below.
It handle OPEN / CLOSE devices with alternate direction moving throught the STOP state. Is used for garage doors or generally devices that need to be fully opened or closed.
Once a command, it remain active until the relevant limit switch is recognized or the associated timer is expired. Timer must be used for proper release of command. Limit switches are not mandatory, but if not used, the device engine shall be protected from extra current or shall have its own control center.
Hardware Limit Switches:
Using bistable switches for identification of open and close position
- Souliss_T2n_LimSwitch_Close 0x08
- Souliss_T2n_LimSwitch_Open 0x10
Hardware Command:
Using a monostable wall switch (press and spring return) or a software command from user interface, each press will toggle the output status.
- Souliss_T2n_ToggleCmd 0x04
Software Command:
- Souliss_T2n_CloseCmd 0x01
- Souliss_T2n_OpenCmd 0x02
- Souliss_T2n_StopCmd 0x03
Output status:
- 1(hex) for CLOSE,
- 2(hex) for OPEN,
- 3(hex) for STOP.
It handle OPEN / CLOSE devices with alternate direction, dedicated commands for OPEN, CLOSE and STOP are available. Every state change goes through the STOP command for security reason. Is used for curtains or other devices that need an adjustable position.
Once a command, it remain active until the relevant limit switch is recognized or the associated timer is expired. Timer must be used for proper release of command. Limit switches are not mandatory, but if not used, the device engine shall be protected from extra current or shall have its own control center.
Hardware Limit Switches :
Using bistable switches for identification of open and close position
- Souliss_T2n_LimSwitch_Close 0x14
- Souliss_T2n_LimSwitch_Open 0x16
Hardware and/or Software Command:
Using a monostable wall switch (press and spring return) or a software command from user interface, each press will toggle the output status.
- Souliss_T2n_CloseCmd_Local 0x08
- Souliss_T2n_OpenCmd_Local 0x10
- Souliss_T2n_StopCmd 0x04
Following constant are defined for sketch source compatibility with versions < A6.1.1 and their use is now deprecated.
- Souliss_T2n_CloseCmd 0x01
- Souliss_T2n_OpenCmd 0x02
This commands are designed to be used by an application (Souliss App, OpenHAB binding, user applications) in order to support software "scenario". When the Open/Close command is received it is always excuted; if the motor is running opposite direction it stops for 4 cycles then it revert motion.
- Souliss_T2n_CloseCmd_SW 0x01
- Souliss_T2n_OpenCmd_SW 0x02
- Souliss_T2n_StopCmd 0x03
Command recap, using:
- 0x01(hex) as command, Software CLOSE request (stop 4 cycles if opening)
- 0x02(hex) as command, Software OPEN request (stop 4 cycles if closing)
- 0x04(hex) as command, STOP request
- 0x08(hex) as command, CLOSE request (stop if opening)
- 0x10(hex) as command, OPEN request (stop if closing)
Output status:
- 1(hex) for CLOSING,
- 2(hex) for OPENING,
- 3(hex) for STOP.
- 8(hex) for CLOSE
- 10(hex for OPEN
The timer is used in all T2n to define the travel time between the open and close position and viceversa, when limit switches are used, the timer has no function and the open or close position is shown once the limit switch is in place.
In most of the cases there are no limit switch and the open or close position is shown once the timer is expired, by default the elapse time given by the difference between (Souliss_T2n_Timer_Val - Souliss_T2n_Timer_Off)
as number of execution time of the timer.
- Souliss_T2n_Timer_Val 0xC0
- Souliss_T2n_Timer_Off 0xA0
The total amount of time is
(Souliss_T2n_Timer_Val - Souliss_T2n_Timer_Off)*Timer_Execution
and can be customized running the T22_Timer
and different rates or passing the timer value as parameter of
Souliss_Logic_T22(U8 *memory_map, U8 slot, U8 *trigger, U8 timeout = Souliss_T2n_Timer_Val)
.
Please consider that you cannot specify a different timeout value using the SpeakEasy macro, so you need to use the extended syntax as below
Logic_T22(slot);
is equivalent to
Souliss_Logic_T22(memory_map, slot, &data_changed, Souliss_T2n_Timer_Val);
- Introduction
- Getting started
- User Interfaces
- Build your Souliss
- Examples
- Boards
- Interfaces
- Hacks
- Advanced
- Source Code
- Downloads
- Community