Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

how to return moving string data, line, and numeric on a waveform chart??

dear all..
I have a problem to return a moving string data, line, and numeric on a waveform chart.
I tried to return a data each time i interupt by using a controll with event case and i want the current data is holding on till i release the control button, next the data will empty but actually keep moving relative to horizontal scale, and return data again when i interupt it. I want to return those three datas on a waveform chart.
I hope all of you can help me to fix my problem.
 
thanks in advance..
0 Kudos
Message 1 of 13
(4,851 Views)
Hi Alfredo,

If I understand your problem correctly, you would like different events to occur, depending on whether the control button is pressed or released.  You are on the right track by creating an event structure and logging event changes on the the pressing of the control button.  I am not too sure what you mean by keep moving data relative to the horizontal scale.  Depending on the event press or release, you can wire output data to the waveform in separate cases. 

Let me know if this helps and if you have any other questions.

Regards,

Nadim Rajabi
Applications Engineering
National Instruments
0 Kudos
Message 2 of 13
(4,827 Views)

i'm sorry if my question is confusing.

my spesific problem lies in how to plot a text data, or maybe a number (0,1,2,3,...), into a chart.

i have multiplot data returned in a chart, but when i do change any control value by using event case, i want that text and number data are also plotted in that chart. can u give me a trick or an example code??

 

thanks before.

Alfredo.

0 Kudos
Message 3 of 13
(4,821 Views)
Hi Alfredo,

Text data can be written by using the Draw Text at Point VI.  I have attached an example of how to draw text to a graph.  To simply run the program, type in a string to the string control and then press and hold shift and click on the graph.  It will draw text corresponding to where you you click.  To programmatically write text to a graph, simply remove the mouse property nodes and provide your own algorithm.

Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 4 of 13
(4,807 Views)
thanks for the code, but i don't yet try the code coz i still use LabVIEW 7.1,
i hope the text data can also be plotted as a stream data to a strip chart.
 
regards.
0 Kudos
Message 5 of 13
(4,800 Views)
Hey Alfredo,

I have attached the newly saved VI in LV 7.1.


Enjoy,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 6 of 13
(4,793 Views)

dear Nadim,

your code is so amazing, i have tried it.

but actually i want to put data on a chart so the string will flow like a strip type of data on chart. i still have no idea to do this.:mansad:

for example, i have two datas, the one is sinusoidal signal, the other one is string data, the data acquisition will plot the sinusoid continuously, and the string data only be plotted when i activate event case. both data are displayed in a STRIP CHART, lets say the x-scale as a time scale. i want to show the current 10 second data. so sometimes both data are displayed if only i do event case. once i release the event, the string will be empty, and the last string data will be shifted by the next empty data.

maybe you can give me a solution??

regards.

0 Kudos
Message 7 of 13
(4,789 Views)

Hi Alfredo,


One simple way to simulate a text field passing through a waveform would be to manipulate the origin input on the Draw Text at Point.vi.  Instead of passing a static value of where the user mouse clicks with shift, you would actually pass a dynamic value to the origin cluster.  This will cause an impression of "moving text" on the graph.


Regards,

Nadim
Applications Engineering
National Instruments

0 Kudos
Message 8 of 13
(4,778 Views)
dear Nadim..
i ran labview 8.2 but still cannot open your vi.
can you give me an example in labview 7.1??
now i'm try to manipulating the draw text to point.vi, still struggling^_^
maybe you can give me additional explanation coz i'm not yet find the idea..
 
anyway, thanks a lot.
alfredo.
0 Kudos
Message 9 of 13
(4,767 Views)
dear nadim,
inputting dynamic variable to origin is done well.
but i have problem when i want to synchronize it with the data on chart.
i use the iteration number of the main loop as the x origin..
i choose 20 data as the maksimum range of the chart, so the origin of the 20th data text should be on the rightest of the chart, but it is not.
maybe it has something to do in the font??or...??
can i keep the text data in the first place it appears?? and the new data plotted afterward??
 i mean i want to display it as in a strip chart.
 
thanks.
alfredo.
0 Kudos
Message 10 of 13
(4,764 Views)