Output From Channel As Array


Azurulddin

Recommended Posts

i got 2 temperature sensor and every 5 second the data from sensor will store at OPc server.what i would like to do is take the data from OPC server and put inside a array for other execution.

 

example:

temp. sensor 1 = {20,30,50,80.100,50,30}

temp. sensor 2 = {50,10,70,30.90,20,110}

 

what i want:

 

temp.sensor 1

at array 1

temp.sensor 2

at array 2

                                                                              

 

Every 5 second, put data inside the array

20

50

30

10

50

70

80

30

100

90

50

20

30

110

 

 

 

 

 

 

 

 

 

 

 

 

then i would like to read the 80 at array 1 and display the data via display-variable value.

 

which type of array should i use and can you give some example??

Link to comment
Share on other sites

If you create a Channel to read the OPC server, it will automatically put the data into an array as new readings appear.  Channels act like arrays that grow over time as new data appears, with the most recent data being inserted at the top of the array.  The maximum size of the channel array is determined by the History parameter.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.