User Tools

Site Tools


get_access_to_registers

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
get_access_to_registers [2019/01/09 10:43] akuzmukget_access_to_registers [2024/03/15 16:01] (current) atolstov
Line 21: Line 21:
 For the convenience of selecting registers for GetReg, there is a special button in toolbar (4). For the convenience of selecting registers for GetReg, there is a special button in toolbar (4).
  
-{{ :get_reg_button.png?direct&300 |}}+{{ network:get_reg_button.png?direct&300 |}}
  
 When you click on any of them, a pop-up window appears with a list of registers. When you click on any of them, a pop-up window appears with a list of registers.
  
-{{ :select_register_dialog.png?direct&800 |}}+{{ network:select_register_dialog.png?direct&800 |}}
  
 After clicking on the register of interest, the editor will insert the code with the identifier of the selected register (variable_name if exists or ID) and a comment with the register name, its address and the connection name. After clicking on the register of interest, the editor will insert the code with the identifier of the selected register (variable_name if exists or ID) and a comment with the register name, its address and the connection name.
  
-{{ :reg_inserted_after_getreg.png?600 |}}+{{ network:reg_inserted_after_getreg.png?600 |}}
  
  
Line 41: Line 41:
   * warning   * warning
   * alert   * alert
 +
 +==== SetReg(variable_name[,connection_name], new_value) ====
 +The SetReg function sets the current value of the register with the name of the variable **variable_name** to **new_value** for the current scan. This function **DOES NOT** send new value to external devices. When polling this register in subsequent cycles, the old value will be read. 
 +
 +Function returns 1 if an error occurred and 0 on success.
 +
 +The parameters **variable_name** and **connection_name** work just like in the GetReg function. Since version 3.2 there is no more **connection_name** parameter.
 +
 +
 +==== WriteReg(variable_name, new_value) ====
 +The WriteReg function sets the current value of the register with the name of the variable **variable_name** (optionally you can specify the connection **connection_name**) to provided **new_value** for the current scan and writes this value to the external device in the beginning of the next cycle. When polling this register in subsequent scans, a new value will be read (if it was not changed by the device itself). 
 +
 +Function's returns value **false** if any error occurred or **true** on success.
 +
 +The parameters **variable_name** and **connection_name** work just like in the GetReg function. 
 +Before version 3.2 there was **connection_name** parameter.
 +WriteReg(variable_name[, connection_name], new_value) 
 +
 +===== Getting register's values stored in a log =====
 +
 +----
  
 ==== GetRegFromLog(variable_name, query_parameters) ==== ==== GetRegFromLog(variable_name, query_parameters) ====
Line 98: Line 119:
 </code> </code>
  
- 
-==== SetReg(variable_name[,connection_name], new_value) ==== 
-The SetReg function sets the current value of the register with the name of the variable **variable_name** to **new_value** for the current scan. This function **DOES NOT** send new value to external devices. When polling this register in subsequent cycles, the old value will be read.  
- 
-Function returns 1 if an error occurred and 0 on success. 
- 
-The parameters **variable_name** and **connection_name** work just like in the GetReg function. Since version 3.2 there is no more **connection_name** parameter. 
- 
- 
-==== WriteReg(variable_name[, connection_name], new_value) ==== 
-The WriteReg function sets the current value of the register with the name of the variable **variable_name** (optionally you can specify the connection **connection_name**) to provided **new_value** for the current scan and writes this value to the external device in the beginning of the next cycle. When polling this register in subsequent scans, a new value will be read (if it was not changed by the device itself).  
- 
-Function returns 1 if any error occurred and 0 on success. 
- 
-The parameters **variable_name** and **connection_name** work just like in the GetReg function. Since version 3.2 there is no more **connection_name** parameter. 
  
  
  
get_access_to_registers.1547030584.txt.gz · Last modified: 2019/01/09 10:43 by akuzmuk

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki