Alter program execution structure based on input file

I have a program that takes some parameters from an input file then runs a visual acquisition, using IMAQ, controlling some other hardware at the same time.  The parameters control the duration of various steps in this process. 
There is a stacked sequence structure to control reading in the input file, initialisation of the hardware and then a while loop on the final frame to do the actual acquisition.
The user of the program would now like the capability of having multiple sets of acquisition within the same run, possibly with different duration parameters.  This would mean various iterations of the final while loop, based upon the parameters in the input file.  There might be 5 acquisition sets on one occasion, 3 on another etc., within one run of the program.
The VI structure already seems a little baroque and I don't want to make it even more complicated.
I would welcome any advice as to the best way to proceed, as I'm very much a LabView novice.
Solved!
Go to Solution.

Dear Verdurin
With reference to Cory K's earlier post the most practical and efficient method to achieve acquistion would indeed be to use a Standard State Machine VI sequence structure. This structure executes set code (your own code) and determines which state to transition to. I agree with Cory K's 3 states within the sequence. Using the iterations loop you can define how many iterations of each acquistion you require. In LV, click File > New > From Template > Frameworks > Design Patterns > Standard State Machine. This automatically creates the VI for you to use where you can create the 3 states required.
Within the 3 states input your code into the relevant states to achieve acquistion. Use timing to achieve different duration parameters within the case structure. After you have read from the input file, select the next state as initialisation, then after that is complete, select the next state as acquistion. Repeat this loop as many time as you need for each acquistion.
I hope this clarifys your question. If you have any problems please do not hesitate to contact me and thanks for using the NI forums.
Kind regards
David
Applications Engineer
National Instruments UK
Many thanks for using the NI forums and I look forward to your reply.
Kind regards
David
Applications Engineer
National Instruments UK

Similar Messages

  • Structure of the input file for RMDATIND (standard material update program)

    Hi all !
    I need to find the structure of the input file used by the RMDATIND standard program. Is there only one structure for this file ? what should it contains ?
    Thanks a lot
    Regards,
    --Yohann

    Hi Yohann,
    Check this link...
    [RMDATIND Document|http://www.iconet-ltd.co.uk/mm.doc]
    Hope this would solve your issue.
    Regards
    Narin Nandivada

  • Structure of an input file?

    Hi All,
    can any one tell me wat is the structure of an input file for the shipment cost price upload?

    Hi,
       Go to LSMW and enter the project - sub project details and click on "Object Overview" as shown below:
       Select "List" in the pop up. Now, system will show the fields in the required sequence.
    Regards,
    AKPT

  • How to overcome the standard program check that changes my input file data?

    Hi
    when we r uploading PO thru bapi_po_create1, we give tax codes in the input file...but when the code gets into this MM06EFKO_PREISFINDUNG include of SAPLMEPO, there is a logic that changes the tax code (ekpo-mwskz = tkomv-mwsk1) and hence it gets reflected in the PO created...is there any way where i can by pass this one for the POs that i create thru my prog...pl shed some light on this
    Sathish R

    enter the program name in the SE38 editor
    click on copy button
    then it will ask you for the new name
    when ever you click on the copy transfer buton
    then it will raise a pop and saying that what ever you want from the program like
    1) INCLUDES
    2)SCREENS
    3)USER INTERFACES
    4)VARIANTS
    5) DOCUMANTATION
    ETC..
    hat ever you clcik on that check box
    thats all
    rewar dif usefull

  • Based on input file i need to update default values to some columns of database table using bulk copy process

    Hi Team,
    Am using BULK INSERT Format file option to load data into table from .txt file here am facing an issue i.e ibased on input file i need to insert default values to some columns of table so we can not declare it on table level, Can we give default values in
    format file ? if we can give how it is ? or Any alternate possibilities to this scenario instead of BULK INSERT ?
    Thanks,
    Sudhakar

    Thanks for your response, here i don't have any rights to change table structure the table is created by different team, my work is to load data from file to table. Is there any chance to supply default values by*XML* format file instead of *.fmt* file
    please let me know the possibility.
    Again, no. If you want to supply default values that are not present in DEFAULT constraints in the table definition, you will need to write your own code. There are plentyfull of options, and I have mentioned some already.
    Here are some more:
    *  Table-valued parameters, see here for examples:
    http://www.sommarskog.se/arrays-in-sql-2008.html
    *  Use BULK INSERT to load data to a staging table, and then apply the default values when you copy from staging to target.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to find groups in domain based on input file of groups

    Hi,
    I want to find if groups exist in the domain based on a list of groups in a text file as follows.  My Get-AdGroup doesn't work, so Im looking for suggestions.
    $MyGroups = Get-Content -path c:\MyGroups.txt
    Foreach ($Group in $MyGroups)
                Get-Adgroup -filter 'Name -like "$Group"' -SearchBase "DC=MyDomain,DC=Com" -SearchScope SubTree
    Thanks in advance.
    Thanks for your help! SdeDot

    One additional suggestion - you need wildcards too, if you really want to use -like:
    Get-ADGroup -Filter "Name -like '*$group*'"
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Opening file to automatica​lly open and run program with input file

    My program has the ability to save and open a text file with a custom extension.  How do I make the system in which the program is being installed to recognize this file to open the program, AND how to I gather the input file in my program and load it.
    Thanks
    Solved!
    Go to Solution.

    Ok I have found on a different thread how to setup/register the file path association in the classes root.  What I don't understand is how my program will know what the input file is.  For example, the reg setting is C:/.../MyProgram.exe %1
    When my program loads, is the %1 in the argc/argv part of the main thread? And if so, how do I debug/test this?
    Thanks

  • Batch Input file is not created for the program RFUMSV00 (VAT)

    Dear All,
    Yesterday we run the program RFUMSV00 for posting VAT entries. But program dosnt created any batch input file. We tried to create the file once again by running the program, but there were no data;s on it.
    I can able to view the spool which is created in SM37. It is in the finished status.
    Can you please advice, do I need to delete any table entry for this like BSET etc....or how I can create the batch file again by ruuning the program. I dont want to post manually through FB41 transaction.
    Is there any Standard SAP solution for this.
    Please let me know anybody need any clarification about this question.
    Thanks in advance.
    Regards,
    Raja.A
    Edited by: Raja.A on Dec 1, 2009 12:47 PM

    Hi,
    Check the status of the batch in SM35 transaction.
    if the batch is locked by mistake or any other error, now you can release it and aslo you can process again.
    To Release -Shift+F4.
    Also you can analyse the job status through F2 button.
    Bye

  • File adapter input file format

    Here the communication scenario is as follows: read a file and send a message via XI to an inbound interface.
    A file adapter service has been defined. Message protocol 'file content conversion' has been chosen for the file adapter service. Next the file format has to be defined in communiction channel settings.
    Is it possible to define the input record structure in the file to be red itself?
    The first line will list all column names. The data records will follow in line two up till end of file.
    Regards
    Klaus

    Now I can add some more information to the facts.
    In XI 2.0 the adapter engine was used to connect the integration engine to external systems. The adapter engine converted input file contents to a XML message. The structure of the records in the input file has to be defined. There was one option to read this structure from the first line of the file itself. This option was called 'fromFile'.
    Now the current situation in XI 3.0 is that the integration engine reads the input file. Conversion of file contents is still available but the option to read the record structure from the input file doesn't exist anymore.
    Does anybody know whether I am right and this functionality isn't available anymore or how to achieve the desired system function in XI 3.0.
    Regards
    Klaus

  • Doubt regrading Bath Input File

    Hi ,
    I have requirement something like that:
    -Select of releavant Items
    -Process MB04 on the selected items
    -Collect errorneous records in batch input file
    -Display  results
    Can you please let me know that <i>Collect errorneous records <b>in batch input file</b></i>
    I don't understand <b>what is batch input file</b> and how here I ensure that I have to do Call transaction or Session method.
    As per my understanding I should do <b>Call transaction MB04</b> to post the data and if there is error record <b>create the session</b> and do the<b> bdc_Insert</b> so all error records will be stored in the session.But i not sure about this.
    Thanks
    PK

    Hi,
      In Sesssion method, u no need to worry about the error records in the input file SM35 will take care of it,so u have to run the BDC by Call Transaction Only to display the errors in the output at SE38 level.
    First Declare an internal table of the same structure as ur input file to capture Error records (eg.IT_ERROR)
    In the Call transaction, when the Sy-Subrc is NE 0 mean the record is an Error record, so simply append that record to IT_ERROR.
    at last u display IT_ERROR data as error records, better if u maintain the index of the record also which give more accurate error record in the input file,
    regards
    ganesh

  • Validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result

    HI All,
    I have a situation.
    I need to validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result.
    A predefined success schema in case of  validation success and negative schema structure for validation failure.
    any advice ?

    Hi Rachit,I following the blog
    http://dietergobeyn.be/validating-biztalk-messages-orchestration/ and stuck in few things
    I created a helper class with the name Validation and following code
    [Serializable]
        public class Validation
            private bool _isValid = true;
            public bool Validate(XmlDocument document, Type schema)
                XmlSchemaSet set = new XmlSchemaSet();
                if (typeof(SchemaBase).IsAssignableFrom(schema) && !schema.IsNested)
                    set.Add((Activator.CreateInstance(schema) as SchemaBase).Schema);
                ValidationEventHandler eventHandler = new ValidationEventHandler(HandleValidationError);
                document.Schemas = set;
                document.Validate(eventHandler);
                return _isValid;
            private void HandleValidationError(object sender, ValidationEventArgs ve)
                _isValid = false;
    public static bool ValidateMessage(XLANGMessage msg)
    XmlDocument xDoc = new XmlDocument();
    xDoc = (System.Xml.XmlDocument)msg[0].RetrieveAs(xDoc.GetType());
    Type t = typeof(Schemas.External.Invoice_v3_1);
    Validation validation = new Validation();
    return validation.Validate(xDoc, t);
    First thing, Do i need to write the ValidateMessage method inside the helper class or not ??
    If inside, how to add the reference of schema files in the statement (Type t = typeof(Schemas.External.Invoice_v3_1);)
     I tried adding the reference of my schema project but it is showing error.
    And what is to be written in the ValidateMessage expression shape in Orchestration ?
    Really appreciate your help.

  • Sender File Adapter - remote FTP server program execution

    Hi all,
    I have a scenario
    X12 -> XI -> File
    where sender File adapter is used. The input file is X12 txt document which needs to be converted into X12 xml format. I have created astylus studio XSLT mapping which uses Convertor to convert this txt file to X12 XML.
    I don't know how to configure sender file adpater to run this mapping on the source file before picking it up. have created a windows batch file on the FTP server which runs tis XSLT mapping on the txt file and replaces it with X12 format xml. This batch file uses command line parameters of stylus studio to run XSLT mapping on input txt file and generates an xml.
    I am not sure how to run this mapping on the input file before processing starts in PI file adapater.
    I tried running command line parameters of Sender file adapter but that didn't worked.
    Please help.
    Thanks
    -Kulwant

    Hi, Kulwant:
    Looks like you would like to execute your mapping program before file adapter pick it up.
    Right ? for one interface, it seems out of the XI scope, however if this is your requirement, you can separate into two interfaces:
    The first interface is file to file scenario, it is used to execute your mapping program:
    The file sender just pick up the txt file, send to integration engine.
    Your Message Mapping program need to specify your XSLT mapping, after the mapping, the message is XML format,
    then you will use file receiver to send it to certain directory.
    Now the XML format file is your input of your second interface.
    Regards.
    Liang

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

  • Compiling .java files during program execution.

    I have a program that read events in from a file and creates custom Event objects (which extend Thread) from this information, and then later the events are activated depending on the timing information that was provided in the file. Everything works great however, I would like to add the ability to include custom Events in the file that the events are read from. I would like the program to take that java code information and produce a class file that can be used during the programs execution. What classes can help me do this and are there any examples that anybody knows of, of something like this?

    I wonder if anyone has ever tried to do this before...
    http://onesearch.sun.com/search/developers/index.jsp?col=devforums&qp_name=Java+Programming&qp=forum%3A31&qt=dynamic+compilation+compile+runtime

  • XSD for the input file for GTS offline screening program

    Hi Friends,
    We are running some performance tests for our current project to  evaluate how much time the offline screening program (report "/SAPSLL/SPL_OFFLINE_SCREENING") takes in GTS. This report expects the customers in an XML format - would you know where I can get the definition of this expected XML format (e.g. the XSD for this input file)?
    Can some one help me to provide response XML definition of what GTS generates for the SPL check ?
    Thanks,
    Sudheer.

    Hi Sudheer,
    please follwow the steps:
    1. Prepare an XML file  with Adress data
    -> you can create a simple excel file that has to be converted into an      
    XML-file. See also the GTS documentation http://help.sap.                
    com/saphelp_gts72/helpdata/en/b1/8dc5c62c885046ab71fdcddc6ad2c2/frameset 
    .htm.                                                                    
    2. Upload the local file  to GTS for SPL Screening
    3. Examine the SPL screening results in GTS
    4. Save the results in Audit trail and&or in local file
    Best regards,
    Christin

Maybe you are looking for

  • Adobe digital editions will not open

    I all of a sudden keep having this error pop up every time I try and open Adobe Digital Editions. It used to work fine and suddenly won't anymore. The computer is using windows 7 home premium 64 bit operating system. I can't even even put books on my

  • Jaxb is giving NullPointerException  at com.sun.xml.bind.v2.model.impl.Prop

    Hi, I am getting null pointer exception , i dont whether it is due to jar mismatch or what ??? I have a stand alone application which created java classes from one schema file and , i construct xml file by inputting some values. It works fine in my m

  • Still necessary to manually install kernel modules with CUPS?

    I'm just setting up my system with CUPS for printing. In the "Configuring CUPS" section of the wiki, you're instructed to install the appropriate kernel module with modprobe for using a usb or parallel port printer. With my usb printer and kernel 2.2

  • Screen blanking after upgrading to OSX10.9.2

    After upgrading to OSX10.9.2  the monitor will randomlly go black.  This never happend prior to upgrading to OSX10.9.2.   Is there a permanant fix or a way I can go back to the previous version OF OSX?

  • HELP!!! Contacts gone and backup assistant isnt restoring them?

    I lost my contacts 2 months ago on my iphone 4s. The numbers were saved in my text messages though, so I went by those, and re entered the names to match, etc. That saved half of them (115). Then, it happened again last week. so, same thing, and this