Author Topic: Large Data Read and write blocks for data heavy pages  (Read 1251 times)

aduhaime2003

  • Newbie
  • *
  • Posts: 36
    • View Profile
Large Data Read and write blocks for data heavy pages
« on: January 22, 2015, 01:58:42 PM »
What I am creating is a page 2 with a bunch of alarms.
Each block has 10 registers involved.
1 is a string
1 is an integer that houses a bit array.
6 are preset and time stamp integers.

st31:0 would be the description for alarm 0
n100 would be the integer file associated with alarm 0

st31:31 would be the description for alarm 0
n131 would be the integer file associated with alarm 0

I would like to create a more efficient read because the page does not work if I simply use all BasicLabels.  It does not update as shown in the capture.

I want to provide a how-to.. to help others as well so I started this topic for that purpose since my recent questions were out of an old thread and not an easy to search item.

aduhaime2003

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Large Data Read and write blocks for data heavy pages
« Reply #1 on: January 22, 2015, 02:08:46 PM »
As you can see in the previous post there are errors in the reading.  All the alarm blocks are identical with updated registers (tedious process.)

When I would create this type of project on a Rockwell panel for example, I would pass parameters.  There would be a text object with a bunch of variables inserted to it with a #1 located in the instance portion of the alarm.  This would net me a custom object that is tied to whatever registers the parameter passed to it would indicate the instance needed. 

I would prefer this because It allows the future scalability to be infinite.

When using logix5000 it is even easier because I have a array of alarm user defined data type that I can place the instance into in the same fashion.

The first problem is that I need to place the data into a udt located in the HMI so I can do manipulation.  The second problem is not hogging the bandwidth by streamlining the read process.

aduhaime2003

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Large Data Read and write blocks for data heavy pages
« Reply #2 on: January 23, 2015, 04:20:26 PM »
I guess the first step is to create the structures and I will do so using the following format which archie  explained was correct...

//page 2.vb
Public Class Page2
    Structure Alarm
        Public desc As String
        Public inCond As String
        Public active As String
        Public ack As String
        Public month As String
        Public day As String
        Public hour As String
        Public min As String
        Public sec As String
    End Structure

    Dim Alarms(32) As Alarm

aduhaime2003

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Large Data Read and write blocks for data heavy pages
« Reply #3 on: January 28, 2015, 03:34:27 PM »
Could someone explain the data subscription and how I would do the periodic update of this data in the background.