ATSCADA Advanced Programming Tag Events

In advanced programming, we usually use tag events to do some duties, we have two Tag events:
1. The event occurs when the tag value changed
2. The event occurs when the tag connection status changed

Example about tag events using c# language.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication17
{

public partial class Form1 : Form
{

public Form1()
{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)
{

// Event occur when the Tag value changed
iDriver1.Task(“AT-TMSDevice”).Tag(“HighLevel”).TagValueChanged += Form1_TagValueChanged;

// Event occur when the connection status (good or bad) of Tag changed
iDriver1.Task(“AT-TMSDevice”).Tag(“HighLevel”).TagStatusChanged += Form1_TagStatusChanged;

}

void Form1_TagValueChanged(object o, ATSCADA.TagValueEventArgs e)
{

// Show the Tag value when the Tag value changed
MessageBox.Show(iDriver1.Task(“AT-TMSDevice”).Tag(“HighLevel”).Value);

}

void Form1_TagStatusChanged(object o, ATSCADA.TagStatusEventArgs e)
{

// Show the connection status (good or bad) of Tag
MessageBox.Show( iDriver1.Task(“AT-TMSDevice”).Tag(“HighLevel”).Status);

}

}

}

>> ReferenceEnglish – Traning Cources

Contact:

If you are interested in ATSCADA Advanced Programming Tag Events. Please contact ATSCADA Lab hotline for quick support.

Thank you.

ATSCADA việt nam

ATSCADA - Providing ATSCADA software - The monitoring and data acquisition control system is the appropriate choice for integrated system projects, IoT, smart city projects, agriculture 4.0... Is trusted by many customers.

Related posts

ATSCADA Installation Guide

Video ATSCADA Installation Guide The following video shows the steps of ATSCADA installation. If having any [...]

ATSCADA – Software Architecture

Tìm hiểu về ATSCADA – Kiến trúc phần mềm ATSCADA được thiết kế trên KIẾN [...]

ATSCADA Graphic Tools

ATSCADA Graphics Tool Guide ATSCADA Graphic Tools: iGraphic, iImageButton, iGauge, iHBar, iVBar, iMotion Picture, iRealtime [...]

ATSCADA Advanced Programming: Email, SMS programming

In the SCADA applications, sometimes you need to send notifications email or SMS to your [...]

ATSCADA Custom Usercontrol programming

In this section, I’ll show complete demo of how to create Custom User Control in [...]

ATSCADA Advanced Programming Tag Read/Write

In advanced programming, sometimes we need to read the tag value or write the tag [...]

Leave a Reply