How to control many VI's in one module ?

hi
i have principle question. i work with DAQ board, that acquire digital infirmation ("1" or "0"),
 in addition, i need to control motor through rs-232 cable. 
i want do acquire  data "non-stop", and show in leds (on the control panel) the actual state ("1" or "0").
simultaneously, i want to control (=send/red data) the motor.
how i need build this program (if it possible) ?
thank's
Message Edited by pro111 on 12-03-2006 11:33 AM
Message Edited by pro111 on 12-03-2006 11:33 AM

It's allowed but it's pretty bad style to use gloabal variables and a sequence structure alone or together. To run two functions in parallel, the simplest mcthod is to have two different while loops. As long as there is no data dependendy (wires connecting the output of one to the input of the other) they will be completely independent. If you need to pass data from one to the other, one good technique is a queue. Also, instead of a sequence structure, you should look at using state machine. A sequence structure doesn't give you any flexibility. There are shipping examples and design templates avialable for both queues and state machines.
Since you didn't attach your program, there's no way of telling why you are seeing a delay. At the very least, attach an image of the block diagram.

Similar Messages

  • How to merge many XML files into one?

    Hi: I got a small project to combine many XML files into one and convert the combined XML file in Excel using AppleScript. My XML files look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
    </Metadataobject>
    and like this...
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
    </Metadataobject>
    I get many XML files like this. And I want them to be combined and shown like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <job id="1">
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
        </job>
        <job id="1">
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
        </job>
    </Metadataobject>
    And finally the combined XML file converts in Excel sheet with column headings "Job ID", "From", "Job Name" and so on...
    Or there is another best way to get the same result...
    Thanks

    That is just an intermediary state to get to the excel version. Actually I get many small XML files (as shown above) from client and I want them all combined in an excel sheet with common column headings... like this...
    from
    jobname
      pages
    priority
    timezone
    year
    month
    day
    hour
    id
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    1
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    2
    Thanks for your response.

  • How to control two different processes with one DAQ output board

    Hi! I posted this in the Signal Generators forum, but I'm reposting here in case someone on this board has suggestions for a way to get around my problem programmatically (ie. within LabVIEW). Thank you for any help you can provide.
    Patrick
    I have a PXI-6722 8-channel, 13-bit analog output board, and with this I want to independently control both the temperature (thermometer excitation/heater control) and magnetic field in my experiment. Unfortunately, it appears that I cannot do both simultaneously, which is totally unacceptable for my application.
    Currently I'm using separate VI's for field and temperature control. This is the start of the problem, because in DAQmx you can't have 2 output tasks on the same card at the same time. In order to remedy this situation, I used MAX to create a global task containing all 8 13-bit analog outputs. However, it now appears that each time I do a write operation on this task (from whichever VI) I must write to all of the task channels, rather than just the channels I want to change. This would be fine for the temperature controls as they are of the type "set an output voltage value and hold it until told differently," so I could re-write the currently held values for channels that are not being changed. Magnetic field control will not work in this way, because we need to do very smooth field sweeps which require an analog waveform to be sent and sampled at a high rate (so that the steps are as small as possible). So if, for example, a thermometer's excitation voltage or a heater's power need to be changed during a field sweep (as is often necessary to maintain a constant temperature, via PID), then the sweep will be disrupted, potentially causing a dangerous magnet quench.
    Does anyone have any ideas on how I could make this work? It seems very wasteful to buy a second output board when I still have lots of free channels on the first.
    Thanks,
    Patrick

    I'd probably create a third process that just updates all output values on the card whenever necessary.
    One way is to send messages via queues from the temperature and magnetic field control routines to the third process. The third process doesn't do anything unless it gets a message from one of the two other processes. The message should contain the channel task ID to change along with the new value. Use the LabVIEW queue VI's, using a type definition to specify the message type either when you create the queue or use the variant VI's. Once it gets a message, it updates the changed channels, not modifying the others (use a shift register to store an array with the current set of output values).
    Hope this helps.
    Jason

  • How to concatenate many rows to be one row?

    Hi,
    How can I do if I concatenate two rows or many rows become one row in the same column with different values (CHAR or VARCHAR2). It's possible to do that?
    Ex:
    Column A
    ABCD
    EFGH
    to become
    Column A
    ABCDEFGH....
    Anybody can help me, please...
    I will very appreciated.
    Thanks,
    Leny

    I'm not sure if SQL Plus supports this feature. But programmatically it is possible if you use oracle procedure. Also if you're using some front end application (like VB, ASP etc) where you need the concatenated result then you can easily concatenate all rows under a loop on Recordset.

  • Control many mac minis with one magic mouse

    Hello,
    I have installation with four macminis mounted to ceiling,
    I want to control and setup each of them without buying four magic mouses and keyboards.
    Is it possible to use only one magic mouse and magic keyboard to control all macminis?
    If not, is there any good solution for that?
    Thank you.

    Sure, turn on screem sharing under System Preferences -> Sharing. Then, connect to each of them using finder and share screen. So, one KB, one mouse, many minis. Monitor would be connected to the same machine that the KB and MOUSE are connected to.

  • How to enter many receiving lines for one PO Line

    Hi,
    we are working in oracle applications 11i
    From Oracle Inventory Responsibility->Transactions->Receiving: Enter Purchase Order Number: Receipts Window:
    we have a line with item quantity of 100 (for example). I need to receive that item on many lines (depending on our descriptive flexfield inputs).
    how do you suggest I enter those receiving lines for the PO LINE? I can see that I cannot I enter lines in that window so I am not sure If I can use dataload.
    I need a solution that can be applied to receiving transactions window too.
    Any ideas please?

    If you enter a partial Qty and save it, then it will be a seperate line on the receipt.
    Ex: Rcpt 120 first time rcv 10, next enter the same info and then use Add to receipt button and enter rcpt number i.e. 120 and enter the next Qty say 30.
    Now if you query view Receving Txns form for rcpt 120 you will see 10,30 on separate lines. If you want suggestions on how much to enter on each line is going to be challenging (may be using the note to reciver can help)

  • How to connect many devices with only one FW800 port in iMac?

    Hi,
    I am upgrading to a new Intel iMac from a 2004 vintage Dual2.0GHz PowerMac. I currently have 8x d2 Quadra drives chained by FW800, and 2x Iomega drives connected vis FW400 hub which also connects HD cams.
    My questions is that with only one FW800 port in iMac, I think my devices connectivity is the following?
    (1) Get a FW 800 hub (I can only find 2 port ones at the Apple store and BestBuy)
    (2) Connect the d2 Quadras to one port of the FW800 hub
    (3) Get a FW 800 to FW 400 cable
    (4) Connect my 6 port FW400 hub to the 2nd port of the FW800 hub
    Thanks for reviewing this solution, and I would also appreciate other suggestions or hear about your experiences if you have a similar set-up.
    Will

    In addition to your listed considerations, you should consider the following.
    Many storage needs do not required FireWire 800 speed. For example, USB 2.0 works fine for your Time Machine backup drive. If you are just storing user data such as your iPhoto or iTunes media files, USB 2.0 is more than fast enough. So, as much as possible, if any of those external drives have USB 2.0 connections and the data storage does not need FireWire 800 speed, offload as much as possible to USB 2.0. I used to be a +FireWire snob+, but since getting an Intel iMac, I find that USB 2.0 works quite well for most data storage purposes.
    There are new hard drives that are power efficient and as large as 2TB. Consolidate your data storage needs onto a smaller number of very large drives, partitioned as needed. This will make your setup more reliable (smaller number drives), and save reduce power consumption. If any of your current externals are SATA, you can probably replace the existing drive with an extra large one.
    So, I think you setup should be, extra large FireWire 800 drive connected to the FireWire 800 port directly. Using a 9-pin to 6-pin cable, connect the FireWire 400 hub. Connect any non-storage FireWire 400 devices there. Do some data transfer testing to make sure having the 400 hub there on the chain does not cause the 800 connection to slow down.
    Connect other drives as needed using USB 2.0, existing or new. Retire the smaller of your external drives.

  • How to create many objects listening for one event

    I'm experimenting with the EventDispatcher class and I have a
    test class working. I want to use a loop to create a variety of
    movie clips that all listen for an event that gets dispatched every
    half a second. I have the event dispatching properly. My problem is
    that when creating the objects, the temporary variable I use to
    hold each created object has a life that extends beyond the loop in
    which it is instantiated. Rather than all five created objects
    changing color, only the last one changes color (see the code
    below--it lives on the first frame of an FLA file).
    This is not entirely surprising when I look at the code --
    'this' refers to the global scope and 'square' refers to the last
    created object that it pointed to. Here's the resulting trace:
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    How can I modify this code so that each square object changes
    its own color?

    graphics.clear in the context of that function handler in my
    code would refer not to the squares but to the global scope,
    wouldn't it? In which case you'd be clearing all the graphics from
    your top level movie. I tried changing 'square.graphics' to just
    'graphics' in my handler and my squares just remained the original
    steady black.
    Your code doesn't use a loop and therefore isn't re-using a
    variable. You've escaped my 'logical errors' through brute force.
    (BTW, I think my code would work in AS2 if I used the old-school
    draw methods). Suppose you had to create 100 objects? Would you
    want to manually instantiate each one, typing that function over
    and over again? You'd have 500 lines of highly redundant code!
    Maybe try your example using a loop instead? I think you'll
    find it's pretty tough to sneak any vars like 'i' or 'square' from
    the global scope into the handler--the handler refers to the
    living, breathing variable rather than it's value at the time the
    handler was instantiated. Furthermore, you can't sneak any
    information about the square into your handler via the event object
    because the event object is created in a totally different place.

  • How to map many finished product in one bom

    Sir,
    i hav one raw material sheet in which i will cut number of finished products.how i map in bom.all finished product has cut in differnt quantity.

    Hi
    Actually this is purely based on the client reqmt.
    If they need to maintian the diff bom for all the product . you should need to maintained. even though you use same raw material for all the  products.with diff qty and if they need to calculate the costing inoccur for the each product
    or
    you can use as co -porduct as forum member told.

  • How to extract many procedures data into one procedure.

    Hi all,
    I have about 16 procedures which extracts a csv files every time we run
    Exec package.procedure1;
    Exec package.procedure2;
    Exec package.procedure3;
    I wish to stop doing this tedious operation(-_-)
    How to put all these procedures in an EXTRACT_ALL procedure.
    I tried something like this.But I think i am getting it all wrong.
    PROCEDURE extract_all_states
         IS
          outfile     UTL_FILE.file_type;
             curr_curs1   varchar2(4000);
             curr_curs2   varchar2(4000);
         BEGIN
         extract_Penang (curr_curs1);
                    extract_Selangor (curr_curs2);
         UTL_FILE.fclose (outfile);
       EXCEPTION
          WHEN UTL_FILE.invalid_mode
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Invalid Mode Parameter' || '  -  ' || (SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.invalid_path
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Invalid File Location' || '  -  ' ||(SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.invalid_filehandle
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Invalid Filehandle' || '  -  ' ||(SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.invalid_operation
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Invalid Operation' || '  -  ' || (SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.read_error
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Read Error' || '  -  ' || (SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.internal_error
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Internal Error' || '  -  ' || (SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.charsetmismatch
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message :=
                   'Opened With FOPEN_NCHAR But Later I/O Inconsistent'
                || '  -  '
                || SQLERRM;
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.file_open
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'File Already Opened' || '  -  ' ||(SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.invalid_maxlinesize
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Line Size Exceeds 32K' || '  -  ' ||(SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.invalid_filename
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Invalid File Name' || '  -  ' ||(SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.access_denied
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'File Access Denied By' || '  -  ' ||(SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN UTL_FILE.invalid_offset
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'FSEEK Param Less Than 0' || '  -  ' || (SQLERRM);
             RAISE gv_exp_generate_error;
          WHEN OTHERS
          THEN
             UTL_FILE.fclose (outfile);
             gv_error_message := 'Unknown UTL_FILE Error' || '  -  ' || (SQLERRM);
             RAISE gv_exp_generate_error;     
         END extract_all_states; 
       END states_pkg;Error(321,3): PLS-00306: wrong number or types of arguments in call to 'EXTRACT_PENANG'
    Error(321,3): PLS-00306: wrong number or types of arguments in call to 'EXTRACT_SELANGOR'
    null

    Why is it that your "tedious" manual operation shows no parameters to the procedures while your extract_all procedure has parameters?
    You need to call each of the individual procedures in exactly the same way as you do when you execute them individually at the command line. In your extract_all procedure, you are clearly not doing so, hence the "wrong number or types of arguments in call to"
    John

  • How to resolve many-to-many join by 2 one-to-many joins

    Hi,
       I was asked many times how to resolve many to many relationship between two tables. I read to use 2 one -to- many relationships to resolve this. Can some expalin me when many to many relationship occurs between two tables and how to reslove them with practicle examples. Is there any article on this?
    Regards,
    Nanda Kishore

    Hi,
    Please check below link.
    http://www.forumtopics.com/busobj/viewtopic.php?p=859029&sid=20d79e3df07b0d8b41aadfbd902bb6b2
    http://blog.oaktonsoftware.com/2011/04/bridge-tables-and-many-to-many.html
    Thanks,
    Amit

  • How can I use the button in one panel to control the other panel's appearing and disappearing?

    How can I use the button in one panel to control the other panel's
    appearing and disappearing? What I want is when I push the button on
    one button . another panel appears to display something and when I
    push it again, that the second panel disappears.

    > How can I use the button in one panel to control the other panel's
    > appearing and disappearing? What I want is when I push the button on
    > one button . another panel appears to display something and when I
    > push it again, that the second panel disappears.
    >
    You want to use a combination of three features, a button on the panel,
    code to notice value changes using either polling in a state machine of
    some sort or an event structure, and a VI Server property node to set
    the Visible property of the VI being opened and closed.
    The button exists on the controlling panel. The code to notice value
    changes is probably on the controlling panel's diagram, and this diagram
    sets the Visible property node of a VI class property node to FALSE or
    TRUE to show or
    hide the panel. To get the VI reference to wire to the
    property node, you probably want to use the Open VI Reference node with
    the VI name.
    Greg McKaskle

  • How many icloud accounts can one apple id have

    How many iCloud accounts can one apple id have?

    Welcome to the Apple Community.
    Whenever you use your Apple ID to sign into iCloud it's always the same account so to speak.

  • When ordering enlarged photos from iPhoto, must I purchase them one at a time and pay a shipping fee for each and very one of them.  Sort of a ripoff but I can't figure how to purchase many and pay one shipping fee.

    When ordering enlarged photos from iPhoto, must I purchase them one at a time and pay a shipping fee for each and very one of them.  Sort of a ripoff but I can't figure how to purchase many and pay one shipping fee.

    You may have better luck posting in the iPhoto forum if no one on this forum is able to assist. I'm sure you are doing something wrong though.

  • How to use many submit buttons in an one html form

    I'm doing a simple program to insert, edit, delete data from a web page to an database
    but the problem is that in an html form , you are allowed to put only 1 submit button.
    I heard that you can take the action of many buttons, for a one form using java script
    if anyone have a better idea or else have this simple java script, please help me
    Thank you very much

    Give the buttons an unique name.
    In the servlet just check if the button is pressed or not by determining if HttpServletRequest#getParameter() doesn't return null for the button name.There are a couple of "gotchas" when using this technique of dispatching with certain html controls. Most of them browser related.
    If you are using <input type="image" name="myButton"> as a submit button, be aware that Internet Explorer will submit the parameters "myButton.x" and "myButton.y" giving the x,y co-ordinates of where you clicked on the button. And won't submit any other value. So calling request.getParameter("myButton") would return null. You have to test for request.getParameter("myButton.x");
    If you are using <input type="button" name="myButton"> with Internet Explorer all of the buttons are deemed "successful". So calling request.getParameter("myButton") will never return null.
    At least thats the way it works in IE6. And thats what I'm stuck with at work right now, so thats what gets used. It may be fixed in later versions, but I don't have any info on that.
    Cheers,
    evnafets

Maybe you are looking for