01-31-2020 02:56 AM
Hi.
I have done one program where I want to write first the number 58 and then number 2 and I want to see both numbers. When I execute the program it writes okey first the number 58, but then, to put the number 2 it deletes the number 58 and I don´t want to delete the number 58. How can I do it to see both numbers, without deleting anyone?
01-31-2020 03:09 AM - edited 01-31-2020 03:13 AM
Hi 99,
you still miss basic LabVIEW knowledge: why do you try to insert elements in an empty array?
Why do you need a sequence structure and local variables???
Why don't you start with Training (as suggested several times before) and very basic testing VIs to learn LabVIEW?
@labview99 wrote:
When I execute the program it writes okey first the number 58, but then, to put the number 2 it deletes the number 58 and I don´t want to delete the number 58.
Because you even miss that basic "THINK DATAFLOW!" mantra due to your mis-use of local variables!
Do yourself a favor and start with those Training resources offered in the header of the LabVIEW board…
01-31-2020 03:18 AM
Yes, you are right, i have not noticed.
Thank you for your help
Best regards
02-04-2020 03:14 AM
Hi,
I have done a program in which I have to insert to different numbers in one array, and I don´t know why, but it inserts one number and when it has to insert the other one it eliminates the previous number. I attach one picture to see more clear.
The blue line is connected to the array where I want to insert the two numbers.
Best regards
02-04-2020 03:20 AM - edited 02-04-2020 03:27 AM
You branch the wire (blue, thick array wire) and so you have two different arrays.
You need to pass the array through continuously.
You probably also want to read about Shift Registers.
I will also suggest the learning materials at the top of the forum 😉
Here's a quick example for Replace Array Subset (which may or may not be what you want - consider also Build Array or Insert Into Array).
02-04-2020 03:22 AM - edited 02-04-2020 03:23 AM
Hi 99,
why do you still start new threads for the very same old problem? Stick with your threads!
@labview99 wrote:
I don´t know why, but it inserts one number and when it has to insert the other one it eliminates the previous number.
You still miss the very basic "THINK DATAFLOW!" paradigm…
@labview99 wrote:
The blue line is connected to the array where I want to insert the two numbers.
No, the blue "line" (LabVIEW term "wire") is NOT connected to the array. You write the result of both array operations to two individual "value" property nodes of the same (?) FP element: a classical race condition…
What about "THINK DATAFLOW!" to avoid race conditions?
Why don't you follow my suggestions?
When do you start to take those Training resources offered several times before?
02-04-2020 03:27 AM
I ask again because it is not clear to me. Sorry for asking again
02-04-2020 03:30 AM - edited 02-04-2020 03:31 AM
Hi LabVIEW99,
I suspect that as GerdW (and others) have said, although people here are happy to help, you might find it more productive to take some of the free training materials available first.
This will allow you to do more by yourself quickly, and then you can ask questions about things you still find problematic.
There are both videos and text-based tutorials, depending on which you find more useful, or I believe (I haven't searched) that there are also now several possible sources on Youtube for LabVIEW videos and tutorials (I make no claims about their quality, either high or low).
02-04-2020 05:57 AM
I have reviewed the labview manual several times and l have also reviewed different examples, but, I still can not get the way to add to an array (that I have defined as a controller), the number that I want in the position that I choose.
02-04-2020 06:26 AM
@labview99 wrote:
I have reviewed the labview manual several times and l have also reviewed different examples, but, I still can not get the way to add to an array (that I have defined as a controller), the number that I want in the position that I choose.
Despite all of that it appears that you still are fighting against the basic tenet of LabVIEW - dataflow (unless, of course, you have an updated vi that you have not shared). The last picture that you posted had branched wires and race conditions. You had already at that point been given suggestions that you ignored. Then cbutcher gave you an example that you have also ignored. Have you done anything to try to implement these suggestions? What you are struggling with is basic, easy stuff to do in LabVIEW. You should really take some time and do more than review the manual and review examples. You really should complete the free training material (notice I said complete, not review). You've probably already wasted more of your time struggling with this than it would have taken to complete the training material. There are many people here who are willing to help when you struggle, but it becomes difficult when you continue to ignore the help that is given.