LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

import data from 2 programs running simultaneously and continuously as the X & Y values and draw the XY graph

hi,

I want to plot an XY graph of resistance - vs- position. (I am measuring the resistance from a DMM and reading it through a GPIB device and an VISA read.vi, and I am recording the position continuously from another motor motion program).

I am using labview 5.0. I tried using the draw waveform graph.vi given in the examples- but I could not understand how the data is input for this graph and how I could import the data from another labview program. I feel I am missing something very simple here because this sounds like a common enough application that could be done by LV. could anyone help me with this?

thanks very much,
Lalitha.
0 Kudos
Message 1 of 8
(3,627 Views)
If you want to draw an XY graph you should be looking at the XY graph examples and not the waveform graph ones. A waveform graph is for displaying data that is uniformly distributed along the x axis. The XY graph takes an x array and a y array. There's an example called XY Chart that You might want to look at if you need to increment the graph as you're acquiring data.
0 Kudos
Message 2 of 8
(3,627 Views)
I looked at the XY graph too- but I have a basic question. I am not sure how to create the X and Y array ? and canu import data into this array from other labview programs that are running simultaneously? I havent used LV for long and I know this qn is too simple - but I shd be grateful for any help,

thanks
Lalitha.
0 Kudos
Message 3 of 8
(3,627 Views)
Sure, if you have multiple VI running at the same time, put the values in a global variable (I recommend that you put the data in an array first) and use these variables as input for your XY chart.
0 Kudos
Message 4 of 8
(3,627 Views)
hi math

my computer was down for the last 24 h- I shall chk what u said today,

Lalitha.
0 Kudos
Message 5 of 8
(3,627 Views)
I agree with Math on the global variable, but you might have to use some control mechanism to synchronise your three VIs (Resistance measurement VI, position measurement VI, and XY plot VI).

I recommend the rendezvous VIs to synchronise the VIs. Please see attached example.

Hope that helps.
0 Kudos
Message 6 of 8
(3,627 Views)
hi heiko,

ya - that program works. but I want to know how I can import the resistance values from my MUltimeter program into this global variable which read resistance. I tried to do it thro the block diagram of the main vi by wiring the resistance values to the 'resistance' global var - that dint work. I also looked into the global variable vi itself- I couldnt find a function that would help me import the values from anotehr program into this global var.

what do I do ?

thanks,
Lalitha.
0 Kudos
Message 7 of 8
(3,627 Views)
That depends, if the program you get your resistance values from, is a VI or not.

If it is a VI, then you can simply place that VI into the 'measure resistance.vi' in place of whatever I wired to the global variable. But make sure, that the VI is inside the case structure, otherwise the the resitance value will be measured at the wrong time.

If it is not a VI, then I would need some more info to help you.
0 Kudos
Message 8 of 8
(3,627 Views)