SCADA system

User Tools

Site Tools


faq11

Differences

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

Link to this comparison view

Next revision
Previous revision
faq11 [2016/08/31 04:34]
scadalaquis created
faq11 [2016/09/27 14:43]
scadalaquis
Line 1: Line 1:
 [[:​start|SCADA software LAquis FAQ]] | [[http://​laquisscada.com|SCADA software]] [[:​start|SCADA software LAquis FAQ]] | [[http://​laquisscada.com|SCADA software]]
  
-**Question**:​ How to record just one register to the database?+**Question**:​ How to set tags via script?
  
 **Answer**: **Answer**:
 +Tags can be set via objects like pictures, buttons, edit, checks, etc.... ​
  
-Normally database data are recorded automatically by intervals of time in Recording column when a database is defined.+To set via script, inside an event type:
  
-When its needed the record just one register: +tagname = value
-1 - Define a database at the tag sheet. +
-{{:​wiki:​image40.png}} +
-2 - Erase Recording column data of the database tags. +
-3 - In a script, for example inside an OnClick button event, type:+
  
-<​code>​ +Example:
-Tags.RecordNow +
-</​code>​ +
- +
-if you want to specify just one group of tags type Tags.RecordNow ( "​groupname"​ ) +
-If there is more than one database, to record just one of them independently of groups, choose a tag from that database and type Tags.RecordNow ( "​tagname"​ ) +
- +
-If you want to record when an tag is triggered:+
  
 <​code>​ <​code>​
-if Tag1 = 1 then +Tag1 = 1
- ​Tags.RecordNow +
- Tag1 = 0 +
-end if+
 </​code>​ </​code>​
  
- +Data is sent to PLC equipment.
-To prevent from repeating:​ +
- +
-<​code>​ +
-if Tag1 = 1 then +
-if Tag1.ValueChanged = 1 then +
- ​Tags.RecordNow +
- ​Tag1.ValueChanged = 0 +
-end if +
-end if +
-</​code>​+
  
 SCADA software SCADA software
  
  
faq11.txt · Last modified: 2018/10/05 08:46 (external edit)


Tags: SCADA system , SCADA software