Single graph, multiple loops

Hello,
I have a (hopefully) simple problem with a (hopefully) simple solution. The picture explains it best I think.
There are three queues firing at different times, thus necessitating three independent FOR loops. I need to be able to plot the output from each FOR loop onto a single graph.
Any suggestions?
Thanks in advance

Hey John,
OK I looked at the picture and we STILL need a thousand words.  Put each for loop in its own independent structure.  Then they can run in multiple threads.  Right now the while loop you have will not iterate until ALL of the for loops finish.  This style does not make it easy to extend or maintain when the assumption that the arrays have the same number of points becomes invalid (that is, always code around assumptions)
Now to break my own advice,  I'm assuming the user REALLY needs the data graphed, and the experiment cannot provide a result based on analysis of the data that you are graphing.  BUT- CHECK THIS ASSUMPTION before we go too far down the wrong road!
As I said, before waxing philosophically, your code needs some improvement to abstract the display functionalities and make them less dependent on the UI in this code level.  Or, to restate, you need LVOOP concepts!
One of the simplest ways to do this is to use an "Action Engine" to maintain the data in the UI graph.  You can pass a reference to the existing graph into this AE and use "Actions" (methods) "Clear", "Adopt", "Appendto.Plot" etc...
In this case I would also think about changing the graph into an "X-Control."  An X=Control allows code to be executed dependent on the action being performed on the data, like an AE but, with better handling of resource when called asynchronously from multiple locations.  For really good advice on how to go this route poke an NI KNIGHT. cus you've gotten out of my league (I know the concepts and theory, I've used X-Controls,  but I lack the amount of practical experience some of these Knights have with the newer powerful LV architectures)
Reguardless- keep me posted!  your code looks interesting!
Jeff

Similar Messages

  • Insert pages from a single document multiple times

    I'm trying to create a simple program that I can use to display PDF files that I can use to play at the piano. I perform often, and need to create "play lists" from which I can pull all, or part of, a PDF file containing music and display it.
    I have it all working, except for one problem. I may need to "repeat" a section of a piece. I'm building up the play list by calling AcroPDDoc.InsertPages for each item in the play list. If a PDF file appears multiple times in the play list, when I call InsertPages, the call fails.
    In this code snippet, pdDoc is the main doc to which I'm adding pages. playList is a generic List of my own PlayList objects, and I need to iterate through all the items in the playList except the first one, which is already loaded.
    This code works great unless the fileName I specify has already been opened. The call to AcroPDDoc.Open succeeds just fine, but the call to pdDoc.InsertPages fails if the file has already had pages from it inserted. All other documents work fine. The documentation, of course, doesn't mention this.
            int insertPage = pdDoc.GetNumPages() - 1;
            for (int i = 1; i < playList.Count; i++)
              var newDoc = new AcroPDDoc();
              var item = playList(i);
              int startPage = 0;
              int endPage = 0;
              if (newDoc.Open(item.fileName))
                startPage = Math.Max(0, item.startPage);
                endPage = Math.Max(0, item.endPage);
                var totalPages = newDoc.GetNumPages;
                if (item.endPage < 0 || item.endPage > totalPages)
                  endPage = totalPages - 1;
                int numPages = (endPage - startPage) + 1;
                if (pdDoc.InsertPages(insertPage, newDoc, startPage, numPages, 0))
                  insertPage += numPages;
    So, the questions:
    1.) Is it possible to load pages from a single document multiple times?
    2.) Is there a better way to do this? (That is, loop through a list of file names, starting and ending page numbers, and add the documents to an existing document.)
    Any help appreciated! Thanks -- Ken

    Hi Ken,
    >The documentation, of course, doesn't mention this.
    The documentation does not state explicitly that you can't insert pages again from a PDDoc you open again and never close.
    But it mentions that you get references only from an already opened PDDoc.
    "...Opens the specified document. If the document is already open, it returns a reference to the already opened PDDoc. You must call PDDocClose() once for every successful open..."
    It doesn't state that you can't insert pages from a referenced PDDoc but it seems so.
    I would close the PDDoc within your for-loop after inserting pages and release newDoc.
    Regards
    Norbert

  • Questions about parallel and series sturcture in SCTL (single clock timed loop) in FPGA VI

      I am using LV 8.2.
      I have wriiten a FPGA VI, in this VI, there are 3 filters inside the SCTL (single clock timed loop) (I use the shift register to be the effect of unit delay). Would I save the resources of the FPGA used (such as slices and LUT) in the compliation report if I use 3 SCTL ( 1 SCTL contain 1 filter)  and cascade them in series?
      Thank you! 

    Sorry, I am afraid that you have misunderstood my meaning.
    Here is the method you suggested before:
      I mean I use the shift registers attached in the while loop, not in the SCTL. The number of shift registers used will not be decreased when we increase the number of SCTL in the second plate of the flat sequence structure.  Totally , there are 6 pairs shift registers for 3 filters (1 filter needs 2 pairs). I mean I put the calculation parts, such as b0*x[n]+b1*x[n-1]+b2*x[n-2] inside the SCTL ( the operations of multiplication and add). Instead of putting 3 filters numeric operation part in one SCTL. will we reduce the resources used if we use 1 SCTL to do the operation parts of 1 filter? As the code inside each SCTL will be reduced.
      Maybe you tell me if such approach will reduce the reosources used? Or there is no difference?
      Thank you!

  • "multiple loops"

    I am creating a multiple-loop (4) process control VI that passes 2 basic types of data between loops, i.e., an integer array and clusters. Originally queues were used to transfer the data, but I ran into problems when trying to dequeue more than one queue per loop. I next tried functional globals, but were just too slow to prevent the empty queue syndrome. Next came global variables, which proved to be the fastest, contradicting all conventional programming practices. All this experimentation was done on a single-core PC. I now have implemented the code on a multiple-core (4) PC. Does the use of global variables relagate the mutliple-core architecture to single-core execution? Perfmon indicate 25% CPU usage, don't know if this is one processor doing 100%, or 4 x 6%? I have seen a global queue used to transfer data, which sounds like an oxymoron, but could this be a good way to go?

    LabVIEW will automatically make use of multiple cores/CPUs. If you want more precise control you can use a Timed Loop, as those allow you to specify which core to use. You may also want to take a look at the information in the Multicore Programming part of the NI site.

  • How do I graph multiple bit values on one time axis?

    I want to graph multiple bit values, all of which will change back and forth from 0 to 1, on the same time axis, but I don't want any visual overlap between the different bit value traces.  Now I could do this by graphing bit one as either 0 or 1, bit 2 as 2 or 3, bit 3 as 4 or 5, etc., but I would really rather have multiple Y axes showing 0 to 1, stacked vertically on the same time (X) axis.
    You could visualize this as multiple pens on a strip chart continuously recording different values.  Each pen has its own vertical area in which it writes, but all pens could be writing data from the same numerical range.
    Hmmm...  I think my description might be roughly as clear as mud, but if anyone out there can figure out what I am asking and has potential solutions, please let me know.
    Thanks!

    Thanks.  I will look at that VI, but I think I have already seen it.  My problem is that I have CAN data coming in for an hour or so, but the time interval between receiving specific CAN arbitration IDs varies, so I want to plot the X axis against specific, varying time values, not a standard dT.  I'm not sure I can do this on a digital graph, but I haven't given up hope yet.
    BTW, I am receiving 8-byte CAN packages.  Some of the bytes represent actual values, but I need to break others up into individual bit values to see error and status flag settings.  Once I break the bytes into bits, I convert from analog values to digital values.

  • What is meant by single entry-multiple options in the selection screen

    hi,
      please let me know what is the meant by 'single entry-multiple options' in a selection screen.
    thanks in advance

    Hi Surya,
    Nomally we use to declare Selct options like
    <b>select-options : s_var for mara-matnr.</b>
    here you can enter range of values for material number like 000 to 9999999999.
    but if you want single entry multiple option you need to give no-intervals options when the select option will behave like parameter .. when you cannot give range of values but you can give multiple values for a single field.
    for single entry-multiple options  write the select option like this
    and see the diffrence.
    <b>select-options : s_var for mara-matnr NO INTERVALS.</b>
    here cannot enter low and high range for matnr but you can enter mulitple values for select option..you can enter only low range values..
    Please reward if usefull..
    Thanks,
    Gokul

  • Explain about transparent mode, single mode, multiple context mode

    You can explain about the differents of transparent mode, single mode, multiple context mode in ASA 5500? Thank you very much.

    Great question. Hope the below helps:
    Transparent Mode: In this mode, the ASA will filter traffic without requiring L3 on the ASA. This means that in your config you will not put IPs on the interfaces to be used for traffic filtering. Thus, filtering is transparent to the traffic as the traffic isn't directly routed to the firewall. Think of it like you have a server plugged into a switch. In transparent mode, you place the ASA between the server and the switch and no configuration change is required to the server. In routed mode, you place the ASA in the same physical location between the server and switch, but have to change the server to use the ASA as a default gateway.
    Single Mode: Default mode of an ASA. The ASA acts as a single firewall and all interfaces are provisioned to be managed through a single firewall configuration.
    Multiple Context Mode: The ASA is split into multiple virtual configurations. With the ASA now virtualized, you provision the physical interfaces on the ASA to the virtual firewall configured. Each context has it's own configuration seperate from the rest of the firewall. Multi-context is meant for enterprises to invest in a single piece of hardware and scale it for use as multiple security devices.
    Hope this helps. Let me know if you have anymore questions!
    -Mike
    http://cs-mars.blogspot.com

  • Toggling between single and multiple selection in a table

    I am working on ADF faces. I need to switch between single and multiple selection in <af:table based on a button I select.
    I cannot use switcher or rendered property inside <af:table. Only the first one is rendering the second one is not rendering based on the switch
    <f:facet name="selection">
    <af:tableSelectMany autoSubmit="true"
    rendered="#{treeBean.multipleRows}"/>
    </f:facet>
    <f:facet name="selection">
    <af:tableSelectOne autoSubmit="true"
    rendered="#{treeBean.singleRows}"/>
    </f:facet>
    When I use inside the switcher, it doesn't like the parent.
    Any ideas would be greatly appreciated.
    Thanks,
    Vijay.

    I have probably misunderstood what your issue is. I do not know what your version of ADF faces is. Here is some sample code working with my version. Please check if your jdev has "rowSelection" attribute. If it has, please try my sampe code
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces">
    <jsp:directive.page contentType="text/html;charset=utf-8"/>
    <f:view>
    <af:document title="tableSelectMany Demo">
    <af:form>
    <af:panelGroup layout="vertical">
    <af:messages/>
    <af:selectOneChoice value="#{sessionScope.tableSelection}"
    autoSubmit="true"
    id="selType"
    label="Selection Type">
    <af:selectItem label="Single" value="#{null}"/>
    <af:selectItem label="Multiple" value="#{true}"/>
    </af:selectOneChoice>
    <af:table summary="Periodic table"
    binding="#{tableActions.table}"
    partialTriggers="selType"
    rowSelection="#{sessionScope.tableSelection ? 'multiple' : 'single'}"
    value="#{periodicTable.tableData}" var="row" rows="10">
    <af:column>
    <f:facet name="header">
    <af:outputText value="Name"/>
    </f:facet>
    <af:outputText value="#{row.name}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Symbol"/>
    </f:facet>
    <af:outputText value="#{row.symbol}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Action Column"/>
    </f:facet>
    <af:commandButton immediate="true" text="Action"
    action="#{row.action}"/>
    </af:column>
    </af:table>
    </af:panelGroup>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • Multiple loop in one loop

    Dear experts,
    Please find the code below.This is text variable customer exit.Can u ple help me to put these multiple loops into one loop.Do u suggest this code is ok?
    Appreciate your help.
    WHEN 'ZSTXTPE01AA'or 'ZSTXT0FISCPER305AA'or 'ZSTXT0FISCYEAR01AA'
    INCLUDE Z_VARIABLES_TEXT
    DATA: vtype i,
          fisper i,
          fisyear i
    IF I_STEP=2.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0VTYPE01AA'
    vtype=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= vtype.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCPER305AA'
    fisper=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= fisper.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCYEAR01AB'
    fisyear=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= fisyear.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    Rgds
    ACE

    LOOP AT I_T_VAR_RANGE INTO loc_var_range
    WHERE VNAM IN('ZS0VTYPE01AA', 'ZS0FISCPER305AA','ZS0FISCYEAR01AB')
    vtype=LOC_VAR_RANGE-LOW.
    endloop.
    L_S_RANGE-LOW= vtype.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    L_S_RANGE-LOW= fisper.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    L_S_RANGE-LOW= fisyear.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    try the above code
    also
    What u r doing inside ur loop endloop?

  • Multiple loops in one loop for text variables

    Dear experts,
    Please find the code below.This is text variable customer exit.Can u ple help me to put these multiple loops into one loop.Do u suggest this code is ok?
    Appreciate your help.
    WHEN 'ZSTXTPE01AA'or 'ZSTXT0FISCPER305AA'or 'ZSTXT0FISCYEAR01AA'
    INCLUDE Z_VARIABLES_TEXT
    DATA: vtype i,
          fisper i,
          fisyear i
    IF I_STEP=2.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0VTYPE01AA'
    vtype=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= vtype.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCPER305AA'
    fisper=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= fisper.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCYEAR01AB'
    fisyear=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= fisyear.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    Rgds
    ACE

    Hi ACE BW,
    You can try to use the SELECT statement and then include the LOOP inside it.
    Thanks,
    Daniel

  • How to Implement a Single Folder - Multiple Authors Scenario für NW 7.3?

    Hello,
    is a version "How to Implement a Single Folder - Multiple Authors Scenario" for NetWeaver 7.3 planned?
    Best regards,
    Arnold Gallemann

    Hi Detlev,
    thanks a lot for sharing your work!
    Due to the reason we need a different configuration in KM, I changed e.g. some values in the .cc.xml and .co.xml files. I rebuild the project and checked the created EAR file. I noticed that the ConfigArchive file in EAR file still has the old values. It seems that SAP NetWeaver Developer Studio 7.3 is not recognizing in a portal application project the configuration of the src.config folder anymore. To test this, I removed the initial provided ConfigArchive in the folder dist\PORTAL-INF\config\ from your project. I rebuild it and the ConfigArchive in the EAR file wasnu2019t included.
    I found in the documentation (http://help.sap.com/saphelp_nw73/helpdata/de/42/60aec0032c1422e10000000a114cbd/frameset.htm) the SAP Note 1572813, which would describe how to use KMC wizards in SAP NetWeaver Developer Studio 7.3. But the article is currently not released to public.
    In addition I have discovered, that it is possible to include the src.config folder in the build process if the project is set up as a development component (see for details bullet point Optionally of http://help.sap.com/saphelp_nw73/helpdata/de/42/60aec0032c1422e10000000a114cbd/frameset.htm). This works. But later on I am facing another problem: I am missing the entry KMC-CM to add it as a dependency for the development component.
    Best regards
    Mario

  • Single folder multiple Author scenario in KM

    Hi Every One,
           I have tried to configure Single folder multiple Author scenario in KM. i have done all configurations Given in Following document  but i haven't Succeeded. Please help me Out.
    Configuration Document like:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f74d7c0-0d01-0010-50b1-9810a1584b00
    Regards
    Sridhar.

    Hi All,
    Sorry for the previous post. Let me explain the scenario in brief..
    We need to upload a document to a particular folder in KM and assign Permissions to the same. Say For example, we have 100 users and a admin user. The uplaoded file by a user should not be viewed by other 99 users, the admin & the user who uploaded the doc can have full control over it.  Similarly the case should be generated for the other 99 users.
    We tried to uplod the document and assign permnissions manually. But i know this is not the best way to approach this requirement.
    What should be the best solution to assign permissions to the uploaded document?
    Regards,
    Sridhar

  • Plotting two graphs in one single graph

    Hi.  This is my first time using control and simulation.  I want to plot two graphs within a single graph.  It seems that I have to use bundle and build arrays functions but I just do not know how to plot them.  The x points and y points of (2) are just defined by a single set of points included in the array defined.  The x points and y points of (1) are results of another formula, but both plots would fit in the same location of a single graph.  I hope my question is understandable.  I attach part of the model that I want to be plotted.
    Thank you
    Solved!
    Go to Solution.
    Attachments:
    two graphs.JPG ‏26 KB

    Hi,
    You can try something like this. Check the attached VI.
    Regards,
    Nitzz
    (Give Kudos to good Answers and Mark it as a Solution if your problem is Solved)
    Attachments:
    Untitled 3.vi ‏39 KB

  • Inconsistent behavior when selecting single or multiple messages

    Mail seems very sensitive when selecting messages, either single or multiple. It often opens a message I have single clicked on (I do not use the pane) so that I could delete, and when selecting multiple messages for deletion or filing it often opens them all up as if i double clicked on the last one selected even though i didn't double click. This happens with both an external mouse and when using the trackpad button on my PB, and i have moved the double click settings all the way to the far right but that still didn't fix it. I have never had this problem with any other program, and I regularly select multiple messages in Entourage and never accidently open multiple copies.
    I am glad that Mail warns you if you are up above a certain number so it won't accidently open 50 messages in 50 windows, but it is still annoying. Is there any fix for this or is Mail just extra sensitive to message selection somehow? I swear it opens messages sometimes with a single click though. Any thoughts/ideas/solutions are appreciated.
    Thanks,
    -Lewis

    okay, i've just begun using Mail so perhaps it's just something that i am doing that i can learn to change, but if anyone else has experienced this and has any hints as to what i'm doing or what's going please let me know. it happens quite frequently and is very annoying. i gave mail a shot on another computer a couple of years ago and i don't remember if this happened or not, but this is the first time i've used it consistently.
    thanks!
    -lewis

  • Receive Pipeline In Decoder Stage to Extract Single Or Multiple Files From A Zipped Folder In Biztalk Server 2010

    Hi,
    I need help in developing a customized pipeline for the Decoder Stage.
    Requirement : Extract single or multiple files from a zipped folder with any format and extension (X12/EDIFACT/Flat/XML) and send to Disassemble stage for further action.
    Need Urgent help.
    Any suggestion or help is much appreciated.
    Thanks & Best Regards

    Hi Siddharth,
    Have look at article: BizTalk Server 2010: Processing Zip Message Having Multiple Type
    Files and http://tech-findings.blogspot.com/2013/10/custom-zipreceivepipeline-to-unzip.html
    Maheshkumar S Tiwari|User
    Page|Blog|BizTalk
    Server : Scheduling Orchestration using Trigger Message

Maybe you are looking for