change the same variable in different loops

Hi all

I use an event producer/consumer-controlled architecture where the two loops run processes acting on a common variable.

To be more precise, I intend to change a flag photo in the loops of consumer and producer. That's why I need to share this variable between the two loops.

I thought that the best way to do this is to use the indicator of functional photo as part of a Global Variable:
1 / FGV initialization, which is a cluster that contains the indicator image

2 / in two loops, the image indicator last value is extracted from the FGV using an action of 'read '.

3 / the value of the indicator of picture is wired through different processes that would change partially or totally

4 / Finally, in two loops the photo update flag values are wired as input to the FGV.

Above is the ideal case, I expected to work. However, this does not work, and is what I've actually implemented:

(a) in the loop of the producer, the indicator of picture is updated via a shift register, and at the same time, the new value is stored in the FGV

(b) in the loop of consumption, the indicator of the image is retrieved from the FGV, and its present value is stored in the FGV (as in the ideal case)

Then I don't why it does not work. I use other FGVs in my VI and which are modified by two loops, but THEY work...

My VI is really great, so I can't take a picture of him. Can I give you a diet simplified what is my current architecture, whose shot at him. I hope it helps.

Thank you.

Florian

Hi Florian.

Two FGV reads on the left side of your curls below will be a problem unless you use the data flow to control. The FGV bed (as shown) will occur at the start and then after the structure of each loop ends. When you really want to 'read' when Gets an element from the queue or in the loop of photo - when there are new values.

The loop of consumption is fairly easy to treat. Just run the Dequeue 'error' error 'in' on your FGV. This will ensure that playback of the FGV happens when you get a new item.

The photo event loop is a bit tricky. You could send a user of the consumption loop event (after your FGV write) to the photo event loop. In this case the user loop photo, put a reading of the FGV. This ensures that you will get the changes made in the loop of the consumer. The only downside to this approach is that the photo loop always runs once when a change is made in the loop of the consumer. You can use a Boolean value to prevent the image to be written (ensures also the image is always written after the end of the event Structure).

Here is an example:

Steve

Tags: NI Software

Similar Questions

  • How to change the same on 2 different phones to MAC iMovie project

    I am in Germany and my husband is in Spain and we have 2 separate not coupled Mac Book Air laptop.

    (1) I need iMovie project "edit" an unfinished which is currently on his laptop.

    (2) how can we share and both have access to the clips unfinished , events, projects iMovie, etc. between 2 laptops?

    We only know how to share projects FINISHED, but this isn't what I want to do.

    Could possibly copy us the unfinished project files on DropBox or something like that?

    Thank you

    This is possible, but not easy.  You need to work from a copy of the same library using exactly the same version of iMovie.  You cannot work directly for a copy of the library 'in the cloud', but you can use the cloud to transfer the updates to the library.  Libraries are often quite large, so download will be slow.  If the library contains many other events and projects you don't want to work on it would be better to create a library containing only the events and you need to collaborate on projects.

    Of course only one of you can be change at any time and you would have to notify each other when you have downloaded an update from the library and completed.  Its also important to avoid the update of the library while iMovie is running.

    Another important point is to ensure that the library contains all of the original media files and not of links to files in other libraries like iTunes or pictures that do not work on the other computer.  To do this, you need to "consolidate media" for more information see: http://help.apple.com/imovie/mac/10.1/#/mov882dee351

    Geoff.

  • Hi whant to update the changed value to dishes of the same variable used in the entry. How to do thanks in advance

    Hi, I want to update the value out put of the same variable used in the entry. How to do thanks in advance

    ya I got it. using the property node (and if you select value) we can do. Thans for answer

  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • VRA unable to create groups of companies with the same name in different tenants with vRO

    vRA 6.2.2 Build - 2754020

    vRO 6.0.1

    Through the vRA GUI I can create groups of companies with the same names in different tenants as follows:

    Tenant1: BusGroup1, BusGroup2, BusGroup3

    Tenant2: BusGroup1, BusGroup2, BusGroup3


    However, to create business groups with the same names in different tenants via the vRO, specifically the workflow plugin Library / vCloud Automation Center / Administration / Business groups / create a group of companies, fails in the second tenant with the below error:


    [42106] the specified condition is not respected for 'name '. (Name of the dynamic Script Module: createBusinessGroup #12)

    If I change the naming convention to be different by tenant, then I have no problem. I thought it might be a restriction in the product, but as said I was able to create with the names of same origin through the user interface.

    Anyone experience the same thing?

    This is a known problem within IaaS API the plugin vRO uses to manage groups of companies through business groups workflows. You don't have the same problem of the vRA UI because the user interface (according to the 6.x) does not use the same API IaaS to manage groups of companies.

    The only alternative to 6.x for now is to directly use the helper generic entity Manager plug-in itself. You can take a look at the first example in example CRUD Infrastructure tasks management Scripts.

    I hope it helps.

    Sergio

  • How to register multiple files with the same name with different num revision

    Hello

    Can someone please tell me, how to register several different files with the same name with the revision number using the RIDC API.

    For example:
    First of all I will be saved in a file (TestFile.txt) in a content server with revision number 1 using the RIDC API in application of the ADF. Then after awhile, will change the same line (TestFile.txt) check-in and once again. I tried to check the same file several times, however first Check-in correctly in server showing revision 1, so that Check-in same file again, her gives no error message, and also its not reflecting only not to the server. Single file (TestFile.txt) reflecting on the server.

    How to implement this feature using the RIDC API? Any suggestions would be helpful.

    Concerning
    REDA

    Published by: 887680 on March 6, 2013 10:48

    (1) get the content ID (dDocName), call CHECKOUT_BY_NAME
    (2) call check-in service with dRevLabel = previous dRevlabel + 1

  • Air ipad 2 at the same price in different stores for Apple in California?

    Air ipad 2 at the same price in different stores for Apple in California?

    To different Apple store, Yes. Some other retailers can offer a small discount (Costco is about $ 20 cheaper, for example). but for the most part, it will be the same price regardless of where you buy it.

  • I have 2 bookmarks with the same name but different stuff in them. I want to remove one, but pass the contemts remaining bookmark

    I have 2 bookmarks with the same name but different stuff in them. I want to remove one, but pass the contemts remaining bookmark

    This is the first mention you made records. See this - https://support.mozilla.org/en-US/kb/Sorting%20bookmarks#w_rearranging-manually - and move individual bookmarks from one folder to the other folder. You may need to press the Alt key to display the Menu bar and the View menu item.

  • Let me know if there is an option to differentiate is with the color of the tab or return background color tab. I use to open differrent pages on the same site in different tab or window, in order to identify each i

    Let me know if there is an option to differentiate is with the color of the tab or return background color tab. I use to open differrent pages on the same site in different tab or window, in order to identify each...

    Try:

  • My theme tab in display properties is unusable. How can I change the theme in a different way?

    How can I change a theme in a different way, not not not using the properties of display/theme?
    Because this tab is just lika a image - there is nothing clickable, none of the functions to work.
    I need for you to tell me how to change the themes in a different way, even if it is very complicated, or you could tell me where I can download a file that I need to replace the old works is not a (one that works on this theme unusable tab)

    I hope for a quick response,
    Thank you

    Hello

    Remember to make changes to the computer before this problem?

    There are no other methods to set the display settings.  However, you can try to solve the problem.


    Follow these methods.
    Method 1:

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows: http://support.microsoft.com/kb/322756

    Perform these steps.

    a. copy then paste the content below into Notepad.

    b. above, click on "file save as" change the "save as type" to "All files" and name it anything with a .reg extension.

    c. Double click on it and choose "merge" see if that brings the display options of the properties.

     

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

    "NoActiveDesktopChanges" = hex: 00, 00, 00, 00

    "NoActiveDesktop" = DWORD: 00000000

    "NoSaveSettings" = DWORD: 00000000

    "ClassicShell" = DWORD: 00000000

    "NoThemesTab" = DWORD: 00000000

     

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]

    "NoDispAppearancePage" = DWORD: 00000000

    "NoColorChoice" = DWORD: 00000000

    "NoSizeChoice" = DWORD: 00000000

    "NoDispBackgroundPage" = DWORD: 00000000

    "NoDispScrSavPage" = DWORD: 00000000

    "NoDispCPL" = DWORD: 00000000

    "NoVisualStyleChoice" = DWORD: 00000000

    "NoDispSettingsPage" = DWORD: 00000000

    "NoDispScrSavPage" = DWORD: 00000000

    "NoVisualStyleChoice" = DWORD: 00000000

    "NoSizeChoice" = DWORD: 00000000

    'UnadviseClient ' = -.

     

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop]

    "NoChangingWallPaper" = DWORD: 00000000

     

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager]

    'ThemeActive' = '1 '.

     

    "DllName" = hex (2): 25, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 d, 00, 52, 00, 6f, 00, 6f, 00,------.

    74,00,25,00 5 c 00, 72, 00, 65, 00, 73, 00, 6f, 00, 75, 00, 72, 00, 63, 00, 65, 00, 73, 00, 5 c,

    00,54,00,68,00,65,00, 6 D, 00, 65, 00, 73, 00, 5 C, 00, 6 C, 6F 75, 00, 00, 00, 61, 00, 5 C, 00,------.

    6 c, 00, 75, 00, 6F, 61, 00, 00, 2nd, 00, 6 d, 00, 73, 00, 73, 00, 74, 00, 79, 00, 6 c 00 65, 00, 73,------.

    00,00,00

    Method 2:   In addition, run the SFC (System File Checker) scan and check if there is any system of file corruptions. (You need the XP disc to run this method).
    a. to do this, click Start, click programs, on Accessoriesprincipally made, right click guestand then click run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click allow.
    b. type the following command and press ENTER:
    sfc/scannow

    The sfc/scannow command analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.
     
    More information on SFC scan found in this document:
    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)
    http://support.Microsoft.com/kb/310747

    Method 3: If the methods above do not help, you maytry to perform a system restore.
    The System Restore tool uses points of restore to return the system files and settings to an earlier point in time. You can use it to restore the operating system to a point in time where you have not experienced the problem.

    For users of XP system restore.
    How to restore Windows XP to a previous state
    http://support.Microsoft.com/kb/306084

  • How many user take RDP at the same time with different user login ID in Server R2 2012

    How many user take RDP at the same time with different user login ID in Server R2 2012?

    How many user take RDP at the same time with different user login ID in Server 2008 R2?

    How many user take RDP at the same time with different user login ID in Server 2012 starndard?

    How many user take RDP at the same time with different user login ID in Server 2008 standard?

    This issue is beyond the scope of this site (for consumers) and to make sure you get the best answer, we need to ask either on Technet (for IT Pro) or MSDN (for developers)

    If you give us a link to the new thread we can point to some resources it
  • Running the Single Instance and RAC on the same server of different homes.

    Hi guys,.

    I already have 4 node RAC12c installed on OLE 6.

    I'm planing on some of my other 12 single instance databases on other migration for RAC nodes.

    Please correct me here if I am wrong...

    My understanding is that, to be able to use DBCA or rconfig for conversion of database instance RAC, the only instance and RAC cluster must run on the same server or machine node.

    Thanks to this understanding... Am planing on the installation of a binary single instance on one of my cluster node node1 say and then use RMAN to duplicate the single instance or just an RMAN restore from the node of the instance that is unique to this node1. Am capable of this plan must then use DBCA or rconfig to convert the CARS database.

    Now, my question is can I run a single instance and RAC on the same server for different homes with different database ports?

    2. for these unique instance that runs on the server RAC 1 node, can I use the RAC database listener that runs from the House of the grid or I have to create another auditor?

    Thank you in advance and also let me know if I can use DBCA or rconfig when the only instance and rac database are on separate nodes.

    K

    Fix. And that's what I would normally do. In general, I would have just an ORACLE_HOME directory that can be used by the punctual and RAC databases at the same time.

    See you soon,.
    Brian

  • Imports to create my destination but put the images in a subfolder under my destination (always under the same name but different from my folder created)

    Imports to create my destination but put the images in a subfolder under my destination (always the same name but different from my folder created under) Lightroom CC 2015.3

    I solved the problem. I think that this should be addressed.

    When importing from is no possibility for "put it in a subfolder when.

    display all the options. But there is down to bottom left a little box that

    When hovered says 'show fewer options'. When this window opens and copy

    is selected, it offers the possibility to in a subfolder. Who has been

    selected and the origin of the problem.

    It is an option that should show the full screen, but also the show

    under the screen.

    Monroe

    Monroe Halpern

    [email protected]

  • When we try to write in a pdf file. document, it changes the Danish letters Æ Ø Å to different signs. To do this, this om pc and Mac. Anyone know of a solution? Thank you

    When we try to write in a pdf file. document, it changes the Danish letters Æ Ø Å to different signs. To do this, this om pc and Mac. Anyone know of a solution? Thank you

    Hi, I found the problem, it seems that the pdf file uses a helvetica font, and when we write in a part of the PDF with the Danish letters A, Æ, O, it changes signs. I changed the Roman fonts in adobe acrobat pro, and then there's no problem. But he seem´s that the standard in pdf files is helvetica, and there is not time to change the files, because we get only the files on the day of the exams at school. It happens in all versions of adobe 11 and DC, it is also a problem on Windows 7, 8.1 and windows 10 more Macbook.

    Kind regards

    Med Hotel hilsen

    Price Patrick Simon

    TI-Vejleder

    Langeskov Skole

    Ronningevej 38

    Langeskov 5550

    Denmark

    FRA: meenakshin83966505 [email protected]<>[email protected]>

    SVAR til: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Dato: måndag den 18. January 2016 kl. 14.39

    Til: Simon Price [email protected]<>[email protected]>

    Emne: You have been mentioned by meenakshin83966505 in Re: when we try to write in a pdf file. document, it changes the Danish letters Æ Ø Å to different signs. To do this, this om pc and Mac. Anyone know of a solution? Thanks to the Adobe community

    You talked

    by meenakshin83966505https://forums.adobe.com/people/meenakshin83966505?et=notification.mention> in Re: when we try to write in a pdf file. document, it changes the Danish letters Æ Ø Å to different signs. To do this, this om pc and Mac. Anyone know of a solution? Thanks to Adobe Community - see the reference from meenakshin83966505 to youhttps://forums.adobe.com/message/8402116?et=notification.mention#8402116>

  • I want to know if I can use creative cloud with the same account on different computers

    I want to know if I can use creative cloud with the same account on different computers, because my children want to she and I have known if I buy when I can use it on several computers at the same time

    If it is the individual subscription, you can activate on 2 computers only.

    However, there is no limit for installation, but you can connect and activate on 2 computers only.

    If you had already signed and activated CC apps on 2 computers, and there still if you want to activate on a 3' rd computer, you can simply disconnect one of the 2 comps, so that you can keep counties of activation.

    For more information, see the link below:

    https://www.Adobe.com/content/dotcom/IE/products/creativecloud/FAQ.html

Maybe you are looking for

  • 300 GB in apps?

    Hello, I am new to this operating system and do not know if it is correct. in 300 GB showing system preferences applications are increasing, but see the HDD information shows me any other information.

  • My HP Pavilion laptop has apparently not "Bluetooth." It can be added?

    I have a Dell keyboard and mouse (from the computer earlier) and want to use the pair with my little HP laptop wireless.  Is it possible to do?  I can't find any Bluetooth installed on this system.

  • Windows 7 Home Premum 64 bit catering to 32-bit

    Hi, I am looking to purchase a HP Pavilion dv6-3080tx or the 3078tx in the coming weeks. It comes with the system of Windows 7 Home Premium 64-bit. I currently see if my existing programs (running on a HP with Vista 32 bit) will run on 64-bit. My que

  • Compressing files with local characters

    Hello community, I will compress files with LabVIEW, but the names of files in the zipfiles be annoying especially since I use English characters such as 'a', 'e' etc. If I zip outside labview then the file names are very well, then I guess it's a th

  • How can I find the HP prog who remembers my passwords

    Have all new TouchSmart 520 and when I started somehow, I found a prog which was to remember my password but I could not find him.  Where can I go please?