How to handle large amounts of data

<< Click to Display Table of Contents >>

Manual > Server Creation Guide > Interface > IPLink-Interface > IPLinkClient Library > IPLinkClient Library Sample Collection >

How to handle large amounts of data

overview

This is a sample program that uses array tags. By using array tags, you can communicate a large amount of data by bundling it into one tag.

 

If you set a tag as an array tag, you can handle consecutive areas together. For example, if you specify 1000 as the number of arrays in a numeric tag with the PLC address "D00001," it will be treated as an array of 1000 items from "D00001" to "D01000."

 

c_interface_0138

 

 

Download the sample

The creation examples shown on this page are provided with samples.

 

The sample can be downloaded from below.

 

Samples and detailed explanations will be provided in VB.NET2010.

 

 

hint

For details on array tags, see "Tag Arrays".

 

hint

The IPLink client can also handle arrays using ReadVal/WriteVal etc.

 

 

Program Highlights

We will explain the main points of the program.

 

Registering tags
Tags are registered using the AddTag method. In this sample, the tags are organized into an array and can be treated as a single tag, so AddTag is executed for only one tag, and there is no need to execute AddTag for multiple tags.
 

AxIPLink1.AddTag("U01.F01.T01", False)

 
 

Data Acquisition
In this sample, data is retrieved using the ReadVal method. If you specify an array tag and execute ReadVal, the return value Value will be returned as array data.
 

If AxIPLink1.ReadVal("U01.F01.T01", Values, 2) Then
    For i = 0 To 31
        Controls("txtValue" & i).Text = CStr(Values(i))
    Next i
Else
    For i = 0 To 31
        Controls("txtValue" & i).Text = "Error!"
    Next i
End Ifx

 
 

 

hint

Be sure to declare the return value (Values) of ReadVal as an object array. This is to allow the values to be written to be of a mixture of different types (Boolean, numeric, string, Boolean array, numeric array, string array, etc.).