DC noise values set from ini file

Hello,
       I am trying to build a waveform generator with ( sine wave, triangle, saw tooth, square, DC,  random noise). I managed to get the waveform working using the NI waveform generator built in VI function. but I want to add the DC case which I manage to do. but I want the values (amplitude and frequency ) to be in an ini file. My idea is to manual set the values in the file, once I run the vi and select the DC noise case, it should read the file get the values and output the data and once I stop it, it saves the dc values before exiting.
     I am kind of stuck trying to figure how to do this. I hope I was clear enough. I don't have code to show since I havent started coding on that part yet. Please help.
Solved!
Go to Solution.

Clearly enough explained.
Have a look at the configuration file VIs, found in File I/O > Config File VIs. There are also plenty of examples n the community, as well as in the Example Finder, which show how to use these. A good place to start is the Write Configuration Settings File example in the Example Finder, as well as Read Configuration Settings File.
Your .ini file will look something like this, once created:
[DC Noise Settings]
Amplitude = 1.234567
Frequency = 8.901234
This is equivalent to:
[Section Name]
Key 1 = Value
Key 2 = Value
When asked to read a specific key from a certain section, the read VI scans through the file for the named section, then looks for they key name that you've provided it. Bear in mind you'll need to know what the data type is when you read back.
You can use the write VI to modify specific keys in specific sections once you close the file.
This is one of a multitude of methods you could use to do this, but is probably the simplest.
CLD

Similar Messages

  • Default setting of ini file entry?

    What, in v2011, is the default setting of the AllowMultipleInstances value of the ini file? I know that it isn't a normally included field in the ini file generated when an exe is built, I'm just wondering what the value is by default? I've added it to the ini file, set to False, on a machine I'm trying to troubleshoot which has a program launch so slow that the operators frequently go back and try and launch it again, which results in two instances, only one of which is correctly running.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion
    Solved!
    Go to Solution.

    pincpanter wrote:
    ...it appears that the default value is false...
    I can concur that this appears to be the case for a simple executable.
    Maybe when the executable loads a large number of VIs before beginning execution it doesn't register itself with whatever service needs to know until it is actually executing, and if the executable is double-clicked again before this point it may be able to launch a second instance.
    This is harder to test without creating a substantial executable.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Dynamically create Value Objects from XML file

    Hi
    I want to create a value object from Xml file dynamically,like in the xml file i have the name of the variable and the datatype of the variable.is it possible do that,if so how.

    Read about apache's Digester tool. This is part of the Jakartha project. This tool helps in creating java objects from the XML files. I am not sure, if that is what u r looking for.

  • How to write Data from INI file to Ring control

    Hai,
    I need to write the Data read from INI file to a RING control.While doing this operation using Variants i am getting error.
    I will be pleased if somebody help me.I have attached the Particular INI file and the VI. 
    Solved!
    Go to Solution.
    Attachments:
    Read Serial IO INI data.vi ‏34 KB
    Serial IO paramters.ini ‏1 KB
    Serial Engine Initialize.ctl ‏6 KB

    Adding data to ring
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet
    Attachments:
    Adding data to ring.vi ‏10 KB

  • Changing the setting from PDF file to a  JPEG file.

    Is there a way I can change the scan setting on my printer. It is a HP Deskjet F4480. I want to change the setting from PDF file to a JPEG file. I want to scan them so I can see them on my screen saver.

    This has nothing to do with Acrobat. See the documentation for the scanner software that came with your scanner.

  • Read and sort values present in .ini file

    Hi all,
    I have a .ini file in which a set of modules with there order of execution is mentioned.I want to get all these values sorted as an array so that I can proceed with the execution of each in the order mentioned.The module list in the .ini file looks like this:
    Here, digits represent the order of execution of module.
    I should get output as an array with following values:
    1 MNO
    2 DEF
    3 STU
    4 PQR
    5 GHI
    6 VWZ
    7 ABC
    8 JKL
    I know about config data and read key vis but since the module list is huge I dont know how to write an efficient code for this.All suggestions are welcome.
    Thanks.
    Solved!
    Go to Solution.

    The snippet below should be very close to what you want.

  • Compile VI with Applicatio​n Builder: Fails to load settings from INI file.

    I utilize Labview 2011. I have written a VI which reads an INI file and sets the Tasks Names of DAQmx tasks. The VI works properly when I run it before compilation. However, once I compile it into a standalone application the application does not change the settings of the channel controls. I have updated the VI to include an indicator to verify that the compiled application is finding the correct ini file. However, the values of the controls never update.
    Is there something in the Application Builder which is needed to insure programmatic changing of control values upon compilation?
    I'm truly stumped. Any help would be much appreciated.

    Your problem might be related to this.

  • How to capture the data within the given range of maximum and minimum values ? from csv files

    My requirement,
    1. Here, the user will provide the range like maximum and minimum values, based on this range, the VI should capture the data within the given range. ( from CSV file as attached )
    2. Then VI should calcluate the average value for captured data and export it to excel.
    This is my requirement can anyone help me on this.
    Many thanks in advance
    rc_cks
    Attachments:
    sample_short.csv ‏2439 KB

    Hi,
    Thanks for remnding me. I forgt to attach the VI, 
    Here I am attaching the VI, what I tried. 
    From attached CSV file, I have to find an average value for columns B,C,D,E,F,G,H,I and AJ, AK. ( data range will be defined  by user ), focused only on these columns
    Here, the scope is to calculate an average value for given data range by user as MAX and MIN data.  
    FYI:  I tried manually for two instance i.e column H & I.  As per H column one steady state values from  7500 to 10500 and similarly in I column 7875 to 10050. So, I gave these as a limit to capture and calculate the average value. But unfortunaltely, requirement has been modified as per below requirements.
    More Info on requirement: 
    --> The user will define the range of data by giving some MAXIMUM and MINIMUM values(for above mentioned columns induvidually), then VI should capture          that data range and it has to caculate the average value for that range of data. This is the task I have to complete. 
    --> I am stuck in creating a logic for data capturing for given range of MAX and MIN value from user, 
         Can anyone help me on this. 
    If my explanation is not clear, Please let me know.  
    Many thanks, help mw
    rc
    Attachments:
    VI_rc.vi ‏25 KB
    sample.zip ‏4166 KB

  • DignosticF​ile= setting in .ini file not working?

    When editing Lookout.ini file in Lookout 6.1 and adding setting as follows:
    [COM9]
    DiagnosticFile=C:\com9.txt
    or
    [COM3]
    DiagnosticFile=C:\Program Files\National Instruments\Lookout 6.1\com3.txt
    No logs are created for the named COM port.
    I know I used this feature sucessfully back in Lookout 4.5 and earlier, maybe even in Lookout 5.1.
    Please confirm and help!

    You can configure this in Lookout. Go to Option->Serial ports, select COM9, check "Enable", input the diagnostic file path, "Accept".
    Close Lookout, then open lookout.ini. You will see the following codes.
    DiagnosticFileEnable=1
    DiagnosticFile=c:\test.txt
    DiagnosticAllHex=1
    DiagnosticTimeStamp=1
    DiagnosticTimeStampDateFormat=73
    So, you need to add DiagnosticFileEnable=1 to make it active.
    I'm not sure how it worked in Lookout 4.
    Ryan Shi
    National Instruments

  • How to create table from .ini file

    Hi,
    The file *.ini generates a Multicolumn Listbox where is indicated a number (variable) of tables with them characteristics (row and column) as in the picture below.
    I need to find the way to create automatically, on word file, the tables as indicated in the *.ini file. Do you think that it could be possible? That you know, exist a Macro to do this?
    Best regards
    Attachments:
    Multicolunms .png ‏8 KB

    As Taki said above, to do this you need to use the Report Generation Toolkit. This will allow you to generate tables in a word document. Look for the examples in the LabVIEW Help for a rough idea of how to use the toolkit and if you have any specific questions after that then feel free to post them here.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • How to use a variable value set from custom dll in dataset

    Hi,
    I've inherited a SSRS report that I need to add some functionality to.  I'm setting a variable, ADAuthorizations, from a custom dll 
    ADAuthorizations is a string of all AD groups a user is a member of and I need to use this as a filter in a dataset.  I've tried using this variable as shown in the query below but I'm getting an error "The expression used for the parameter 'Unit_Permissions"
    in the dataset "Unit_Permissions" includes a variable reference.  Variable values cannot be used in query parameter expressions."  Is there another way I should go about doing this?   
    = "SELECT UnitCode, UnitName " &
      "FROM dbo.VW_Unit_Permissions " &
      "WHERE UserId in (" & Variables!ADAuthorizations.Value & ")" &
      "ORDER BY UnitName "
    Thanks,
    Robert

    Please follow below steps,
    1. Create a custom code to get all the users in an array,
    Public Function getUserName() As String()
       dim Users(1) as string
       Users(0) = "user1"
       Users(1) = "user2"
    return Users
    End Function
    2. Create dataset using the below query,
    SELECT UnitCode, UnitName FROM dbo.VW_Unit_Permissions ORDER BY UnitName
    3. Add a parameter @User and set properties : (Datatype as text, Allow multiple values, Visible)
    Under "Available Values" select specify values and set the label and values as expression.
    =Code.getUserName()
    4. Similarly for "Default values" as
    =Code.getUserName()
    5. Go to tablix properties and select the filter tab and set the properties as below,
    - Select Expression "UserId" i.e =Fields!UserId.Value
    - Operator as "IN"
    - Value as =Parameters!User.Value
    6. Preview the report.
    Regards, RSingh

  • How to create and edit a .ini file using java

    Hi All...
    Pls help me in creating and editing an .ini file using java...
    thanks in advance
    Regards,
    sathya

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • Creating .ini file

    How can i create .ini file.Iam having a VI and I would like to configure by calling from .ini file.pls tell me how can i create?

    Hi
    There are a set of configuration file VIs on the function palette under "File I/O".
    For an example, on the menu bar go to Help >> Find Examples ... and search for "configuration".
    Good luck
    Neil

  • Report Viewer Control not displaying Japanese Text fetched from a file.

    Hi,
    I am using Crystal Report 2008.
    I want my report to display values read from text file ( this file contains key = value pairs ), for this I have created a ufl ( created as .net dll and also tested correctly).  The text file contains keys in english and theirs values in Japanese hence this text file is in UTF-8 format.
    As said above the .net dll was tested with a .net application and the japanese values were returned correctly.
    But using the same function as ufl in crystal report displays ???????? for same japanese text.
    I have already installed the Japanese language pack for crystal report.
    Please help as soon as possible.
    Thanks.

    Hi,
    I solved the above problem using setContentLocale method and passing it desired locale.
    Thanks!

  • Empty Value set - PY_SRS_PAYROLL

    Hello All,
    A new responsibility was created (with application as Payables) and a PAYROLL report request was added to its request group (again a Payables group).
    The report uses the seeded PY_SRS_PAYROLL value set for one of its parameter. This is not returning any rows when logged in through this responsibility. All profile options are in place and I ran the Security List Maintenance too. Yet I can't make the report run for this responsibility.
    Is it because it belongs to a different application?
    I tested the code of value set from backend for this responsibility and application (using FND_GLOBAL.APPS_INITIALIZE) and its works fine. But not in front end.
    Am I missing something? I request you to give me some suggestions.
    Regards,
    Balu

    Baloo,
    Please check the output of following query after replacing the busingess group and your user session login values
    SELECT PAY.PAYROLL_NAME
    FROM PAY_PAYROLLS_F PAY,fnd_sessions fnd
    WHERE pay.business_group_id = :$PROFILES$.PER_BUSINESS_GROUP_ID
    and fnd.session_id = userenv('sessionid')
    and fnd.effective_date between pay.effective_start_date
    and pay.effective_end_date
    order by pay.payroll_name
    this is query , run by py_srs_payroll value set .
    Hope it helps
    Ankur

Maybe you are looking for