LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I work with dynamic data?

Well the actual question is:
How do I work with dynamic data in order to plot it?
I explain...
I'm reading a value from an incremental encoder with the pci6229 card and I get an angular value in LB, so what I need to do is to show that value as a "spinning bar" so if I move the encoder then I should see that bar spinning acording to the degrees that I move the encoder.
What I was trying to do is take that data and then wire it in to a Draw Line.vi thing and then see that line moving acording to the encoder's movement, but aparently I can't do that since the Draw Line.vi thing needs 2 cluster value or something and besides it plots it in to a picture file, i think.
So, somebody knows how to do what I want to?
0 Kudos
Message 1 of 9
(4,095 Views)
Try to wire your Dynamic Data directly to a Waveform Graph so as t plot the data & see what happens...
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 9
(4,086 Views)
You can wire dynamic data directly to a chart or graph as Partha suggests, but if your goal is to use the information in the dynamic data but not display it as-is on a chart or graph, you might find the "Convert from Dynamic Data" (a.k.a. "From DDT") Express VI useful.  It is on the Express "Signal Manipulation" palette.  Hope this helps!
0 Kudos
Message 3 of 9
(4,057 Views)
yeah, well first of all thanks for your answers.
 
I already tried to convert the dynamic data with the tool you mentioned  but it still gives me a wiring error. Anyways I just don't care all of the data I aquire, but only the data in real time, because I need that data to move a wheel that I can draw in LB or something, think of this: the encoder that I'm measuring is sensing the position of a steering wheel and I need to represent that steering wheel on the screen in LB.
I hope there is someway of doing this on LB.
 
ZZ
0 Kudos
Message 4 of 9
(4,037 Views)
Hi ZZ,
 
You could use a XY Graph, sine and cosine functions in order to plot the position of a point, just give it a fixed radius and perform the math operations.  I created the VI. I hope this is what you are looking for.
 
Have a good day!
 
Pablo Bernal
NI Mexico
0 Kudos
Message 5 of 9
(4,013 Views)

Yeahh!! moreless what I was trying to do, I apreciate your effort, I apologize for my delayed answer, but I don't understand what you did after the 180 divide, I think that helps me but I wonder if you can explain exactly what you did please

ZZ

By the way I'm Mexican too.



Mensaje editado por ZainZeus
0 Kudos
Message 6 of 9
(3,972 Views)
Hi ZZ,
 
So let's keep this thread in English since we already started like that and for the sake of making it available for more people. Ok, so this is what I do:
1. With a DAQ Assistant, get the encoder position as an angle in degrees.
2. Convert degrees into radians since the SINE and COSINE blocks take angle inputs in radians.
3. Obtain SINE and COSINE of that angle.
4. Multiply both of them by a fixed radius (this only determines the size of your circle in the graph, if you don't multiply them by anything, you will just get a circle with a radius of 1.
    x = r*sine(theta)     y = r*cosine(theta)
5. Plot x vs y.
 
I hope this explains it a bit more.
Have a good day!
 
Pablo Bernal
0 Kudos
Message 7 of 9
(3,936 Views)
Much better, I understand now, had trouble figuring out about each sign or vi. But what are "build array" and "boundle" vis for?
And another question, is there anyway I open a vi like an xy grap or a meter in order to modify their appearence in LB itself?
 
Thanks for answering.
 
ZZ
0 Kudos
Message 8 of 9
(3,914 Views)

ZZ,

If you open the Context Help and point the XY Graph on the block diagram, you will see that the way it takes the input is a cluster made up of two elements, each element is a numeric array, one for X and one for Y.  Since the cluster expects arrays as inputs, we cannot wire a scalar dbl value for x and another for y if we only want to plot one point. However, we can 'fool' the cluster using a Build Array of one element.

I am not sure if I understood the last question, but there is a way to customize indicators and controls and you can modify them up to certain extent. Right click on the front panel control and select Advanced - Custimize.  You can modify the graph (colors, size, location of elements, etc.)  and then save it as a different control  (.ctl file).

I hope this helps. Have a good day.

0 Kudos
Message 9 of 9
(3,901 Views)