Limbs Safety Switch Library for ESP32 (Arduino) v1.0.1
A library that provides a class that models a Limbs Safety Switch for physical dangerous devices or industrial production machines.
Loading...
Searching...
No Matches
LimbsSftyLnFSwtch Class Reference

Models a Limbs Safety Launch and Forget Switch (LimbsSftyLnFSwtch) for safely activation of "launch and forget" cycle machines and devices. More...

#include <LimbsSafetySw_ESP32.h>

Collaboration diagram for LimbsSftyLnFSwtch:

Public Member Functions

 LimbsSftyLnFSwtch ()
 Class default constructor.
 
 LimbsSftyLnFSwtch (swtchInptHwCfg_t lftHndInpCfg, swtchBhvrCfg_t lftHndBhvrCfg, swtchInptHwCfg_t rghtHndInpCfg, swtchBhvrCfg_t rghtHndBhvrCfg, swtchInptHwCfg_t ftInpCfg, swtchBhvrCfg_t ftBhvrCfg, lsSwtchSwCfg_t lsSwtchWrkngCnfg)
 Class constructor.
 
 ~LimbsSftyLnFSwtch ()
 Default virtual destructor.
 
bool begin (unsigned long int pollDelayMs=_minPollDelay)
 Attaches the instantiated object to a timer that monitors the input pins and updates the object status.
 
void clrStatus ()
 Clears and resets flags, timers and counters modified through the object's signals processing.
 
void cnfgFtSwtch (const swtchBhvrCfg_t &newCfg)
 Configures the SnglSrvcVdblMPBttn class object used as Foot Switch
 
bool cnfgLftHndSwtch (const swtchBhvrCfg_t &newCfg)
 Configures the TmVdblMPBttn class object used as Left Hand Switch
 
bool cnfgRghtHndSwtch (const swtchBhvrCfg_t &newCfg)
 Configures the TmVdblMPBttn class object used as Right Hand Switch
 
fncVdPtrPrmPtrType getFnWhnTrnOffLtchRlsPtr ()
 Returns the function that is set to execute every time the object's Latch Release is set to Off State.
 
fncVdPtrPrmPtrType getFnWhnTrnOffPrdCyclPtr ()
 Returns the function that is set to execute every time the object's Production Cycle is set to Off State.
 
fncVdPtrPrmPtrType getFnWhnTrnOnLtchRlsPtr ()
 Returns the function that is set to execute every time the object's Latch Release is set to On State.
 
fncVdPtrPrmPtrType getFnWhnTrnOnPrdCyclPtr ()
 Returns the function that is set to execute every time the object's Production Cycle is set to On State.
 
SnglSrvcVdblMPBttn * getFtSwtchPtr ()
 Get the ftSwcthPtr attribute value.
 
TmVdblMPBttn * getLftHndSwtchPtr ()
 Get the lftHndSwcthPtr attribute value.
 
const bool getLsSwtchOtptsChng () const
 Returns the value of the lsSwtchOtptsChng attribute flag.
 
uint32_t getLsSwtchOtptsSttsPkgd ()
 Returns the relevant attribute flags values for the object state encoded as a 32 bits value, required to pass current state of the object to another thread/task managing the outputs changes.
 
const bool getLtchRlsIsOn () const
 Returns the ltchRlsIsOn attribute flag value.
 
unsigned long int getLtchRlsTtlTm ()
 Returns the time configured to keep the Latch Released state On
 
const bool getPrdCyclIsOn () const
 Returns the prdCyclIsOn attribute flag value.
 
unsigned long int getPrdCyclTtlTm ()
 Returns the time configured for the production cycle to be completed.
 
TmVdblMPBttn * getRghtHndSwtchPtr ()
 Returns the rghtHndSwcthPtr attribute value.
 
const TaskHandle_t getTskToNtfyBthHndsOnMssd () const
 Returns the TaskHandle for the task to be unblocked when the object's state changes from the "foot switch enabled" state to the "foot switch disabled" state, instead of the "Production cycle activated" state.
 
const TaskHandle_t getTskToNtfyLsSwtchOtptsChng () const
 Returns the TaskHandle for the task to be unblocked when the object's lsSwtchOtptsChng attribute flags is set to true.
 
const TaskHandle_t getTskToNtfyTrnOffLtchRls () const
 Returns the TaskHandle for the task to be unblocked when the object's ltchRlsIsOn attribute flag is set to false.
 
const TaskHandle_t getTskToNtfyTrnOffPrdCycl () const
 Returns the TaskHandle for the task to be unblocked when the object's prdCyclIsOn attribute flag is set to false.
 
const TaskHandle_t getTskToNtfyTrnOnLtchRls () const
 Returns the TaskHandle for the task to be unblocked when the object's prdCyclIsOn attribute flag is set to true.
 
const TaskHandle_t getTskToNtfyTrnOnPrdCycl () const
 Returns the TaskHandle for the task to be unblocked when the object's prdCyclIsOn attribute flag is set to true.
 
void resetFda ()
 Resets the LsSwitch behavior automaton to it's Initial or Start State
 
void setFnWhnBthHndsOnMssd (fncVdPtrPrmPtrType &newFnWhnBthHndsOnMssd)
 Sets the function to be executed when the object's state changes from the "foot switch enabled" to the "foot switch disabled" instead of the "Production cycle activated" state.
 
void setFnWhnTrnOffLtchRlsPtr (fncVdPtrPrmPtrType &newFnWhnTrnOff)
 Sets the function to be executed when the object's ltchRlsIsOn attribute flag is set to false.
 
void setFnWhnTrnOffPrdCyclPtr (fncVdPtrPrmPtrType &newFnWhnTrnOff)
 Sets the function to be executed when the object's prdCyclIsOn attribute flag is set to false.
 
void setFnWhnTrnOnLtchRlsPtr (fncVdPtrPrmPtrType &newFnWhnTrnOn)
 Sets the function to be executed when the object's ltchRlsIsOn attribute flag is set to true.
 
void setFnWhnTrnOnPrdCyclPtr (fncVdPtrPrmPtrType &newFnWhnTrnOn)
 Sets the function to be executed when the object's prdCyclIsOn attribute flag is set to true.
 
void setLsSwtchOtptsChng (bool newLsSwtchOtptsChng)
 Sets the value of the attribute flag indicating if a change took place in any of the output attribute flags.
 
bool setLtchRlsTtlTm (const unsigned long int &newVal)
 Set the Latch Release Total Time (ltchRlsTtlTm) attribute value.
 
bool setPrdCyclTtlTm (const unsigned long int &newVal)
 Set the Production Cycle Total Time (prdCyclTtlTm) attribute value.
 
void setTrnOffLtchRlsArgPtr (void *&newVal)
 Sets the pointer to the arguments for the function to be executed when the object's ltchRlsIsOn attribute flag is set to false.
 
void setTrnOffPrdCyclArgPtr (void *&newVal)
 Sets the pointer to the arguments for the function to be executed when the object's prdCyclIsOn attribute flag is set to false.
 
void setTrnOnLtchRlsArgPtr (void *&newVal)
 Sets the pointer to the arguments for the function to be executed when the object's ltchRlsIsOn attribute flag is set to true.
 
void setTrnOnPrdCyclArgPtr (void *&newVal)
 Sets the pointer to the arguments for the function to be executed when the object's prdCyclIsOn attribute flag is set to true.
 
void setTskToNtfyBthHndsOnMssd (const TaskHandle_t &newTaskHandle)
 Sets the task to be unblocked -by a xTaskNotify()- when the object's state changes from the "foot switch enabled" to the "foot switch disabled" instead of the "Production cycle activated" state.
 
void setTskToNtfyLsSwtchOtptsChng (const TaskHandle_t &newTaskHandle)
 Sets the task to be unblocked -by a xTaskNotify()- when ANY of the object's attribute flags changes it's value.
 
void setTskToNtfyTrnOffLtchRls (const TaskHandle_t &newTaskHandle)
 Sets the task to be unblocked -by a xTaskNotify()- when the object's ltchRlsIsOn attribute flag is set to false.
 
void setTskToNtfyTrnOffPrdCycl (const TaskHandle_t &newTaskHandle)
 Sets the task to be unblocked -by a xTaskNotify()- when the object's prdCyclIsOn attribute flag is set to false.
 
void setTskToNtfyTrnOnLtchRls (const TaskHandle_t &newTaskHandle)
 Sets the task to be unblocked -by a xTaskNotify()- when the object's ltchRlsIsOn attribute flag is set to true.
 
void setTskToNtfyTrnOnPrdCycl (const TaskHandle_t &newTaskHandle)
 Sets the task to be unblocked -by a xTaskNotify()- when the object's prdCyclIsOn attribute flag is set to true.
 
bool setUndrlSwtchsPollDelay (const unsigned long int &newVal)
 Sets the update period length for the DbncdMPBttn subclasses objects used as input by the LimbsSftyLnFSwtch.
 

Detailed Description

Models a Limbs Safety Launch and Forget Switch (LimbsSftyLnFSwtch) for safely activation of "launch and forget" cycle machines and devices.

This industry grade machinery oriented switch enforces conditioned activation of several switches to ensure limbs security, enabled for ISO 13849-1 standard compliance. This enforced conditions include sequenced pressing order and timings as main parameters. The most basic configuration requires each hand pressing simultaneously two switches to enable a foot switch. The enabled foot switch activates the machine action.
Operators' or production managers' needs and criteria often end with regular security switches tampered, played down, rigged or other actions that degrade the security provided by regular switches, far below the real needs and the standards. The switches modeled by this class ensures the required enforced security practices, while letting some aspects to be configured for specific production tasks on the machine, or to adapt the switch to machines with different security needs.

This class relies on ButtonToSwitch_ESP32 class objects:

  • A TmVdblMPBttn object for each hand switch
  • A SnglSrvcVdblMPBttn object for the foot switch

Constructor & Destructor Documentation

◆ LimbsSftyLnFSwtch()

LimbsSftyLnFSwtch::LimbsSftyLnFSwtch ( swtchInptHwCfg_t lftHndInpCfg,
swtchBhvrCfg_t lftHndBhvrCfg,
swtchInptHwCfg_t rghtHndInpCfg,
swtchBhvrCfg_t rghtHndBhvrCfg,
swtchInptHwCfg_t ftInpCfg,
swtchBhvrCfg_t ftBhvrCfg,
lsSwtchSwCfg_t lsSwtchWrkngCnfg )

Class constructor.

The class models a Limbs Safety switch, a switch that gives an activation signal to a machine or device when some independent switches, activated in a designated pattern, ensures no risk for the operator limbs is completed. The constructor instantiates the DbncdMPBttn subclasses objects that compose the Limbs Safety switch, i.e. the left hand TmVdblMPBttn, the right hand TmVdblMPBttn and the foot SnglSrvcVdblMPBttn

Parameters
lftHndInpCfgA swtchInptHwCfg_t structure containing the hardware implemented characteristics for the left hand controlled TmVdblMPBttn
lftHndBhvrCfgA swtchBhvrCfg_t structure containing the behavior characteristics for the left hand controlled TmVdblMPBttn
rghtHndInpCfgA swtchInptHwCfg_t structure containing the hardware implemented characteristics for the right hand controlled TmVdblMPBttn
rghtHndBhvrCfgA swtchBhvrCfg_t structure containing the behavior characteristics for the right hand controlled TmVdblMPBttn
ftInpCfgA swtchInptHwCfg_t structure containing the hardware implemented characteristics for the foot controlled SnglSrvcVdblMPBttn
ftBhvrCfgA swtchBhvrCfg_t structure containing the behavior characteristics for the foot controlled SnglSrvcVdblMPBttn
lsSwtchWrkngCnfgA lsSwtchSwCfg_t structure containing the basic parameters needed for the instantiated object interface with the machine. The parameters provided for instantiation might be changed by dedicated setters

Member Function Documentation

◆ begin()

bool LimbsSftyLnFSwtch::begin ( unsigned long int pollDelayMs = _minPollDelay)

Attaches the instantiated object to a timer that monitors the input pins and updates the object status.

The frequency of the periodic monitoring is passed as a parameter in milliseconds, and is a value that must be small (frequent) enough to keep the object updated, but not so frequent that wastes resources needed by other tasks. As the DbncdMPBttn objects components of the switch have a minimum default value, the same is provided for this method, as it makes no sense to check for changes in objects that refresh themselves slower than the checking length period.

Parameters
pollDelayMs(Optional) unsigned long integer (ulong), the time between status updates in milliseconds.
Returns
The success in starting the updating timer with the provided update time
Return values
trueTimer starting operation success for the object and for the underlying DbncdMPBttn subclasses objects
Returns
false Timer starting operation failure for at least one of the four timers being started

◆ clrStatus()

void LimbsSftyLnFSwtch::clrStatus ( )

Clears and resets flags, timers and counters modified through the object's signals processing.

Resets object's attributes to its initialization values to safely continue operations after completing a FDA cycle that might generate unexpected distortions. This avoids risky behavior of the object due to dangling flags or partially consumed time counters.

Here is the caller graph for this function:

◆ cnfgFtSwtch()

void LimbsSftyLnFSwtch::cnfgFtSwtch ( const swtchBhvrCfg_t & newCfg)

Configures the SnglSrvcVdblMPBttn class object used as Foot Switch

Some behavior attributes of the DbncdMPBttn subclasses objects components can be configured to adjust the behavior of the LimbsSftyLnFSwtch. In the case of the SnglSrvcVdblMPBttn used as Foot Switch the only attribute available for adjustment is the start delay value, used to adjust the time the foot switch must be kept pressed after the debounce period, before the switch accepts the input signal. This parameter is used to adjust the "sensibility" of the switch to mistaken, accidental or conditioned reflex presses.

Parameters
newCfgA swtchBhvrCfg_t type structure, from which only the .swtchStrtDlyTm value will be used.

◆ cnfgLftHndSwtch()

bool LimbsSftyLnFSwtch::cnfgLftHndSwtch ( const swtchBhvrCfg_t & newCfg)

Configures the TmVdblMPBttn class object used as Left Hand Switch

Some behavior attributes of the DbncdMPBttn subclasses objects components can be configured to adjust the behavior of the LimbsSftyLnFSwtch. In the case of the TmVdblMPBttn used as Left Hand Switch the attributes available for adjustment are:

  • Start Delay (.swtchStrtDlyTm) value, used to adjust the time the hand switch must be kept pressed after the debounce period, before the switch accepts the input signal. This parameter is used to adjust the "sensibility" of the switch to mistaken, accidental or conditioned reflex presses.
  • Is Enabled (.swtchIsEnbld) value, defines if the hand switch will be enabled, in which case it will be considered for the LimbsSftyLnFSwtch state calculation -having to be pressed at the expected moment, for the expected time and be released when expected to restart the cycle- or disabled, in which case it being pressed or not makes no difference to the LimbsSftyLnFSwtch state calculation.
  • Switch Voiding Time (.swtchVdTm) defines the time period the hand switch might be kept pressed before signaling it as voided, having to proceed to release it and press it back to return to the valid pressed (non-voided) state.
Parameters
newCfgA swtchBhvrCfg_t type structure, containing the parameters values that will be used to modify the configuration of the TmVdblMPBttn class object.
Warning
The swtchBhvrCfg_t type structure has designated default field values, as a consequence any field not expressly filled with a valid value will be set to be filled with the default value. If not all the fields are to be changed, be sure to fill the non changing fields with the current values to ensure only the intended fields are to be changed! For that purpose keep the current configuration values always updated in variables.

◆ cnfgRghtHndSwtch()

bool LimbsSftyLnFSwtch::cnfgRghtHndSwtch ( const swtchBhvrCfg_t & newCfg)

Configures the TmVdblMPBttn class object used as Right Hand Switch

Some behavior attributes of the DbncdMPBttn subclasses objects components can be configured to adjust the behavior of the LimbsSftyLnFSwtch. In the case of the TmVdblMPBttn used as Right Hand Switch the attributes available for adjustment are:

  • Start Delay (.swtchStrtDlyTm) value, used to adjust the time the hand switch must be kept pressed after the debounce period, before the switch accepts the input signal. This parameter is used to adjust the "sensibility" of the switch to mistaken, accidental or conditioned reflex presses.
  • Is Enabled (.swtchIsEnbld) value, defines if the hand switch will be enabled, in which case it will be considered for the LimbsSftyLnFSwtch state calculation -having to be pressed at the exprected moment, for the expected time and be released when expected to restart the cycle- or disabled, in which case it being pressed or not makes no difference to the LimbsSftyLnFSwtch state calculation.
  • Switch Voiding Time (.swtchVdTm) defines the time period the hand switch might be kept pressed before signaling it as voided, having to proceed to release it and press it back to return to the valid pressed (non-voided) state.
Parameters
newCfgA swtchBhvrCfg_t type structure, containing the parameters values that will be used to modify the configuration of the TmVdblMPBttn class object.
Warning
The swtchBhvrCfg_t type structure has designated default field values, as a consequence any field not expressly filled with a valid value will be set to be filled with the default value. If not all the fields are to be changed, be sure to fill the non changing fields with the current value to ensure only the intended fields are to be changed! For that purpose keep the current configuration values always updated in variables.

◆ getFnWhnTrnOffLtchRlsPtr()

fncVdPtrPrmPtrType LimbsSftyLnFSwtch::getFnWhnTrnOffLtchRlsPtr ( )

Returns the function that is set to execute every time the object's Latch Release is set to Off State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffLtchRlsPtr() method. If such function is set, it will be executed every time the **_ltchRlsIsOn** attribute flag is set to false

Returns
A pointer to the function set to execute every time the object's indicated attribute flag value is set as described.
Return values
nullptrif there is no function set to execute when the object enters the indicated condition.
Warning
The function code execution will become part of the list of procedures the object executes when entering the indicated condition, including the modification of the affected attribute flags, the unblocking of a task and (maybe) others. Making the function code too time demanding must be handled with care as execution of the function might block other tasks with lower execution priority.

◆ getFnWhnTrnOffPrdCyclPtr()

fncVdPtrPrmPtrType LimbsSftyLnFSwtch::getFnWhnTrnOffPrdCyclPtr ( )

Returns the function that is set to execute every time the object's Production Cycle is set to Off State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffPrdCyclPtr() method. If such function is set, it will be executed every time the **_prdCyclIsOn** attribute flag is set to false

Returns
A pointer to the function set to execute every time the object's indicated attribute flag value is set as described.
Return values
nullptrif there is no function set to execute when the object enters the indicated condition.
Warning
The function code execution will become part of the list of procedures the object executes when entering the indicated condition, including the modification of the affected attribute flags, the unblocking of a task and (maybe) others. Making the function code too time demanding must be handled with care as execution of the function might block other tasks with lower execution priority.

◆ getFnWhnTrnOnLtchRlsPtr()

fncVdPtrPrmPtrType LimbsSftyLnFSwtch::getFnWhnTrnOnLtchRlsPtr ( )

Returns the function that is set to execute every time the object's Latch Release is set to On State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnLtchRlsPtr() method. If such function is set, it will be executed every time the **_ltchRlsIsOn** attribute flag is set to true

Returns
A pointer to the function set to execute every time the object's indicated attribute flag value is set as described.
Return values
nullptrif there is no function set to execute when the object enters the indicated condition.
Warning
The function code execution will become part of the list of procedures the object executes when entering the indicated condition, including the modification of the affected attribute flags, the unblocking of a task and (maybe) others. Making the function code too time demanding must be handled with care as execution of the function might block other tasks with lower execution priority.

◆ getFnWhnTrnOnPrdCyclPtr()

fncVdPtrPrmPtrType LimbsSftyLnFSwtch::getFnWhnTrnOnPrdCyclPtr ( )

Returns the function that is set to execute every time the object's Production Cycle is set to On State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnPrdCyclPtr() method. If such function is set, it will be executed every time the **_prdCyclIsOn** attribute flag is set to true

Returns
A pointer to the function set to execute every time the object's indicated attribute flag value is set as described.
Return values
nullptrif there is no function set to execute when the object enters the indicated condition.
Warning
The function code execution will become part of the list of procedures the object executes when it entering the indicated condition, including the modification of the affected attribute flags, the unblocking of a task and (maybe) others. Making the function code too time demanding must be handled with care as execution of the function might block other tasks with lower execution priority.

◆ getFtSwtchPtr()

SnglSrvcVdblMPBttn * LimbsSftyLnFSwtch::getFtSwtchPtr ( )

Get the ftSwcthPtr attribute value.

The ftSwcthPtr is the pointer to the SnglSrvcVdblMPBttn class object instantiated to be the "Foot Safety Switch", so to have direct access to it's public members without going through a LimbsSftyLnFSwtch interface.

Returns
The SnglSrvcVdblMPBttn class pointer to the foot switch
Warning
The open access to the underlying SnglSrvcVdblMPBttn complete set of public members may imply risks by letting the developer to modify some attributes of the underlying object in unexpected ways, not compatible with the LimbsSftyLnFSwtch object construction. Limit the use of the TmVdblMPBttn set of public members to the getters as much as possible!

◆ getLftHndSwtchPtr()

TmVdblMPBttn * LimbsSftyLnFSwtch::getLftHndSwtchPtr ( )

Get the lftHndSwcthPtr attribute value.

The lftHndSwcthPtr is the pointer to the TmVdblMPBttn class object instantiated to be the "Left Hand Safety Switch", so to have direct access to it's public members without going through a LimbsSftyLnFSwtch interface.

Returns
The TmVdblMPBttn class pointer to the left hand switch
Warning
The open access to the underlying TmVdblMPBttn complete set of public members may imply risks by letting the developer to modify some attributes of the underlying object in unexpected ways, not compatible with the LimbsSftyLnFSwtch object construction. Limit the use of the TmVdblMPBttn set of public members to the getters as much as possible!

◆ getLsSwtchOtptsChng()

const bool LimbsSftyLnFSwtch::getLsSwtchOtptsChng ( ) const

Returns the value of the lsSwtchOtptsChng attribute flag.

The instantiated objects includes attributes linked to their evaluated states, -Attribute Flags- some of them for internal use, some of them for output related purposes. When any of those latter attributes values change, the outputsChange flag is set. The flag only signals that changes have happened -not which flags, nor how many times changes have taken place- since the last outputsChange flag reset, although an internal counter is kept to grant no multithread race conditions affect the correct execution of the outputs updates. The outputsChange flag must be reset (or set if desired) through the setOutputsChange() method.

Return values
trueAny of the object's output related behavior attribute flags have changed value since last time outputsChange flag was reset.
falseno object's output related behavior attribute flags have changed value since last time outputsChange flag was reset.

◆ getLsSwtchOtptsSttsPkgd()

uint32_t LimbsSftyLnFSwtch::getLsSwtchOtptsSttsPkgd ( )

Returns the relevant attribute flags values for the object state encoded as a 32 bits value, required to pass current state of the object to another thread/task managing the outputs changes.

The inter-tasks communication mechanisms implemented on the class includes a xTaskNotify() that works as a light-weigh mailbox, unblocking the receiving tasks and sending to it a 32_bit value notification. This function returns the relevant attribute flags values encoded in a 32 bit value, according to the provided encoding documented.

Returns
A 32-bit unsigned value representing the attribute flags current values.
Note
For ease of use and resources optimization the encoded 32 bits value includes state information referenced to the underlying DbncdMPBttn subclasses objects isEnabled and isOn for each one of them.
For a complete description of the 32-bit value encoded logic see lssOtptsSttsUnpkg(uint32_t)

◆ getLtchRlsIsOn()

const bool LimbsSftyLnFSwtch::getLtchRlsIsOn ( ) const

Returns the ltchRlsIsOn attribute flag value.

The ltchRlsIsOn attribute flag indicates if the object is in the Latch Released state.

Return values
trueThe object is in the latch released state
falseThe object is in the latch not released state

◆ getLtchRlsTtlTm()

unsigned long int LimbsSftyLnFSwtch::getLtchRlsTtlTm ( )

Returns the time configured to keep the Latch Released state On

Returns
The time in milliseconds the latch will be kept released

◆ getPrdCyclIsOn()

const bool LimbsSftyLnFSwtch::getPrdCyclIsOn ( ) const

Returns the prdCyclIsOn attribute flag value.

The prdCyclIsOn attribute flag indicates if the object is in the Production Cycle state.

Return values
trueThe object is in the production cycle on state
falseThe object is not in the production cycle on state

◆ getPrdCyclTtlTm()

unsigned long int LimbsSftyLnFSwtch::getPrdCyclTtlTm ( )

Returns the time configured for the production cycle to be completed.

Due to the lack of sensors to register the end/completetion of the production cycle a timer will be set to control the time since the production cycle start and until the cycle is considered completed. This method returns the time configured for that timer

Returns
The time in milliseconds the control will consider being in the production cycle state. After completing the time the cycle will be considered concluded and the limbs safety switches will be re-enabled to start a new cycle.

◆ getRghtHndSwtchPtr()

TmVdblMPBttn * LimbsSftyLnFSwtch::getRghtHndSwtchPtr ( )

Returns the rghtHndSwcthPtr attribute value.

The rghtHndSwcthPtr is the pointer to the TmVdblMPBttn class object instantiated to be the "Right Hand Safety Switch", so to have direct access to it's public members (including setters and getters) without going through a LimbsSftyLnFSwtch interface.

Returns
The TmVdblMPBttn class pointer to the right hand switch
Warning
The open access to the underlying TmVdblMPBttn complete set of public members may imply risks by letting the developer to modify some attributes of the underlying object in unexpected ways, not compatible with the LimbsSftyLnFSwtch object construction. Limit the use of the TmVdblMPBttn set of public members to the getters as much as possible!

◆ getTskToNtfyBthHndsOnMssd()

const TaskHandle_t LimbsSftyLnFSwtch::getTskToNtfyBthHndsOnMssd ( ) const

Returns the TaskHandle for the task to be unblocked when the object's state changes from the "foot switch enabled" state to the "foot switch disabled" state, instead of the "Production cycle activated" state.

When the object changes it's state as mentioned, it means an opportunity to activate the production cycle, which is the main purpose of the use of the machine, was wasted. The opportunity of unblocking a blocked task as part of that state transition gives a tool to deal with this situations. Either to react immediately, either to register this situations, as the proportion of these failures compared to the expected behavior may indicate a potential anomaly either in the parameters configuration, command switches failures, machine operator related problems and other cases that harm present productivity and might end in a undesired situation. This method returns the TaskHandle for the task to unblock.

Note
When the value returned is NULL, the task notification mechanism is disabled. The mechanism can be enabled by setting a valid TaskHandle value by using the setTskToNtfyBthHndsOnMssd(const TaskHandle_t) method.
Attention
The task referred to by this handle is one of the fundamental pieces for the integration of a "Productivity control and improvement system".

◆ getTskToNtfyLsSwtchOtptsChng()

const TaskHandle_t LimbsSftyLnFSwtch::getTskToNtfyLsSwtchOtptsChng ( ) const

Returns the TaskHandle for the task to be unblocked when the object's lsSwtchOtptsChng attribute flags is set to true.

One of the optional mechanisms activated when any attribute flag that includes the mechanism to modify an output pin is the unblocking of a task. This method returns the TaskHandle for the task to unblock.

Note
When the value returned is NULL, the task notification mechanism is disabled. The mechanism can be enabled by setting a valid TaskHandle value by using the setTskToNtfyLsSwtchOtptsChng(const TaskHandle_t) method.

◆ getTskToNtfyTrnOffLtchRls()

const TaskHandle_t LimbsSftyLnFSwtch::getTskToNtfyTrnOffLtchRls ( ) const

Returns the TaskHandle for the task to be unblocked when the object's ltchRlsIsOn attribute flag is set to false.

One of the optional mechanisms activated by entering the Latch Release is Off (ltchRlsIsOn = false) state is the unblocking of a task. This method returns the TaskHandle for the task to unblock.

Note
When the value returned is NULL, the task notification mechanism is disabled. The mechanism can be enabled by setting a valid TaskHandle value by using the setTskToNtfyTrnOffLtchRls(const TaskHandle_t) method.

◆ getTskToNtfyTrnOffPrdCycl()

const TaskHandle_t LimbsSftyLnFSwtch::getTskToNtfyTrnOffPrdCycl ( ) const

Returns the TaskHandle for the task to be unblocked when the object's prdCyclIsOn attribute flag is set to false.

One of the optional mechanisms activated by entering the Production cycle is Off (prdCyclIsOn = false) state is the unblocking of a task. This method returns the TaskHandle for the task to unblock.

Note
When the value returned is NULL, the task notification mechanism is disabled. The mechanism can be enabled by setting a valid TaskHandle value by using the setTskToNtfyTrnOffPrdCycl(const TaskHandle_t &newTaskHandle) method.

◆ getTskToNtfyTrnOnLtchRls()

const TaskHandle_t LimbsSftyLnFSwtch::getTskToNtfyTrnOnLtchRls ( ) const

Returns the TaskHandle for the task to be unblocked when the object's prdCyclIsOn attribute flag is set to true.

One of the optional mechanisms activated by entering the Latch Release is On (ltchRlsIsOn = true) state is the unblocking of a task. This method returns the TaskHandle for the task to unblock.

Note
When the value returned is NULL, the task notification mechanism is disabled. The mechanism can be enabled by setting a valid TaskHandle value by using the setTskToNtfyTrnOnLtchRls(const TaskHandle_t) method.

◆ getTskToNtfyTrnOnPrdCycl()

const TaskHandle_t LimbsSftyLnFSwtch::getTskToNtfyTrnOnPrdCycl ( ) const

Returns the TaskHandle for the task to be unblocked when the object's prdCyclIsOn attribute flag is set to true.

One of the optional mechanisms activated by entering the Production cycle is On (prdCyclIsOn = true) state is the unblocking of a task. This method returns the TaskHandle for the task to unblock.

Note
When the value returned is NULL, the task notification mechanism is disabled. The mechanism can be enabled by setting a valid TaskHandle value by using the setTskToNtfyTrnOnPrdCycl(const TaskHandle_t) method.

◆ resetFda()

void LimbsSftyLnFSwtch::resetFda ( )

Resets the LsSwitch behavior automaton to it's Initial or Start State

This method is provided for security and for error handling purposes, so that in case of unexpected situations detected, the driving Deterministic Finite Automaton used to compute the objects' states might be reset to it's initial state to safely restart it, maybe as part of an Error Handling procedure.

Here is the call graph for this function:

◆ setFnWhnBthHndsOnMssd()

void LimbsSftyLnFSwtch::setFnWhnBthHndsOnMssd ( fncVdPtrPrmPtrType & newFnWhnBthHndsOnMssd)

Sets the function to be executed when the object's state changes from the "foot switch enabled" to the "foot switch disabled" instead of the "Production cycle activated" state.

When the object changes it's state as mentioned, it means an opportunity to activate the production cycle, which is the main purpose of the use of the machine, was wasted. The opportunity to execute a function as part of that state transition gives a tool to deal with this situations. Either to react immediately, either to register this situations, as the proportion of these failures compared to the expected behavior may indicate a potential anomaly either in the parameters configuration, command switches failures, machine operator related problems and other cases that harm present productivity and might end in a undesired situation. This method sets the pointer to the function to call.

Parameters
newFnWhnBthHndsOnMssdFunction pointer to the function to be executed when the object makes the transition from "foot switch enabled" to the "foot switch disabled" instead of the "Production cycle activated" state.
Note
When the object is instantiated the function pointer is set to nullptr, value that disables the mechanism. Once a pointer to a function is provided the mechanism will become available. The mechanism can be disabled by setting the pointer value back to nullptr.

◆ setFnWhnTrnOffLtchRlsPtr()

void LimbsSftyLnFSwtch::setFnWhnTrnOffLtchRlsPtr ( fncVdPtrPrmPtrType & newFnWhnTrnOff)

Sets the function to be executed when the object's ltchRlsIsOn attribute flag is set to false.

One of the optional mechanisms activated by entering the Latch Release is Off (ltchRlsIsOn = false) state is the execution of a fncVdPtrPrmPtrType function, i.e. void (FnWhnTrnOff)(void). This method sets the pointer to the function.

Parameters
newFnWhnTrnOffFunction pointer to the function to be executed when the object enters the "Latch Release is Off" state.
Note
When the object is instantiated the function pointer is set to nullptr, value that disables the mechanism. Once a pointer to a function is provided the mechanism will become available. The mechanism can be disabled by setting the pointer value back to nullptr.

◆ setFnWhnTrnOffPrdCyclPtr()

void LimbsSftyLnFSwtch::setFnWhnTrnOffPrdCyclPtr ( fncVdPtrPrmPtrType & newFnWhnTrnOff)

Sets the function to be executed when the object's prdCyclIsOn attribute flag is set to false.

One of the optional mechanisms activated by entering the Production Cycle is Off (_prdCyclIsOn = false) state is the execution of a fncVdPtrPrmPtrType function, i.e. void (FnWhnTrnOff)(void). This method sets the pointer to the function.

Parameters
newFnWhnTrnOffFunction pointer to the function to be executed when the object enters the "Production Cycle is Off" state.
Note
When the object is instantiated the function pointer is set to nullptr, value that disables the mechanism. Once a pointer to a function is provided the mechanism will become available. The mechanism can be disabled by setting the pointer value back to nullptr.

◆ setFnWhnTrnOnLtchRlsPtr()

void LimbsSftyLnFSwtch::setFnWhnTrnOnLtchRlsPtr ( fncVdPtrPrmPtrType & newFnWhnTrnOn)

Sets the function to be executed when the object's ltchRlsIsOn attribute flag is set to true.

One of the optional mechanisms activated by entering the Latch Release is On (ltchRlsIsOn = true) state is the execution of a fncVdPtrPrmPtrType function, i.e. void (FnWhnTrnOn)(void). This method sets the pointer to the function.

Parameters
newFnWhnTrnOnFunction pointer to the function to be executed when the object enters the "Latch Release is On" state.
Note
When the object is instantiated the function pointer is set to nullptr, value that disables the mechanism. Once a pointer to a function is provided the mechanism will become available. The mechanism can be disabled by setting the pointer value back to nullptr.

◆ setFnWhnTrnOnPrdCyclPtr()

void LimbsSftyLnFSwtch::setFnWhnTrnOnPrdCyclPtr ( fncVdPtrPrmPtrType & newFnWhnTrnOn)

Sets the function to be executed when the object's prdCyclIsOn attribute flag is set to true.

One of the optional mechanisms activated by entering the Production Cycle is On (_prdCyclIsOn = true) state is the execution of a fncVdPtrPrmPtrType function, i.e. void (FnWhnTrnOff)(void). This method sets the pointer to the function.

Parameters
newFnWhnTrnOffFunction pointer to the function to be executed when the object enters the "Production Cycle is On" state.
Note
When the object is instantiated the function pointer is set to nullptr, value that disables the mechanism. Once a pointer to a function is provided the mechanism will become available. The mechanism can be disabled by setting the pointer value back to nullptr.

◆ setLsSwtchOtptsChng()

void LimbsSftyLnFSwtch::setLsSwtchOtptsChng ( bool newLsSwtchOtptsChng)

Sets the value of the attribute flag indicating if a change took place in any of the output attribute flags.

The usual path for the lsSwtchOtptsChng flag is to be set by any method changing an output attribute flag, the callback function signaled to take care of the hardware actions because of this changes clears back lsSwtchOtptsChng after taking care of them. In the unusual case the developer wants to "intercept" this sequence, this method is provided to set (true) or clear (false) lsSwtchOtptsChng value.

Parameters
newLsSwtchOtptsChngThe new value to set the lsSwtchOtptsChng flag to.

◆ setLtchRlsTtlTm()

bool LimbsSftyLnFSwtch::setLtchRlsTtlTm ( const unsigned long int & newVal)

Set the Latch Release Total Time (ltchRlsTtlTm) attribute value.

The ltchRlsTtlTm attribute holds the time the latching mechanism of the cycle machine will be freed to start the production cycle. Due to the primitive mechanical characteristics of these machines, the mechanical latching mechanism might take different times to be effectively released, so the time must be enough to ensure the correct and full unlatch, but not long enough to keep the machine unlatched when the production cycle is completed, as this might generate the next production cycle to start again, now with no limbs protection provided.

Parameters
newValTime in milliseconds to keep the unlatch mechanism activated, must be a value greater than 0, and less than or equal to the "Production cycle time" (see setPrdCyclTtlTm(const unsigned long int))
Returns
true The parameter value was in the valid range, attribute value updated.
false The parameter value was not in the valid range, attribute value was not updated.

◆ setPrdCyclTtlTm()

bool LimbsSftyLnFSwtch::setPrdCyclTtlTm ( const unsigned long int & newVal)

Set the Production Cycle Total Time (prdCyclTtlTm) attribute value.

The prdCyclTtlTm attribute holds the total time for the production cycle, starting from the moment the latching mechanism of the cycle machine will be freed to start the production cycle and the hands and foot security switches are disabled. After the production cycle timer set time is consumed, the limbs security switch enters the Cycle closure state, ending with the hands and foot security switches re-enabled to their respective configuration states. Setting a short value to the attribute will produce the switch to be re-enabled before the production cycle ends, generating undesired security risks, setting an extremely long value to the attribute will produce the switch to be unavailable to start a new production cycle, slowing the production, affecting the productivity.

Parameters
newValTime in milliseconds for the production cycle to be active, must be a value greater or equal to the "Latch Release Total Time" (see setLtchRlsTtlTm(const unsigned long int))
Returns
true The parameter value was in the valid range, attribute value updated.
false The parameter value was not in the valid range, attribute value was not updated.

◆ setTrnOffLtchRlsArgPtr()

void LimbsSftyLnFSwtch::setTrnOffLtchRlsArgPtr ( void *& newVal)

Sets the pointer to the arguments for the function to be executed when the object's ltchRlsIsOn attribute flag is set to false.

The function to be executed is the one set by the setFnWhnTrnOffLtchRlsPtr(fncVdPtrPrmPtrType) method, function that expects a void* argument.

Parameters
newValA void* to the argument to be passed to the mentioned function
Note
When no arguments are expected to be passed the newVal value must be nullptr, that is the instantiation default value set.

◆ setTrnOffPrdCyclArgPtr()

void LimbsSftyLnFSwtch::setTrnOffPrdCyclArgPtr ( void *& newVal)

Sets the pointer to the arguments for the function to be executed when the object's prdCyclIsOn attribute flag is set to false.

The function to be executed is the one set by the setFnWhnTrnOffPrdCyclPtr(fncVdPtrPrmPtrType) method, function that expects a void* argument.

Parameters
newValA void* to the argument to be passed to the mentioned function
Note
When no arguments are expected to be passed the newVal value must be nullptr, that is the instantiation default value set.

◆ setTrnOnLtchRlsArgPtr()

void LimbsSftyLnFSwtch::setTrnOnLtchRlsArgPtr ( void *& newVal)

Sets the pointer to the arguments for the function to be executed when the object's ltchRlsIsOn attribute flag is set to true.

The function to be executed is the one set by the setFnWhnTrnOnLtchRlsPtr(fncVdPtrPrmPtrType) method, function that expects a void* argument.

Parameters
newValA void* to the argument to be passed to the mentioned function
Note
When no arguments are expected to be passed the newVal value must be nullptr, that is the instantiation default value set.

◆ setTrnOnPrdCyclArgPtr()

void LimbsSftyLnFSwtch::setTrnOnPrdCyclArgPtr ( void *& newVal)

Sets the pointer to the arguments for the function to be executed when the object's prdCyclIsOn attribute flag is set to true.

The function to be executed is the one set by the setFnWhnTrnOnPrdCyclPtr(fncVdPtrPrmPtrType) method, function that expects a void* argument.

Parameters
newValA void* to the argument to be passed to the mentioned function
Note
When no arguments are expected to be passed the newVal value must be nullptr, that is the instantiation default value set.

◆ setTskToNtfyBthHndsOnMssd()

void LimbsSftyLnFSwtch::setTskToNtfyBthHndsOnMssd ( const TaskHandle_t & newTaskHandle)

Sets the task to be unblocked -by a xTaskNotify()- when the object's state changes from the "foot switch enabled" to the "foot switch disabled" instead of the "Production cycle activated" state.

One of the optional mechanisms activated when the object's state changes from the "foot switch enabled" to the "foot switch disabled" instead of the "Production cycle activated" state is the unblocking of a task. This method sets the TaskHandle to the task to unblock. When the object changes it's state as mentioned, it means an opportunity to activate the production cycle, which is the main purpose of the use of the machine, was wasted. The opportunity of unblocking of a task as part of that state transition gives a tool to deal with this situations. Either to react immediately, either to register this situations, as the proportion of these failures compared to the expected behavior may indicate a potential anomaly either in the parameters configuration, command switches failures and/or other cases that harm present productivity and might end in a future machine down time. This method sets the TaskHandle for the task to unblock.

Parameters
newTaskHandleThe task handle of the task to be unblocked when the object's state changes from the "foot switch enabled" to the "foot switch disabled" instead of the "Production cycle activated" state.
Note
When the object is instantiated the task handle is set to NULL, value that disables the mechanism. Once a TaskHandle to a task is provided the mechanism will become available. The mechanism can be disabled by setting the TaskHandle value back to NULL.
Attention
Setting a task handle by using this method does not verify if the task handle value set corresponds to an existing -not suspended, not in delete process- task. The task setting and valid state to be used by the corresponding method -by executing a xTaskNotify()- is under responsibility of the developer.
Setting a task handle by using this method to replace an already set TaskHandle_t value will check the status of the previous set task and -if it wasn't in a state of pending deletion- proceed to suspend it and set the TaskHandle_t value to the new one. The suspended task will be left to be dealt by the developer, and the resources lost by no deleting that task might be considered under the developer responsibility and design decision.

◆ setTskToNtfyLsSwtchOtptsChng()

void LimbsSftyLnFSwtch::setTskToNtfyLsSwtchOtptsChng ( const TaskHandle_t & newTaskHandle)

Sets the task to be unblocked -by a xTaskNotify()- when ANY of the object's attribute flags changes it's value.

One of the optional mechanisms activated when any of the relevant attribute flags changes it's state is the unblocking of a task blocked. This method sets the TaskHandle to the task to unblock. This tool is of great importance for the integration between the electronic logic control and the mechanical device it is intended to control. While the "Latch Release status" (ltchRlsIsOn AF) and the "Production Cycle status" (prdCyclIsOn AF) have their own dedicated tasks assignation capabilities, this generic task handle provides for all the relevant AFs, including both aforementioned.

Parameters
newTaskHandleThe task handle of the task to be unblocked when one or more of the object's relevant AF changes it's value.
Note
When the object is instantiated the task handle is set to NULL, value that disables the mechanism. Once a TaskHandle to a task is provided the mechanism will become available. The mechanism can be disabled by setting the TaskHandle value back to NULL.
Attention
Setting a task handle by using this method does not verify if the task handle value set corresponds to an existing -not suspended, not in delete process- task. The task setting and valid state to be used by the corresponding method -by executing a xTaskNotify()- is under responsibility of the developer.
Setting a task handle by using this method to replace an already set TaskHandle_t value will check the status of the previous set task and -if it wasn't in a state of pending deletion- proceed to suspend it and set the TaskHandle_t value to the new one. The suspended task will be left to be dealt by the developer, and the resources lost by no deleting that task might be considered under the developer responsibility and design decision.

◆ setTskToNtfyTrnOffLtchRls()

void LimbsSftyLnFSwtch::setTskToNtfyTrnOffLtchRls ( const TaskHandle_t & newTaskHandle)

Sets the task to be unblocked -by a xTaskNotify()- when the object's ltchRlsIsOn attribute flag is set to false.

One of the optional mechanisms activated by entering the Latch Release is Off (ltchRlsIsOn = false) state is the unblocking of a task blocked by a xTaskNotifyWait(). This method sets the TaskHandle to the task to unblock.

Parameters
newTaskHandleThe task handle of the task to be unblocked when the object enters the "Latch Release is Off" state.
Note
When the object is instantiated the task handle is set to NULL, value that disables the mechanism. Once a TaskHandle to a task is provided the mechanism will become available. The mechanism can be disabled by setting the TaskHandle value back to NULL.
Attention
Setting a task handle by using this method does not verify if the task handle value set corresponds to an existing -not suspended, not in delete process- task. The task setting and valid state to be used by the corresponding method -by executing a xTaskNotify()- is under responsibility of the developer.
Setting a task handle by using this method to replace an already set TaskHandle_t value will check the status of the previous set task and -if it wasn't in a state of pending deletion- proceed to suspend it and set the TaskHandle_t value to the new one. The suspended task will be left to be dealt by the developer, and the resources lost by no deleting that task might be considered under the developer responsibility and design decision.

◆ setTskToNtfyTrnOffPrdCycl()

void LimbsSftyLnFSwtch::setTskToNtfyTrnOffPrdCycl ( const TaskHandle_t & newTaskHandle)

Sets the task to be unblocked -by a xTaskNotify()- when the object's prdCyclIsOn attribute flag is set to false.

One of the optional mechanisms activated by entering the Production cycle is Off (prdCyclIsOn = false) state is the unblocking of a task blocked by a xTaskNotifyWait(). This method sets the TaskHandle to the task to unblock.

Parameters
newTaskHandleThe task handle of the task to be unblocked when the object enters the "Production cycle is Off" state.
Note
When the object is instantiated the task handle is set to NULL, value that disables the mechanism. Once a TaskHandle to a task is provided the mechanism will become available. The mechanism can be disabled by setting the TaskHandle value back to NULL.
Attention
Setting a task handle by using this method does not verify if the task handle value set corresponds to an existing -not suspended, not in delete process- task. The task setting and valid state to be used by the corresponding method -by executing a xTaskNotify()- is under responsibility of the developer.
Setting a task handle by using this method to replace an already set TaskHandle_t value will check the status of the previous set task and -if it wasn't in a state of pending deletion- proceed to suspend it and set the TaskHandle_t value to the new one. The suspended task will be left to be dealt by the developer, and the resources lost by no deleting that task might be considered under the developer responsibility and design decision.

◆ setTskToNtfyTrnOnLtchRls()

void LimbsSftyLnFSwtch::setTskToNtfyTrnOnLtchRls ( const TaskHandle_t & newTaskHandle)

Sets the task to be unblocked -by a xTaskNotify()- when the object's ltchRlsIsOn attribute flag is set to true.

One of the optional mechanisms activated by entering the Latch Release is On (ltchRlsIsOn = true) state is the unblocking of a task blocked by a xTaskNotifyWait(). This method sets the TaskHandle to the task to unblock.

Parameters
newTaskHandleThe task handle of the task to be unblocked when the object enters the "Latch Release is On" state.
Note
When the object is instantiated the task handle is set to NULL, value that disables the mechanism. Once a TaskHandle to a task is provided the mechanism will become available. The mechanism can be disabled by setting the TaskHandle value back to NULL.
Attention
Setting a task handle by using this method does not verify if the task handle value set corresponds to an existing -not suspended, not in delete process- task. The task setting and valid state to be used by the corresponding method -by executing a xTaskNotify()- is under responsibility of the developer.
Setting a task handle by using this method to replace an already set TaskHandle_t value will check the status of the previous set task and -if it wasn't in a state of pending deletion- proceed to suspend it and set the TaskHandle_t value to the new one. The suspended task will be left to be dealt by the developer, and the resources lost by no deleting that task might be considered under the developer responsibility and design decision.

◆ setTskToNtfyTrnOnPrdCycl()

void LimbsSftyLnFSwtch::setTskToNtfyTrnOnPrdCycl ( const TaskHandle_t & newTaskHandle)

Sets the task to be unblocked -by a xTaskNotify()- when the object's prdCyclIsOn attribute flag is set to true.

One of the optional mechanisms activated by entering the Production cycle is On (prdCyclIsOn = true) state is the unblocking of a task blocked by a xTaskNotifyWait(). This method sets the TaskHandle to the task to unblock.

Parameters
newTaskHandleThe task handle of the task to be unblocked when the object enters the "Production cycle is On" state.
Note
When the object is instantiated the task handle is set to NULL, value that disables the mechanism. Once a TaskHandle to a task is provided the mechanism will become available. The mechanism can be disabled by setting the TaskHandle value back to NULL.
Attention
Setting a task handle by using this method does not verify if the task handle value set corresponds to an existing -not suspended, not in delete process- task. The task setting and valid state to be used by the corresponding method -by executing a xTaskNotify()- is under responsibility of the developer.
Setting a task handle by using this method to replace an already set TaskHandle_t value will check the status of the previous set task and -if it wasn't in a state of pending deletion- proceed to suspend it and set the TaskHandle_t value to the new one. The suspended task will be left to be dealt by the developer, and the resources lost by no deleting that task might be considered under the developer responsibility and design decision.

◆ setUndrlSwtchsPollDelay()

bool LimbsSftyLnFSwtch::setUndrlSwtchsPollDelay ( const unsigned long int & newVal)

Sets the update period length for the DbncdMPBttn subclasses objects used as input by the LimbsSftyLnFSwtch.

Sets the periodic timer used to check the inputs and calculate the state of the object, time period value set in milliseconds.

Parameters
newValValue to set for the update period, the period must be greater than the minimum debounce default value.
Returns
The success in setting the new value to be used to start the DbncdMPBttn subclasses state updates
Return values
trueThe value was in the accepted range and successfully changed
falseThe value was not in the accepted range and was not successfully changed
Warning
After the begin(unsigned long int) method is executed no other method is implemented to change the periodic update time, so this method must be used -if there's intention of using a non default value- before the begin(unsigned long int). Changing the value of the update period after executing the begin method will have no effect on the object's behavior.