LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you attach more than one datasocket connection to XY Graph?

Is it possible to make more than one datasocket connection to an XY Graph?  At the moment, I am creating tags everytime i want to view a piece of information.  I don't always want to log data so it would be handy to know how to create and attach more than one datasocket connection to a graph so I can quickly view PLC outputs using LabVIEW.
 
Any help with this is greatly appreciated,
 
Stuart
0 Kudos
Message 1 of 6
(3,094 Views)
I don't think it's possible with a front panel datasocket connection but you can easily do it on the diagram with separate Datasocket Read functions.
0 Kudos
Message 2 of 6
(3,088 Views)
Hi Dennis, thanks for the swift reply! I tried copying your code, however my XY Graph is not reading my data like it would if you connect through the "Data Operations" option. I had trouble connecting the output from the build array function to the XY Graph input, so I used the 'Variant to Data' function which seemed to connect ok, but it is not displaying the data on the graph. I would also like the plot name to show as the data socket address if possible. I attach a jpeg of my block diagram to show you what i've tried to do. If you get a chance to have a look, could you point out what i'm doing wrong? Also, is the XY Graph the best indicator for real time info from several data connections? (i had trouble getting the time data on the x-axis). Thanks for the help so far, Stuart
0 Kudos
Message 3 of 6
(3,068 Views)
Hi Stuart,
 
When creating the inputs to the Datasocket what did you do?
The best way to ensure that you have created the right datatype is to create an indicator of the desired type (XYgraph) then on the block diagram change it to a constant. (right click it and change to constant)
This should negate the need for the variant data type conversion.
Hopefully you will then start to see the data in the XY graph.
 
Has this helped?
 
AdamB
NIUK
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 4 of 6
(3,063 Views)
Hi Adam, thanks that has got me streaming the correct data type, however I am having problems showing both data plots at once. At the moment, I can only view one plot on the Chart. How do I wire my block diag. to show both at once? I have attached my code should you wish to take a look. Sincere thanks for the help so far, Stuart
0 Kudos
Message 5 of 6
(3,055 Views)

Stuart,

 

You don't seem to be using an XY graph.. You have used a waveform chart.  Is that intended?

To find out how to wire up multiple plots on a single waveform chart/XY graph. Please refere to the Basics 1 Course.  Lesson 6 will guide you through the plotting data functions/methods.

Regards

AdamB

NIUK

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 6 of 6
(3,050 Views)