06-29-2023 10:03 AM
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
Solved! Go to Solution.
06-29-2023 10:39 AM
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
06-29-2023 10:58 AM - edited 06-29-2023 10:59 AM
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)
06-30-2023 03:15 AM
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.
06-30-2023 07:16 AM - edited 06-30-2023 07:18 AM
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:
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:
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 😁
06-30-2023 08:22 AM
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).