LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph line

Solved!
Go to solution

Hello, i have these tasks to do and i don;t know how. Both are on the same VI.
• to draw on an XY Graph indicator a line segment whose ends are given by Cartesian coordinates on the front panel;
• move this plane-parallel segment horizontally or vertically, as selected from a control on the front panel. The movement will be done alternately, between two predetermined points.
On the image i will translate:

TIPUL DE DEPLASARE - TYPE OF MOVEMENT(HORIZONTAL OR VERTICAL)

POZITIA INITIALA - INITIAL POSITION

POZITIA FINALA - FINAL POSITION

 

0 Kudos
Message 1 of 6
(1,013 Views)

Hello,

 

do you have more than a picture? Please send the Vi in the state as far as you came.

 

P.S. Nobody here will solve this problem for you, since it is examen6

Greets, Dave
0 Kudos
Message 2 of 6
(1,003 Views)

So what have you tried?

 

(the VI in the picture looks like it is well over 25 years old. Where did you find it? As a first step, I would resize the two array containers to show two elements and set the index to 0)

0 Kudos
Message 3 of 6
(989 Views)

This is what i did so far, it says "examen6" there bcs my teacher gave this project to me to do it, bcs no one did it in the class. 

0 Kudos
Message 4 of 6
(941 Views)
Solution
Accepted by topic author ShadowRise

OK, so I think it was a good choice to take this examen- task.

One thing first: I assume you saved this VI with some appropriate values in the 2D- Array. They are not saved with your VI but reset to the default value, which is in your case an empty array. To keep the values you can choose in the context menu of the array- control "Data Operations -> Make Curent Value default" or you do it from the Edit- Menu of the frontpanel.

In the picture of the Task there is to be seen that the coordinates come from 1D- Arrays for X and Y Values. You should stick to that.

As a hint, how to elegantly manipulate the values in an array or a cluster (which is the datatype you wire to the XY-Graph) have alook at the snippets below:

 

Addition - Vector & Scalar.png

Addition - Vector & Vector.png

 

Addition - Cluster & Scalar.png

 

Addition - Cluster & Cluster.png

 

So you can see that in the addition of two clusters the X- members and the Y- members are added separately (and when you add zero to one member it will remain).

Another point: Since "TIPUL DE DEPLASARE" seems to be an Enum, it is helpful to know, that the case- structure adapts to the elements of an enum if wired to the selection connector:

 

Enum to Case Structure.png

 

I think these are the informations you need to get through this problem.

 

P.S. for me the picture looks like LabVIEW 5.1, since it is the version I started with 😁

Greets, Dave
Message 5 of 6
(918 Views)

Also note that xy graphs "understand" complex data, so a 1D complex array makes the code simpler compared to a [2D array>cluster>XYgraph] construct).

 

altenbach_0-1688131318368.png

 

0 Kudos
Message 6 of 6
(897 Views)