Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:sw:01-mervis:sending-email-hidden [2023/08/03 12:32] avsetulaen:sw:01-mervis:sending-email-hidden [2023/08/25 13:25] (current) avsetula
Line 3: Line 3:
 <WRAP half column 100%> <WRAP half column 100%>
 #;; #;;
-<html><style>h1 {margin-bottom: 10px !important;}</style><span class="tag-skelet inline-tag">+<html><style>h1 {margin-bottom: 10px !important;}</style><span class="tag-skelet inline-tags">
 <span class="tag-patron">Patron</span> <span class="tag-patron">Patron</span>
 <span class="tag-neuron">Neuron</span> <span class="tag-neuron">Neuron</span>
Line 26: Line 26:
 </WRAP> </WRAP>
 <WRAP half column 15%> <WRAP half column 15%>
-{{ :en:sw:01-mervis:sending-email:sending_emails_01_sendmailtrig_fbd_block.png?nolink&175 |}}+{{ en:sw:01-mervis:sending-email:sending_emails_01_sendmailtrig_fbd_block.png?nolink&175 |}}
  
 </WRAP> </WRAP>
Line 33: Line 33:
 <WRAP center round important 90%> <WRAP center round important 90%>
 **Caution:** \\ **Caution:** \\
-When creating a program it is necessary to ensure that only one email is at least one-second pause before the next email is sent.+When creating a program it is necessary to ensure that only one email is sent at least one-second pause before the next email is sent.
 </WRAP> </WRAP>
  
Line 41: Line 41:
 For email sending to work properly, you must first set up an alarm channel. Double-click **PLC** in the **left panel**, select the **Messaging** tab, right-click in the main window area (list of alarm channels) and select **Add Alarm Channel** from the context menu:  For email sending to work properly, you must first set up an alarm channel. Double-click **PLC** in the **left panel**, select the **Messaging** tab, right-click in the main window area (list of alarm channels) and select **Add Alarm Channel** from the context menu: 
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_02_setup_channel.png?direct |}}+{{ .:sending-email:sending_emails_02_setup_channel.png?direct |}}
  
 ---- ----
 A new alarm channel appears. By default, it is set to send email messages. It is now possible to define a name that is then used on the **sendmailtrig** block input, or leave the default name **alrchannel**.  A new alarm channel appears. By default, it is set to send email messages. It is now possible to define a name that is then used on the **sendmailtrig** block input, or leave the default name **alrchannel**. 
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_03_new_channel.png?direct |}}+{{ .:sending-email:sending_emails_03_new_channel.png?direct |}}
  
 Next, the connection type **SMTP** is defined. After clicking on alarm channel in the main window, the properties table of the selected channel is displayed in the right column: Next, the connection type **SMTP** is defined. After clicking on alarm channel in the main window, the properties table of the selected channel is displayed in the right column:
Line 52: Line 52:
   * **Server**: from which the email will be sent   * **Server**: from which the email will be sent
   * **Port**: on which RT will communicate (according to the email server)   * **Port**: on which RT will communicate (according to the email server)
-  * **Use login**: to ''TRUE'' if login is required+  * **Use login**: ''TRUE'' if login is required
   * **User name**: in case of login (usually email address)   * **User name**: in case of login (usually email address)
   * **Password**: in case of login, password for the email used   * **Password**: in case of login, password for the email used
   * **Enable SSL**: for secure communication   * **Enable SSL**: for secure communication
-  * **Certificate validation**: set ''FALSE'' by default, for more information see article [[ssl-certification-validation-hidden|]] +  * **Certificate validation**: ''FALSE'' by default, for more information see article [[ssl-certification-validation-hidden|]] 
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_04_channel_attributes.png?direct |}}+{{ .:sending-email:sending_emails_04_channel_attributes.png?direct |}}
  
 It is necessary to confirm all changes by clicking on OK button in red bar: It is necessary to confirm all changes by clicking on OK button in red bar:
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_05_name_channel.png?direct |}}+{{ .:sending-email:sending_emails_05_name_channel.png?direct |}}
  
  
 ===== Sending emails ===== ===== Sending emails =====
  
-The **sendmailtrig** function block can be found in the left panel under the **FUPLA blocks** tab, or in the **Add library block** context menu by pressing the right mouse button in the area of the **fbd program**+The **sendmailtrig** function block can be found in the left panel under the **FUPLA blocks** tab, or in the **Add library block** context menu by pressing the right mouse button in the **main window** (area of the fbd program):
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_06_fbd_block_program.png?direct |}}+{{ .:sending-email:sending_emails_06_fbd_block_program.png?direct |}}
  
 ---- ----
  
-This function block requires input variables, so it is advisable to create some variables for more convenient debugging. The first is the **channel** input, which is of the string data type and in default has  the string **alrchannel** as its initial value:+ This function block has inputs. For more convenient debugging it is advisable to create some variables that are connected to these inputs. The first is the **channel** input, which is of the string data type. When defining a variable, it is possible to choose a name identical to the name of the input, but it is necessary to choose the same data type, i.e. string. The initial value is the name of the alarm channel, where the default value is the string **alrchannel**:
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_07_global_variable.png?direct |}}+{{ .:sending-email:sending_emails_07_global_variable.png?direct |}}
  
 ---- ----
Line 83: Line 83:
 |< 100% 15% 15% 70%>| |< 100% 15% 15% 70%>|
 ^ Input     ^ Type     ^ Meaning                                                                                           ^ ^ Input     ^ Type     ^ Meaning                                                                                           ^
-| CHANNEL   | STRING   | name of the communication link (defined in PLC options; [[#alarm_channel_settings|see above]])    |+| CHANNEL   | STRING   alarm channel name (defined in PLC options; [[#alarm_channel_settings|see above]])    |
 | FROM      | STRING   | email address of the sender                                                                       | | FROM      | STRING   | email address of the sender                                                                       |
 | RECIPIENT | STRING   | email address of the recipient                                                                    |  | RECIPIENT | STRING   | email address of the recipient                                                                    | 
Line 94: Line 94:
 The result should look something like this: The result should look something like this:
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_08_sendmailtrig_with_variables.png?direct |}}+{{ .:sending-email:sending_emails_08_sendmailtrig_with_variables.png?direct |}}
  
 ---- ----
Line 116: Line 116:
 ==== Example of use ==== ==== Example of use ====
  
-Typically, this function can be used to report alarm conditionsSending an email is triggered by an alarm condition. Another email will be sent if the alarm went off, was reset and subsequently occurred again. The alarm is active when the value of the variable ''temperature'' exceeds the value of the variable ''temperature_limit'' (with hysteresis).+Typically, this function can be used to report alarms Email being sent is triggered by the occurrence of an alarm, in our case variable ''temperature'' exceeds the value of the variable ''temperature_threshold'' (with hysteresis). Another email (with different message content) is sent after the value of ''temperature'' variable is  lowered below the value of ''temperature_threshold'' variable (with hysteresis).
  
-{{ :en:sw:01-mervis:sending-email:sending_emails_09_program_windowed.png?direct |}}+{{ .:sending-email:sending_emails_09_program_windowed.png?direct |}}