Graph virtual channel


ericg

Recommended Posts

If you have a expression in a V channel, the history setting means nothing. History setting is only when you are using V channels without a formula, i.e. doing something like V.mychannel = 3, basically using it to store historical values. If you have an expression in the V channel, the V channel is just like a macro. All it does is evaluate that expression whenever the V channel is referenced. So, if the V.myChannel contained just:

3+4

Then whenever you entered V.myChannel elsewhere in DAQFactory, DAQFactory would simply replace "V.myChannel" with 3+4. Its not exactly like a macro though, as it doesn't substitute inside of strings, and the expression in the V channel has to be complete. In otherwords you can't do this:

global string x = "foo V.myChannel foo"

this will just make x = "foo V.myChannel foo", not "foo 7 foo"

nor can you make V.myChannel's expression:

3+

and then do:

V.myChannel 4

This is invalid on both counts.

Anyhow, my guess is that you have lots of [0]'s in your formula, which would only work with the latest readings and not give you a history. If you want, post your formula.

Link to comment
Share on other sites

The result of that expression is a scalar value. Avg() is always going to return a scalar, so you have scalar / scalar * 100 which is a scalar. Scalar values can't be graphed because they have no history. What are you trying to do? Display a smoothed result? If so, I'd try this:

smooth(OutputKVA / InputKVA * 100, 6)

Note that this is a running average, not a boxcar. You could use boxcar instead.

Link to comment
Share on other sites

I'll try that, it's not quite as nice, but neither method is good enough. Really need to reject odd values.

But I also did a max and a min on the data after the average. So I need a better method, maybe it's not virtual channel.

Link to comment
Share on other sites

I'm not clear what you are trying to do. If you are just trying to remove outliers you don't need min/max, but instead need something like:

filter(outputKVA / inputKVA * 100, outputKVA / inputKVA * 100 < 50)

which returns an array with all values >= 50 removed.

I also refer you to this post and others where I tell the story of the ozone hole and how a group missed the find of a lifetime by automatically deleting outliers that turned out to be real:

http://www.azeotech.com/board/index.php?&showtopic=3517

Link to comment
Share on other sites

Archived

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