DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Referencing data between channels

How to I use one channel of data to reference a second channel of data.  Lets say I have a Time channel and use a time in that channel to reference data in another channel?
0 Kudos
Message 1 of 3
(3,091 Views)
To do that, you will have to integrate 2 DIAdem expressions. ChD(Row, Channel) allows you to access every single row of any channel, assumed you know the line, that is the index of that row. To find the index of a value inside a channel, you can either use PNo(Value,channel) or find(expression). If you want to find the data value for a specific time, use a construct like that:
    Datavalue = ChD( PNo(timevalue,"Timechannel"), "Datachannel")

Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 2 of 3
(3,082 Views)

Hi jreynolds,

I have a couple of thoughts to add to Ingo's answer.  The PNo() function will always return a row, and it will return the closest match to the search value you enter.  The Find() function allows you to require an exact match.  If there is no match in the channel, the Find() function will return row = 0.  You can in both functions specify a start row for the search.

You could alternatively use a Channel Calculator expression to compare multiple rows with one line of code.  If you have DIAdem 10.1 or later, you may need to use the ValEqual() function to require an exact match within the resolution of a DBL value.

Ask as you have further questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 3
(3,074 Views)