Graph help


andybdjuk

Recommended Posts

Hi I am new to all this and need a little help. I have two channels reading voltages, A & B. They are both plotted on a graph so I can see them in real time. My question is, I would like to add a third trace © on the graph that is the function A-B. This is where I get lost. Could anybody give me any pointers to get me going?

Thanks

Link to comment
Share on other sites

I think this might be a case where the answer is so simple you won't believe it, especially since most other apps make this much harder. So, you have two traces. The Y Expression for one is ChannelA, and the Y Expression for the other is ChannelB. Now just create another trace, this time make the Y Expression ChannelA - ChannelB.

The reason its called "Y Expression" is that you can specify a calculation directly for the trace. So if you want to plot A-B you just put A-B in. If you want to Sin(A) * Cos(:) / C then you just put that in. You do not need to make another variable with the result of the calculation first. The only trick is that the result must be an array and it must have time associated with it. If A, B or C are channels than it will have time, and as long as at least one of the three has history and you didn't put [0] after all three, you should get an array.

Link to comment
Share on other sites

Archived

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