Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to plot AnalogWaveform data on a Tank object?

Hello, 

 

I'm new to Measurement Studio and I was wondering if it is possible to plot AnalogWave form data on a Tank object.  I've been able to get the data to plot on a Waveform graph using the Daq Assistant, but I would prefer to plot data in a tank and I'm having a lot of trouble doing this.  Part of the issue is my lack of experience in C#, I'm familiar with LabVIEW and C++, but not C#.  Any help is greatly appreciated.

 

0 Kudos
Message 1 of 19
(4,821 Views)
Hi Mjacobson,

Can you provide a conceptual image of what you're requesting? I don't think I have ever seen a request like this one. Are you trying to overlay a plot on a tank control?
Daniel Dorroh
National Instruments
0 Kudos
Message 2 of 19
(4,811 Views)
Just like in LabVIEW and C++, a tank is a scalar indicator so your question does not make any sense if you want to display an array.
0 Kudos
Message 3 of 19
(4,797 Views)

Basically, here is what I’m trying to do. I have a load cell that I am using to collect data.  When a user presses on the load cell, I want the Tank to represent the force that the user is applying and then when the user lets go, the tank value needs to represent that also by going back to zero.  Just a live view of the load cell reading, displayed on the Tank rather than a graph.  That is it, not at all complicated and it is very easy to do in LabVIEW, I just wanted to try accomplishing this using Measurement Studio and C#.  Thank you for replying!

0 Kudos
Message 4 of 19
(4,795 Views)

Dennis,

 

I understand and should have been more specific. I collect an array of n size, then take that array and average the contents so you have one number, then display it on the tank, repeat every 100ms or so.

0 Kudos
Message 5 of 19
(4,788 Views)
That's pretty important information that was left out. Attach your code where you are trying to write to the tank.
0 Kudos
Message 6 of 19
(4,779 Views)

Can you explain how you're doing this in LabVIEW, because I don't think it would work there either. You cannot wire an array into a scalar control, so you must be extracting one value from your array before writing to the control.

Daniel Dorroh
National Instruments
0 Kudos
Message 7 of 19
(4,764 Views)

You are correct. Sorry, I should have explained that part in more detail. I collect an array of n size, then take that array and average the contents so you have one number, then display it on the tank, repeat every 100ms or so.

0 Kudos
Message 8 of 19
(4,758 Views)
Alright, so it seems you should be able to do the same in C#. Can you give us a better idea of what you're having trouble with? If you're stuck on manipulating your array, you should check out the Linq extension methods in System.Linq. They provide a lot of handy calculations for collections or arrays of objects. If you're struggling in another place, post a code snippet showing the problem, and we can try to offer guidance.
Daniel Dorroh
National Instruments
0 Kudos
Message 9 of 19
(4,753 Views)

Ok, thanks for the help. I’m going to try and figure this out, but if I can’t I’ll post my code tomorrow.

0 Kudos
Message 10 of 19
(4,748 Views)