Combining two VI and avoiding overlapping digital lines

I'm working on a VI which used to be two separate programs (top while loop and bottom while loop).  One program would run a stepper motor over time and pull an object to apply tension and read it through a load cell (top while loop).  The other program it used to move the motor rapidly in order to reset it's position back to a "default" (bottom loop).  I'm trying to get the functionality of both programs into one VI that I can control the stepper motor without having to switch programs (and mostly to have a "complete" program).  I'm not very skilled yet with the in's and out's of LabVIEW but I'll try my best to work with your suggestions! 
Thanks,
James
Attachments:
combinefiles.vi ‏656 KB

James,
I want to get some more information about your application.  From what I can understand, the top loop ran first and when that was completed you ran the bottom loop in your program to reset the values to default. Now you combined both VIs and want it to programatically perform the same action?Do you want your code to run in such a way that when you press a button, it 'switches' from one mode to the other? Before giving suggestions, I'd like to verify what it is your are trying to do in order to give a suggestion.
Stephanie O.
DIAdem Product Manager
National Instruments

Similar Messages

  • Can I combine two pdf files by using command lines?

    Hi
    I always need to combine two pdf files into one in my regular work
    Currently, I open one of them, press ctrl+shift+I,
    find another file and double click it.
    It works but not so efficient since I need to do
    this procedure many times everyday
    So I'm looking for a better solution
    Something like command lines,
    for example:
    acrobat.exe "combine" "doc1.pdf" "doc2.pdf"
    Does acrobat have these functions or not?
    Thx &
    Best Regards

    File > Combine

  • Combine Two Files and sent to webservice

    Hi all,
    I need to read two files and combine in XI and i need to send it to webservice.
    can anyone please tell me which way is the better.
    kind regards,
    Praveen

    hi
    i am reading two different file structures and i need to map it to webservice structure.
    i did all design and config steps including BPM also. i used fork step with two receivers and transformation step and send step.
    but in the mapping iam getting only first file message only.
    This is source message
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:Test_result_MT xmlns:ns1="http://lonmin.co.za/GetServeyData">
             <Details>
                <x>10</x>
                <y>aaa</y>
             </Details>
             <Details>
                <x>20</x>
                <y>bbb</y>
             </Details>
          </ns1:Test_result_MT>
       </ns0:Message1>
       <ns0:Message2>
          <ns1:Test_result_MT xmlns:ns1="http://lonmin.co.za/GetServeyData">
             <Details>
                <x>30</x>
                <y>ccc</y>
             </Details>
             <Details>
                <x>40</x>
                <y>ddd</y>
             </Details>
          </ns1:Test_result_MT>
       </ns0:Message2>
    </ns0:Messages>
    Target Messgae must be like this
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <ns1:Test_final_MT xmlns:ns1="http://lonmin.co.za/GetServeyData">
         <Details>
         <x>10</x>
         <y>aaa</y>
         </Details>
         <Details>
         <x>20</x>
         <y>bbb</y>
         </Details>
         <Details>
         <x>30</x>
         <y>ccc</y>
         </Details>
         <Details>
         <x>40</x>
         <y>ddd</y>
         </Details>
    </ns1:Test_final_MT></ns0:Message1></ns0:Messages>
    i am giving source and target message can any one please tell me which elements i must map to get this target structure.
    Edited by: Kiran Kumar on Dec 19, 2007 1:21 PM

  • Can combine two look and feel into new one?

    Hi,
    I want to change the JProgressBarUI of NimbusLAF on other LAF. I means how to put two different components each with different look and feel in single JFrame.Any way to get this. Help. Thankz.
    Edited by: user13383557 on Nov 22, 2010 12:07 AM

    How about reading the api doc and then message the appropriate method on the diverging component instance?
    It's not recommended, though, and wont survive dynamic LAF changes.
    CU
    Jeanette

  • Combine two resultset sidebyside in coulmn using mdx

    hi i am new to mdx,
    i want to combine two select statement resultset (side by side like union) using mdx query,please any body help me to solve this query
    first query:
     SELECT
    { [Last Year] }
    ON COLUMNS,
     { {[Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11],
    [Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16],
    [Location].[Location].&[9], [Location].[Location].&[18] },{[Location].[Location].[All]}}
    ON ROWS
    FROM [Cube1]
    WHERE ( [Measures].[Labour %] )
    here [Last Year] is a calculated set
    {STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-2) +"-11-01T00:00:00]"):
            (STRTOMEMBER("[Date].[Month].&["+ cstr(year(now())-1) +"-10-01T00:00:00]"))}
    2nd query:
    WITH MEMBER [Measures].[Budget ] AS IIF(avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),
                                            avg([Last Year],IIF(([Measures].[Budget]>0),[Measures].[Budget],null)),0.00),
    MEMBER [Measures].[YTD] AS IIF(avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null))<>null,
                                  avg([Last Year], IIF(([Measures].[Labour %]>0),[Measures].[Labour %],null)),0.00),
    FORMAT_STRING = "Standard",
    BACK_COLOR = CASE WHEN [YTD] = 0  THEN /*White*/16777215 /*White*/  
    WHEN [YTD] <= [Measures].[Budget ] THEN 65408
         WHEN [YTD]<= [Measures].[Budget ] +5 THEN 65535
         WHEN [YTD]> [Measures].[Budget ] +5 THEN 255
    END,
    VISIBLE = 1
    SELECT
    {  [Measures].[YTD], [Measures].[Budget ] }
    ON COLUMNS,
    { { [Location].[Location].&[7], [Location].[Location].&[12], [Location].[Location].&[11], [Location].[Location].&[19], [Location].[Location].&[17], [Location].[Location].&[16], [Location].[Location].&[9], [Location].[Location].&[18]
    },{[Location].[Location].[All]} }
    ON ROWS
    FROM [Cube1]
    here   ==> [Measures].[YTD], [Measures].[Budget ] are calculated member
    i want result like in
    coulmns===> ytd,budget,nov,dec,jan,feb.,,,,,,,,,,out
    rows ====> are only locations and total(average of all locations)
    please guide me to get solution like mdx query

    Hi Vsp,
    According to your description, you want to create a calculated member to combine two members, and then set it as Default member, right?
    In SQL Server Analysis Services, we can use the script below to create a calculated members.
    create member currentcube.[Date].[Day of Week].[weekend]
    as
    {[Date].[Day of Week].&[6],[Date].[Day of Week].&[7]
    Every attribute in a dimension in Microsoft SQL Server Analysis Services has a default member, which you can specify by using the
    DefaultMember property for an attribute. This setting is used to evaluate expressions if an attribute is not included in a query. Please refer to the link below to see the detail information about specify a default member.
    http://technet.microsoft.com/en-us/library/ms174822(v=sql.105).aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Combining two datasources

    Hi Experts,
    Can anyone tell me how to combine two datasources?
    How many datasources(max) can be combined to an infosource?is there any limit?
    What is the difference between combining two datasources and creating a generic datsources which has all the fields of the combined ones?
    Thanks in advance
    Regards
    Ganesh Kumar

    Hi Ganesh,
    As you have suggested one way of combining datasources,  is through infosource, and as far as the number of datasources that can be combined, there is no limit as such.
    We generally go for generic datasources when couldn't find any application specific datasource suitable to our requirement provided by sap.
    Technically speaking if you have two application specific datasources which you would like to combine, you can do it through the infosource; and if you dont have application specific datasources available and you were to create two generic datasources and combine them, then it would be logical to make one generic datasource with all fields in it.
    Hope it was clear..
    Regards,
    Habeeb.

  • Possible to combine two xml documents into a single query?

    In ASP, PHP, etc. if I wanted to combine two tables and
    filter by one =
    item, I would create a recordset combining the two on one
    common element =
    and have one recordset. Is that possible with xml documents
    and Spry =
    datasets?
    I have xml information sent to me 4 times a day from a
    weather service. =
    This happens automatically, but the two xml documents
    (current.xml and =
    forecast.xml) are set in stone by the service. However, if in
    my Spry =
    dataset, I could combine them so I could list the 15 cities
    in a master =
    region and have tabs for the current conditions and forecast
    which would =
    each access a separate xml document but needs to do that from
    the city =
    link on the left, that would work great.
    Can I do this as I would be able to if I had a database with
    different =
    tables?
    Thanks!
    Nancy

    Hi Kin:
    They are really static xml files that are placed in a folder
    directly by =
    the weather service. The files in question are current.xml
    and =
    forecast.xml.
    And there is not one per city .. but just one of each. the
    location =
    node in current.xml and the citycode node in forecast.xml
    contain the =
    same information.
    If I were doing this in a recordset with a database, I would
    write =
    something like SELECT whatever from current, forecast WHERE =
    current.location =3D forecast.citycode AND current.location
    =3D variable =
    (which would be what is clicked on).
    This sets up a master/detail arrangement for the first one
    that works =
    fine. Click on the city code (which I have to write something
    to say If =
    location =3D FAT, document.write "Fresno" and so on) and the
    rest of the =
    current information displays fine on the right side of the
    page. Now I =
    have to marry that to the forecast.xml file so that when
    citycode =3D =
    FAT, the five day information for Fresno shows up .. and so
    on. I was =
    planning to use Spry tabs or whatever to show the data.
    <!--
    var dsCurrent =3D new Spry.Data.XMLDataSet("current.xml", =
    "weather/current");
    //-->
    </script>
    </head>
    <body>=20
    <div class=3D"MasterDetail">
    <div spry:region=3D"dsCurrent"
    class=3D"MasterContainer">
    <div class=3D"MasterColumn" spry:repeat=3D"dsCurrent" =
    spry:setrow=3D"dsCurrent" spry:hover=3D"MasterColumnHover" =
    spry:select=3D"MasterColumnSelected">{location}</div>
    </div>
    <div spry:detailregion=3D"dsCurrent"
    class=3D"DetailContainer">
    <div class=3D"DetailColumn">{phrase}</div>
    <div class=3D"DetailColumn">{temp}</div>
    <div class=3D"DetailColumn">{temp/@units}</div>
    <div class=3D"DetailColumn">{aptemp}</div>
    <div class=3D"DetailColumn">{aptemp/@unit}</div>
    <div class=3D"DetailColumn">{wndchl}</div>
    <div class=3D"DetailColumn">{wndchl/@unit}</div>
    <div class=3D"DetailColumn">{rhumid}</div>
    <div class=3D"DetailColumn">{rhumid/@unit}</div>
    <div class=3D"DetailColumn">{wind_dir}</div>
    <div class=3D"DetailColumn">{windspeed}</div>
    <div
    class=3D"DetailColumn">{windspeed/@unit}</div>
    <div class=3D"DetailColumn">{pres}</div>
    <div class=3D"DetailColumn">{pres/@unit}</div>
    <div class=3D"DetailColumn">{vis}</div>
    <div class=3D"DetailColumn">{vis/@unit}</div>
    <div class=3D"DetailColumn">{icon}</div>
    </div>
    Arnout gave me some suggestions .. but so far, I haven't
    gotten either =
    of them to work. Also I am trying to get some ideas from spry
    Samples =
    from the Spry home page/samples area, but again .. not yet.
    Thanks,
    Nancy
    "kinblas" <[email protected]> wrote in
    message =
    news:[email protected]...
    >I don't think you need to combine them just so they can
    render in a =
    tabbed=20
    > widget. We're still missing a couple of key pieces of
    information. =
    What does=20
    > the data that is used in the master region look like?
    Are what you =
    refer to as=20
    > current.xml and forecast.xml really static files? Or are
    they =
    dynamically=20
    > generated by a server side script (php/cf/etc)? There is
    one current =
    and=20
    > forecast xml per city right?
    >=20
    > I ask these questions because you may be able to simply
    set up a =
    master detail=20
    > relationship between 3 data sets and just use those
    within a region(s) =
    that=20
    > build up the tab widget. Assuming you were getting the
    list of cities =
    from a=20
    > 3rd source, you could set up something like this:
    >=20
    >=20
    > var dsCities =3D new Spry.Data.XMLDataSet("cities.xml",
    =
    "/cities/city");
    > var dsCurrent =3D new=20
    >
    Spry.Data.XMLDataSet("current.php?location=3D{dsCities::name}",=20
    > "/weather/current");
    > var dsForecast =3D new=20
    >
    Spry.Data.XMLDataSet("forecast.php?citycode=3D{dsCities::name}",=20
    > "/weather/forecast/day");
    >=20
    >=20
    > ...
    >=20
    >=20
    > <div id=3D"TabbedPanels1" class=3D"TabbedPanels">
    > <ul class=3D"TabbedPanelsTabGroup">
    >
    Current</li>
    >
    Forecast</li>
    >
    > <div class=3D"TabbedPanelsContentGroup">
    > <div class=3D"TabbedPanelsContent"
    spry:region=3D"dsCurrent">
    > {temp}{temp/@unit}
    > </div>
    > <div class=3D"TabbedPanelsContent"
    spry:region=3D"dsForecast">
    >
    > <li spry:repeat=3D"dsForecast">{name}<br
    />High: =
    {high}{high/@unit}<br=20
    > />Low: {low}{low/@unit}</li>
    >
    > </div>
    > </div>
    > </div>
    >=20
    >=20
    >=20
    > --=3D=3D Kin =3D=3D--
    >

  • PCI 6014 and BNC 2110 digital output

    Hi,
    I try to use PCI-6014 through BNC-2110 to giving on a digital output 5V.
    Please give advice or examples.
    Thanks

    First, there's the Getting Started with DAQmx. Then on the Measurement I/O>DAQmx palette is the DAQ Assistant. Also, open the example finder and from the main tab, go to Hardware Input & Output>DAQmx>Digital Generation. The simplest examples are Write to Digital Port and Write to Digital Line.

  • Trying to combine two 'lines' to make a 'shape'?

    I've been trying for hours to combine two curves I drew with the pencil tool into a shape that I can fill with a color or gradient:
    http://img199.imageshack.us/img199/4155/flametests01.png
    The top row has the two lines (stroked).   When I move them together, I get a pleasing 'flame' shape that I want to use in a logo.
    The bottom row shows what happens when the two 'lines' are 'filled', and what happens when the flame is 'filled'.   I've tried all manor of grouping, merging, combining....I've lost track at this point....
    I think part of my problem is that I assume the pencil tool would draw lines (or perhaps 'paths' is more accurate?)--but it seems to be drawing 'shapes'.
    I've tried using the pen tool, but the curves are never as smooth as the ones I drew 'freehand'...
    What should I have done / be doing differently?

    Just drag-select the upper two points with the Direct Select tool and use the KBSC CmdOpt-Shift-J to unite the lines. Do the same at the bottom to complete the shape.

  • Tutorial myRIO Stepper with 2 digital lines (step and direction)

    Hey NI Community!
    I'm new here and an academical employee.
    I want to program / control a stepper with myRIO, this is needed for a research project at my institute to build a prototype.
    The stepper is driven by a digital driver which have one digital line for the steps and one for the direction (see attached files).
    Now I want to know, if there is a tutorial or a example for this because I have no Labview, FPGA and myRIO skills at the moment. 
    THANKS!

    Hi MasterChief,
    There is no tutorial how to control a stepper with myRIO. But there is an example shipped with the myRIO that is using a DI task. You can find this example in the LabVIEW example library. Go to Help >> Find examples in an open LabVIEW window. In the dialog open the folder Modules and Toolkits >> myRIO. There is an example called Edge detection and Debouncing.
    The example contins a RT Main.vi. In this VI there is an express VI used. This express VI should be used in your application, too. You only hav to reconfigure the Digital Output instead of Digital Input.
    For your application you will need to control two tasks witht the VI. One for the direction and one that outputs the pulse for the stepper.
    Regards,
    Melanie

  • Reading digital line and local variable

    I am using digital lines in my program to start and stop "Flat Sequence Structures"
    like time measurement ( 4 sequence, start and stop time with "Tick Count" )
    Is it good behaviour if i use once "Read from Digital Line.vi" and other starts and stops etc. with Local variables?
    Or can i just use "Read from Digital Line.vi" many times in my VI? (same line)

    Most experienced LV programmers try to avoid both sequence structures and local (and global) variables. The state machine architecture is often preferred. Look at the examples with LV and search for "State machine" on this site.
    I would probably use one read line or read port VI in a loop and pass the data to other, independent loops for processing (the timing) via queues.
    Lynn

  • PO Line Item wise gross value for combination of WBS and Material Group

    Hello,
    Our requirement is to get report for PO Line Item wise gross value for combination of WBS and Material Group. Standard report ME2J gives net price but not gross value for Material Line items. Please let me know if any standard report( or ME2J) will suffice this requirement.
    Regards,
    Milind Dumbre

    Dear Milind
    No standard report available to get the PO Line Item wise gross value for combination of WBS and Material Group. Please go for development by taking reference ME2J.
    Warm regards
    Ramakrishna

  • PCI 6602:How can I use the digital lines of the board and in the same time to generate pulse train using a counter?

    Hello!
    My problem appeared when I tried to update my code from Traditional NI-DAQ Legacy to DAQmx.
    I am using 2 counters (counter 5 and counter 7)  from PCI-6602, to generate pulse train, and also the Digital I/O lines of the port 0 (the lines form 0 to 7). What I do in my application is that I am starting to generate the pulse train on the output of the 2 counters, and after that I am playing with the state of the digital lines.
    In traditional there was no problem using the counters and the digital lines in the same time, everything was going perfectly, but in DAQmx this is not possible.
    What happens: I start to generate pulse train on the output of the counters,  no errors encountered, but when I try to modify the state of one line of the digital port the generation of the pulse train is stopped. This is happening when I start the task associated to the digital port.
    My question is: it is possible to create a channel on the digital lines without altered the channels created for the counters?
    Another thing what I manage to see using the  "Measurement & Automation Explorer" and Test panels for PCI-6602, basically is the same thing, I generate pulse train on the output of the counter 7 and try to start a task on the digital line, but I get one error :
    "Error -200022 occurred at Test Panel
    Possible Reason(s):
    Measurements: Resource requested by this task has already been reserved by a different task.
    Device: Dev4
    Terminal: PFI8"
    Instead if I use the counter 0 or counter 1 to generate pulse train I don't encounter the same problem.
    Which resources are used by the counters 2 to 7 from the PCI-6602 board and the counters 0 and 1 do not use?
    Thank in advance for any replies!
    Ciprian
    Solved!
    Go to Solution.

    Hello Jordan, thank you for your reply.
    I am sorry but I can not see or run your example, I don't use LabView, I use Visual C++ for developing.
    Here is the code for generating the pulse train:
    GeneratePulseTrain(unsigned long ulCount1, unsigned long ulCount2)
        short nStatus = 0;
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        nStatus = DAQmxCreateCOPulseChanTicks (m_taskHandle, "Dev4/count5", "", NULL, DAQmx_Val_Low, 0.0, ulCount1,ulCount2);
        if( bTriggerMode == true) // if hardware trigger is enabled
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_ArmStartTrig_Type, DAQmx_Val_DigEdge);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Edge, DAQmx_Val_Rising);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Src,"Dev4/PFI17" );
        //set the internal timebase
        nStatus = DAQmxSetCOCtrTimebaseSrc(m_taskHandle,"Dev4/count5","20MHzTimeBase" );
        nStatus = DAQmxStartTask(m_taskHandle);
        return nStatus;
    And the code where I try to set the digital line:
    SetChannelState(short nState)
        short nStatus = 0;
        uInt8 wrtBuf0[1]={0};
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        // Configure line as output 
        nStatus = DAQmxCreateDOChan (m_taskHandle, "Dev4/port0/line0", "", DAQmx_Val_ChanPerLine);
        nStatus = DAQmxStartTask(m_taskHandle);
        wrtBuf0[0] = nState;
        nStatus =DAQmxWriteDigitalLines (m_taskHandle, 1, 0, 0, DAQmx_Val_GroupByScanNumber , wrtBuf0, NULL, NULL);
        nStatus = DAQmxWaitUntilTaskDone(m_taskHandle,10);
        nStatus = DAQmxStopTask(m_taskHandle);
        nStatus = DAQmxClearTask(m_taskHandle);
        m_taskHandle = 0;
        return nStatus;      

  • Is it possible to combine two existing iTune accounts and then cancelling one? Many thanks.

    I am trying to combine two accounts that I have on iTunes (created separately over the years) so as to then delete/cancel one to only have one active account (with all of my combined purchases, etc. on this combined account).
    Is this possible, or is there another way of transfering purchases to one of the accounts and then just deleting the then "empty" one?
    Thanks for any advice / input

    method one from the following support article should do the trick: How to use multiple iPods, iPads, or iPhones with one computer.

  • I have two accounts and for both accounts I use the same emails. I cannot verify my email on my main account because of this. Help? Can I just cancel my other account to avoid confusion?

    I have two accounts and for both accounts I use the same email. I cannot verify my email on my main account because of this. Help? Can I just cancel my other account to avoid confusion? I am totally stuck now.

    By the sounds of it you have linked Email Accounts, if so this means that you will both recieve the majority of the same Emails, and if you do and you read them on your account (which is linked with your husbands) then they will appear to read on the both of them because they are linked. With the majority of Email providers these days they're Emails are (simplified) in the cloud you could say, meaning that if you read or delete shared Emails then it will do the same on both accounts rather than just the yours.
    I hope all that made sense, sorry that I couldn't be of anymore assistance.. If you havent already try googling your problem - you may find some answers on there

Maybe you are looking for

  • Apps crashing in 10.6.6?  (So far, Evernote and Date & Time prefs)

    I'm having trouble with certain apps crashing. So far, I've noticed Evernote (when trying to open the prefs) and Date & Time. The D&T is showing up in my menu bar as "2 10:04" right now. Was checking to see why the 2 is there. I've run disk permissio

  • I can not install a new HD to my m400-s5032

    Ok, Finally, I ran out space on my old 100GB HD.  I bough a WD 500GB HD and installed.  I can see it on my Bios but the windows 7 bootable disk can not.  What I'm doing wrong?  Do I need a driver to get this going?  HELP PLEASE !!!!

  • Win95 support for Personal Oracle8i?

    Does anybody know if the version of Personal Oracle 8i for Win98 will work under Win95? TIA

  • Using Message Selector w/JMSCorrelationID causes auto-commit

    I'm using the following code to create a session with transactions enabled: Session session = connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); String messageSelector = "JMSCorrelationID = 'myid'"; QueueReceiver receiver = session.create

  • PRIMARY KEY PARTITIONED INDEXES 생성방법 (ORA-2429, ORA-1408)

    제품 : ORACLE SERVER 작성날짜 : 2004-08-13 PRIMARY KEY PARTITIONED INDEXES 생성방법 (ORA-2429, ORA-1408) ============================================================ PURPOSE primary key partitioned indexes 를 생성하는 방법을 알아 봅니다. SCOPE Oracle Partitioning Option은 8