monitoring

<< Click to Display Table of Contents >>

Manual > Practical Edition >

monitoring

overview

This is a sample that monitors 32 pieces of data in real time.

 

faeng_0043

 

This sample is stored in:

 

 

setting

Tag configuration
 

1.Set tags "T00" to "T31".
faeng_0044

 

 

program

Describes a value change event.

 

●VB.Net

Private Sub AxEng1_ValueStateChanged(ByVal sender As Object,

                         ByVal e As AxFAENGINELib6._DFAEngineEvents_ValueStateChangedEvent)

                         Handles AxEng1.ValueStateChanged

 If e.state Then

         'Normal

         txtVal( Integer.Parse(e.tagPath.Substring(e.tagPath.Length - 2))).Text = CStr(e.value)

 Else

         'When abnormal

         txtVal(Integer.Parse(e.tagPath.Substring(e.tagPath.Length - 2))).Text = "Error!"

 End If

 

End Sub

 

 

hint

The update interval is set in the folder properties.

faeng_0045

 

 

Commentary

 

faeng_0046

 

When you run the program, the ValueStateChanged event is called every time the value changes. If communication with the PLC is not possible, the State argument of the ValueStateChanged event will be FALSE.