DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Scaling of Datavalues in Data Plugin

Hi There,
 
I am trying to bring up a data plugin where the channels values needs an offset and an factor. The Factor information is obtained through a single value in the file, but the offset is the previous value of the channel.
 
For Example,
 
if 1,2,3,4 are the channel values and Factor is 0.1
 
Then the 1st chnnael value is 1*0.1   = 0.1
2nd Channel Value is = 2 * 0.1 + 0.1 = 0.3
3rd cahnnel value = 3 * 0.1 + 0.3       = 0.6
4th Channel value = 4 * 0.1 + 0.6      = 1
 
I am not quite sure How I can get this information on the offset. Can you please help me out with this.
Waiting for you earliest response.
 
 
Thanks,
Priya
 


Message Edited by pria on 06-30-2008 12:52 PM
0 Kudos
Message 1 of 5
(3,847 Views)

Pria,

From what I understand the raw values in your file are delta values, refering to the previous value in the file. This use case is not covered by the offset property for a channel. There is an option to read the file value by value (GetNextBinaryValue) and then do some calculation  before it shows up in the dataportal. What type of file are you trying to read ? Is there documentation avalaible ?

Andreas

0 Kudos
Message 2 of 5
(3,827 Views)

Hi,

Thanks for your reposnse, but this is a ASCII file, I have attached the Data file.

There is no any detailed data definition but have few to reach the channel data. The channel data is seperated by comma.

Data Values:

The data starts after the header information with [Data].

Only the information on the Right hand side of the equals will be considered for data interpretation.  For Example

[Data]

1=1,2,3

Here only 1,2,3 will be considered for data value interpretation.

Each data value here is not available in absolute form. Each value of data represents the amount of change that is occurred from the previous scan. The offset for each channel is available in their respective headers under the header scale. Hence conversion of data is accomplished by multiplying the data value with its offset and adding this result to the previous scan.

Can you let me know how I can get the delta infromation and populate the channels?

Thanks

 

0 Kudos
Message 3 of 5
(3,813 Views)

Hello Pria,

Please have a look at the attached example. It reads you file, hopefully the way you expected it. Please let me know ho it goes.

Andreas

 

0 Kudos
Message 4 of 5
(3,808 Views)
Thanks Andreas, this helps me with the solutions.
 
Thanks Again.
Priya
0 Kudos
Message 5 of 5
(3,792 Views)