We're often being asked "How do I data sample with a Weintek HMI?", so below is a simple step-by-step example along with a sample project that you can run on the EasyBuilder Pro simulator to test.

In our example program, we are sampling 3 LW registers (LW are Weintek HMI Local Words) starting from LW0 through to LW2.

Step 1

Click on "Data Sampling" in the Data/History Tab in EasyBuilder Pro:

Step 2

Click "New" to set up a new Data Sampling Object:

Step 3

You can name your Data Sampling Object using the "Comment" field. For this example, we are using Time-based sampling, every second. For many applications, Trigger-Based is appropriate where an action such as a PLC bit being set, or an HMI button being pressed records the data at that moment.

The read address is the start address for our Data Sampling - we are using LW0 as our start address.

Step 4

Click "Data Format".

Step 5

Click "New..."

Choose the Data type. In our example, we are using LW registers as 16-bit Unsigned. Click "OK".

Step 6

Repeat this 3 times (remember, we are sampling 3 addresses - LW0-LW2). Click "Exit" The Data Sampling Object list should now have the Data Sampling Object created on it. Click "Exit".

Step 7

On the Data Sampling Object Window, we should see the Data length as "3 Word(s)".

Step 8

To place a trend graph on the screen, click on "Trend Display" under the Data/History tab.

Select the Data Sampling Object to use. If there is more than one, they will be available on the drop-down list. For this example, we are using Time to scale the X axis:

In the "Channel" tab, we can select which data samples are displayed and set the scale (min-max), assign a pen colour and width, In the example program, the value of the LW registers is 0-100, so our minimum is 0 and our maximum is 100.

Example Program

An example project is available to download here. You will need at least version 6.01.02.123 to open this file.