At the same time, write in an array of structure to two positions without losing a single change

I have a picture that contains a structure.

I address the sub-table (1 entry) of index i and n parallel with the function of the subset of the array because I want to update the entry to the position i and n parallel, let's say in a parallel for loop.

So, I use the subset of the table replace to write in the same table.

Everything is done using a local variable, first reading it, then write it.

The problem is when you write the updated table in the local variable, I could lose the parallel change.

So, this approach has always written the entire table. If there is a change in parallel with the old array as input, changes to the n position may be lost, when I is changed (although I never address = n i concurrently).

This could be avoided if the right position n is written or just me, when I handle them. Is there a way to write only the subset without having to rewrite the entire variable? Or an another workaround?

> Can be using data value reference will help... and it will lead to no copies of table to each parallel iteration.

It maintains only one copy of the main table and replaces all requested (5) items.

Edit: it does not help. Structure of the element InPlace disables a parallel operation. All the other options I know of generate copies of data.

Result: no, labview does not work with data very good references and it seems that your request is not possible (unless labview only).

Tags: NI Software

Similar Questions

  • Last update Thunderbird mouse clicks remove two messages at the same time, messages will open in a new tab and more problems! SOLVED by changing the parameters of mouse click

    And please - let's not blame my mouse this time? This is another new since I gave up the old one and broke the LED.

    Now, since this last update, you bird has been going crazy! One, it opens a new message in a new tab. When I select more than one message in order to move them into a subfolder, I get asked: ' opening (number of) X messages can be slow. " Do you want to continue? "Of course I didn't--I just want to move the messages!

    The "Delete" button provided above the message pane is much too sensitive. I want only to delete a SINGLE message at a time - not two or three unless I actually select more than one. Yet these two or three, often with lines of different disciplines, disappear from the window of the object.

    I don't quite know how to describe the latest issue: when I managed to get a message or group of messages, or change files, too often my playback window flashes of full screen to 'Restore down' and vice versa. It's very confusing!

    Yet once again, the question is NOT in my mouse! I think it is in the Thunderbird last "update". Too many "chiefs" (read "developers")?

    Found! Idle speed double-click radically. We'll see if it works. Thanks _much! _

  • Play two sound waves through two different sound cards at the same time?

    Hi all.

    With the help of old ship poles and the example of screw provided with Labview 2009 SP1, I could get a part of the path.

    The goal is to simultaneously play two .wav files, to two different sound cards. So far:

    (1) I can play a wav file for each sound card

    (2) I can generate two sinusoidal waves of different tones and put each two cards separately at the same time.

    But when I replace these two tones of #2 with .wav files, wave files play in turn. If wav_1 plays sound_card_1, THEN wav_2 plays sound_card_2, not simultaneously.

    It is even possible to play 2 wav files simultaneously on different maps?

    I've included a VI of the attempt to #2 above. WARNING: my labview skills are minimal and this vi was very experimental is probably terrible form.

    Why do you want to do this. Many modern sound cards have 5 channals output

  • Is it possible to have two mice connected at the same time?

    Hello. I have a gamer mouse, and I am pretty tired of changing the battery every now and then. So I was wondering if I could connect a wired mouse, I could use on the desktop, while my current mouse is always connected - for when I want to do some gaming. Windows Vista will allow that I have two mice connected at the same time?

    Hello

    You can connect two mice of universal Bus controller to the computer, but it goes to show that a single pointer.

  • TCP Read and Write at the same time

    Hello everyone,

    I have a question about parallelism in TCP connections.

    I know that it is possible to read and write on the same connection ID.

    So, if you ReadTCP and WriteTCP block each other, if you use the same TCP connection ID?

    Or to request more precise if I run two while loops, in parallel, with one end by calling WriteTCP and the other called ReadTCP.

    one of the delay of loops (or block) will be the other if both loops call their VI TCP at the same time right?

    The system is Windows 7 and Labview 2012.

    Kind regards

    Sebastian

    They are perfectly parallel.  Just write in one and read it from the other.  There is no conflict.

    See My TCP articles for more details.

  • Questions about serial port read and write at the same time

    Hi I create a user interface for the communication serial port, where there are essentially 2 front panels, where the user enters commands one and the other where the prints of UART is delivered. I thought initially using a state machine but the reading and writing may be independent sometimes and so I can't rely on States. I searched a bit on the forum and he left me even more confused. Help, please.

    (1) in a thread that sessions visa duplicated has been used for writing and reading at the same time, is it recommendable? How will this affect performance?

    (2) essentially when the vi is reading data are it must constantly view as well, however, someone said that it takes too much memory to use shift registers, so how do I go about this? If using a State in queue after the loop of reading it affects the playback loop and be sequential?

    In addition anyway is to move the cursor to the latest data from the indicator

    (3) for the control of the user input, assumes that the user has entered an order in the control and press ENTER, then writing visa is launched, but if it comes in another string and press enter then write must be called again... is - it possible? will detect the previous commands in the control of compensation?

    (4) according to my understand the expectation for the event do not monopolize resources and writing can go in parallel, am I right?

    Thank you. I have attached a very basic vi which took me to the point, but I want to make it more robust. Please help especially in the part of the user interface.

    su_a,

    (1) you can have only one session to a port. Several UART can handle full duplex so performance is not affected.  At flow rates of high data and large amounts of data, buffering and latencies of BONE can become a problem.

    (2) who told you that shift registers using too much memory? Shift registers are usually the best way to transfer data from one iteration to another. String concatenation inside a loop (registry to offset or not) causes the chain to develop and may require re-allocation of memory.  Your VI never clears the string so its cold length become very large.

    Generally, you do not have an active cursor on an indicator.  If you want to always display the most recently received characters and turn on the vertical scroll bar use a property node to keep scrolls to the bottom.  This can be annoying for users if they attempt to manually move the scroll bar and find that the program continues to move it back automatically.

    (3) if the user has changed the value in the chain of command, when he hits enter the modified value event fires.  Simply strike brace does not change the value and does not trigger the event.  Not control need to be erased, but the value that he has to change.  If you want to send the same command again, have a button send a command may be a better choice.

    (4) write is a case of the event.  It is not in parallel with anything.  The structure of the event do not monopolize resources.  The other loop will run while it waits.

    The event loop will not stop when you press the STOP button. Probably it wll take two command: change events of value after JUDGMENT before any loop stops.  Replace the Timeout event (which never expires) with a STOP: value change event and a real wire of this judgment to the Terminal endpoint.  Remove the local variable.  Make mechanical locking when released.

    Lynn

  • Random table and present several elements of the array at the same time

    Hi all

    I figured out how to randomize an array and present the items where the user can scroll through the items one at a time. However, I would like to know how I could go for the presentation of the elements of a random array at the same time. To be concrete, suppose I have a list of three words that is Word 1 and Word 2 Word 3. For each user, I'm looking for present all three words on the screen at the same time, but in a different order. If a person can see it on the screen:

    WORD 1

    WORD 3

    WORD 2

    and someone else could see

    WORD 3

    WORD 2

    WORD 1

    Pointers or guides are appreciated. Thanks for reading.

    You say that you already know how random the table, so I won't go into that. Assume that you already have 3 TextFields on screen and called tf1, tf2 and tf3. You didn't say if you use Classes or script code. I'm not a big fan of code of script in AS3, so I'm not good at writing of examples in there. The example here assumes that the class code. It also assumes

    1. You have ' declare stage instances to automatically "off
    2. TF1, tf2 and tf3 exist in all frames of the timeline of the MC that uses this class.
    public class Words extends MovieClip {
        protected var wordSource:Array;
        public var tf1:TextField;
        public var tf2:TextField;
        public var tf3:TextFiels;
    
        //constructor
        public function Words() {
              super();
              //init your wordSource array here
    
              //a Vector is like an Array, but you're very sure what type of "thing" is at each index.
              //in this case, it's TextFields.
              var tfs:Vetor. = Vector.([tf1, tf2, tf3]);
              //loop through each word and each text field and match them up
              var loops = wordSource.length;
              for (var i=0; i		   
  • How to assign write access to a large number of forms in HPM at the same time?

    as usual, we can assign write access to forms by going to manage forms of data and select each shape, then go to the section "affect access.
    but when the forms become in bulk to affect how to manage? is there a shorter way to assign access to all forms at the same time without assigning to everyone who takes time?

    Hello

    It is possible to import the safety of the command for the following line in Hyperion Planning:
    -Members *.
    -Form records
    -Form *.
    -Composite forms
    -To-do lists *.
    -Calc files (if you use the calc Manager)
    -Calc (if you use the calc Manager)

    Those that are marked with a * I did in the past, some of the others appear to me of new features you may need to check the version you are working. Take a look at the admin guide below, section starting pg 58.

    http://docs.Oracle.com/CD/E17236_01/EPM.1112/hp_admin_11122.PDF

    Hope this helps
    Stuart

  • At the same time perform write and read

    Hello

    I use
    DAQmx NOR-USB-6259

    I have problem with parallel
    run the analog signal (for example 1000 points of writing
    by 1 second) channel Dev1/ao0 physics and at the same time read
    1000 points per second physics channel Dev1/ai0 1
    How to do this?
    I tried to use DAQmxExportSignal, but it does work well, or simply, I
    don't know how to do
    correctly maybe I should use a different
    the function?

    Best regards

    AndrzejS

    Hi Andrzej,

    Yes, it's possible, but with your device not at the same time, just with a little delay (about 1 US).

    The track is almost the same thing, you need to add 2 more channels of analog inputs to your task and use playback of multiple samples. Just check the VB Clk Acq - Int example.

    I can't help with particular code, because I'm not familiar with VB, but daqmx functions are very similar, if this change is 3 click in LabVIEW, then it must also be very easy in VB. You manage tasks, if your task contains more channels HERE you will receive samples of all channels.

    I hope this helps and let me know if I misunderstood something.

    Gabor

  • Two fans at the same time come on the Satellite A30?

    Hello

    I ve just replaced my camera laptop mobo (2 fans) and I m sure that when I tested after all together put two fans of kicks in, but as I m sitting here write that I can t see or feed the second fan lights.

    I m worrying as when I took part I noticed that one of the connectors to the original fan was half way out - I guess it happened when I paid someone to repair my laptop, there is a year (I had to do it myself now and I ve felt m tech didn't know what he was doing) however I am a little concerned that maybe the second connector unit fan slipped out and this would explain why the second fan does not come when the first made?
    ID rather not disassemble it again to check if not I need to.

    Oh I've had a thought they are both controlled by temperature (they are of course) but are they set to start at different temperatures?

    Adding: chezybezy

    I m not an A30 owner but I guess that the two fans should start and run at the same time
    There are two power cables and I guess that both fans are ordered together at the same time

  • How to create impulses cause a pulse width Variable AND at the same time

    Hi all

    I have a NI PCI-6251 that comes with 2 counters, a FREQOUT port and then some DIO, DAC and ADC.  I want to trigger a pulse of variable width (easy to do with two counters) and a frequency closed, exit at the same time.  So, I want to end up with a line that will display TOP for some variable time, while the other exits a train of pulses for a time variable.  It is easy to do if you have 4 counters but I don't have one.  Does anyone have an idea to implement these two things AND making them trigger at the same time with the PCI-6251 card?

    The line is high for as long as your pulse train controlled?

    If so, set up the first counter as output pulse, configure the 2nd as output continuous meter but with the internal of the first counter output as its trigger to pause (pause when it is low).  Start the 2nd meter before the first.

    If not, you will need to use the digital output to replace at least one of the counters (max sampling rate is 10 MHz, so this would give less resolution compared to the time base of 80 MHz counters).  So you would simply write the waveform predetermined in the buffer and he clock at the desired rate and the number of samples to give the signal that you want.  You need to generate some other subsystem as FreqOut clock.

    Best regards

  • At the same time Record several channels in DAQ

    I'm currently configured to play two channels in data acquisition using DAQ Assistant. I wonder what would be the best way to go on the sampling of these channels at the same time, or as close as possible. The vi that I currently use is attached.

    Thank you

    Sawyer

    DAQmx manages the calendar under the hood and does it quite well.  If you want to change advanced sync settings you can, but of course, you will have to abandon the DAQ ASSistant and write a LabVIEW code.

    I assume you are using a multiplexing card right?  The only real solution for true simultaneous sampling is to buy a card that has several a/d converters like the S series cards.

    For the second poster: you do not have the same problem as the op.  It can be implemented in multiple channels.  If you want to help, you must provide further information that "it gives an error.

    EDIT: I bet you are trying to use separate tasks for each entry, aren't you.  If you do, you'll get a resource conflict error.  You must use a SINGLE task and set up several channels in this task to collect more than one signal.

  • Is it possible to wait in a queue and a reporter at the same time?

    Hello!

    I'm trying to implement a model event producer/consumer with queues. The problem is that I have a certain value change events (for example from a slider) I want to make the tail upward; I want only the last value change events to be processed by the loop of consumption. That's because the consumer can spend more time in the execution (sometimes several seconds) and I want to warn all the events of middle slider to be queued up pending because I write them finally to the material. Therefore, a notification utility would be preferable to use a queue here. My question is if it is possible to make the same loop of consumers to wait in the queue, as well as on the warning system at the same time? I will be wiring the VISA session and other data through consumption, if she wants to avoid an extra loop that would wait on the registrant only. Or is there another possible workaround solution?

    Thanks in advance.

    Kind regards

    Anguel

    This example has a meaning?  It is based on Mark's original proposal.

  • digital signals at the same time 16

    Hello

    I used a PXI-6254 adapter connected to the scb-68 and I try the digital output signal 16 on port 0 at the same time, so I chose to use the connector 1 port 0 line 8-23 but I can't outpul all the signal, he works for line 8-15, but for the rest, 16-23 does not work and I do not know the reason.i join 6254 board configuration and vi that I use

    Hello bobogool,

    I have taken a look at your code and noticed you write only FFFF, who would write only the first 16 lines, 0-15. Did you follow the first 8 lines of activity? If they work, I recommend that you add 8 extra bits, up to 23.

  • Avoid to get two theards at the same time

    Hello

    I was wondering how to avoid to run two threads at the same time in teststand. When I using teststand, I found it can run two threads in simultaneity.for example, I can open a file sequence, using single-pass enter point to run a theard, when this theard is not finished, I use single-pass or TestUUTs enter point to run other theard. I want to avoid this case. Is there settings, we can get motor teststand to tell me a thread is running or not?

    Thank you!

    You write a custom user interface? If you use an application Manager (all the example user interfaces and the sequence editor to do), you can see:

    ApplicationManager.Executions.Count > 0

    If you use just the engine that you can keep the number of executions by increment your account upon receipt of the UIMsg_StartExecution UIMessage and reduce your number when UIMsg_EndExecution is received.

    If instead you want to determine the number of executions of a sequence running, you can use RunState.Engine.GetInternalOption () to get a reference to the Application Manager (at least of the UIS and the sequence editor that use an Application Manager) and then do the following ActiveX to get the Executions.Count property.

    Hope this helps,

    -Doug

Maybe you are looking for