How do I subtract offset voltage from my data acquisition program?

I have a simple program (attached) that reads a voltage input and outputs the results to a file. The voltage has an offset (which changes from test to test), and I am interested in zeroing out this value at the start of acquisition (in the 'interface.vi'). Could someone show me how to do this? Thanks.
Attachments:
finalsystem.zip ‏161 KB

What you need to do is put a Wait millisecond timer in the vi such that it is forced to occur before the data acquisition. You then wire the number of milliseconds that you want to wait into this function. There are a number of ways to force the flow of the data. One method is a state machine architecture. However, this approach requires a rewrite of your code (maybe not a bad idea since the code isn't very large). A second approach uses subvi's with Error in and Error out clusters to regulate data flow. This could be nicely integrated into your vi. I have made a simpler modification to your vi which will make it work by putting some of your inputs to the data acquisition vi into a single frame sequence stru
cture with the Wait function with a five second waiting period.
Once again, this method will work for your vi, but it is not the preferred approach, especially if the vi grows very large.
Hope that helps,
John
Attachments:
interface3.vi ‏94 KB

Similar Messages

  • How to remove photoshop elements 3 from being the default program to open photos

    how to remove photoshop elements 3 from being the default program to open photos in iMac 10.6.8; want to use Preview 5.0.3 as before. Somehow I clicked an "ok" to a question asking if I wanted photoshop e 3 to be the default program (NOOOO - too slow, too cumbersome just for viewing pix) What was I thinking????

    This might help just found googling http://www.bittbox.com/os-x/how-to-set-the-default-program-to-open-a-certain-type-of-file- in-mac-os-x
    Try once please.
    Thanks,
    Garry

  • How can I read the voltage from a serial port

    I am fairly new to LabView and I am having trouble figuring out how to read the DC voltage coming out of an RF Power Supply through a serial port so that I can monitor the voltage every few seconds. In order to do this do I need to purchase a DAQ card or anything like that?

    You would not need a DAQ card to read data over the serial port. You would, however, need a serial port. That may sound sarcastic, but it's not, since many manufacturers are ditching serial ports on computers. If you don't have a serial port then you would need to get something like a USB<->serial adapter or a serial port card that you plug into an expansion slot in your computer.
    Assuming you've got that then you need to find the command set for the RF Power Supply, and write drivers for it so you can send the command to read the voltage, and then read the resposen. I would suggest looking in the Instrument Driver Network to see if a driver for your supply has already been written. 

  • How to subtract n years from a date

    Hi all,
    I need to subtract n years from a given date..
    for example
    if date is 21.07.200<b>6</b>.. if i want to subtract 2 years (n years) i should get 21.07.200<b>4</b>

    hi,
    FM.
    CCM_GO_BACK_MONTHS
    Example
    Data : Lv_current_date type dats,
           lv_new_date     type dats,
           lv_no_months    type NUMC3.
    Lv_current_date = sy-datum.
    lv_no_months    = 12 * 2.
    CCM_GO_BACK_MONTHS
         IMPORTING
             CURRDATE   = Lv_current_date
             BACKMONTHS = lv_no_months
         EXPORTING
             NEWDATE    = lv_new_date.
    Reward Points & Mark Helpful Answers.
    to reward points ;click radio button next to the post.
    select radio button as per the answers.

  • Ok, how do I subtract a percent from a number?

    In Excel, this is easy. But numbers isn't doing it.
    I want to take a number, say 2400, and subtract 6.9% from it without 1st using an additional cell to find out what 6.9% of 2400 is.
    In excel, you just use: =2400-6.9%
    But in numbers, this is giving a result of 2399.94
    I know it's simple? Anyone know why Numbers handles percentages differently?

    Your formula is giving the correct answer, just not the answer to the question you are asking.
    2400 - 6.9%*2400 = the result you want
    also stated as
    2400*(1-6.9%) = the result you want
    EDIT: I saw Peter's post after I posted mine. Note that the 6.9 in his formula is not 6.9%, it is 6.9 (which is 100 times greater than 6.9%).
    Message was edited by: Badunit

  • How to generate Top sales report from SAP data ?

    Hello experts,
    I am completely a newbie to SAP BO , can any one guide me how to generate TOP sales of the year report from SAP data ?

    Hi David,
    First Let me know the Source & Tools to involve.
    Let me go with the generic approach:
    If the source is BW, then you can create the logic in query designer designer and then you can incorporate the data into the dashboard or webi or crystal report whatever its.
    If the source is sql or anyother DB then it can also be achievable in crystal or webi to write the logic in top 10 values by ranking then you can incorporate the data into the dashboard, but here you can limit the top or bottom values.
    Hope this helps, please revert for more clarifications on this.
    --SumanT

  • How to get previous 2 months from current date in a dropdown?

    Hello Experts ,
                           In the application which I am developing, there is a requirement wherein , I want to Populate current month and previous two month in a drop down depending upon today's date. please help.
    Thanks & Regards,
    Pratbha Shukla

    The internal format for dates is yyyymmdd.  Therefore you can just grab the month value from the date:
    data lv_month type FCMNR.
    lv_month = lv_date+4(2).
    Just subtract from the month to get the two previous.
    data lv_previous1 type FCMNR.
    data lv_previous2 type FCMNR.
    if lv_month = 1.
    lv_previous1 = '12'.
    else.
    lv_previous1 - lv_month - 1.
    endif.
    if lv_previous1 = 1.
    lv_previous2 = '12'.
    else.
    lv_previous2 - lv_previous1 - 1.
    endif.
    Then do your lookup for the month name by reading the table returned from function module MONTH_NAMES_GET.

  • How to calculate number of days from a date field

    Dear BW Experts.
    I have a field 'Create Date' in the BEx query. Now we need to create a variable which should give the number of days from the date of running the query (sy-datum) to the Create Date.
    This will help the users to get records which are say, 30 days old (Sy-datum - create date = 30) or 10 days old etc.
    Could you suggest as to how to create this variable.
    Thanks,
    Sai

    Hi,
    Step 1: Create variable on "Create Date" with User entry processing type
    Step 2: Create a restricted KF for Sales & restrict it on "Create Date" to get "Sales on day"
    Step 3: Manipulate  the values of "Create Date" on which you could restrict  "Sales" again and again to get other values
    Step 4: Create one variable (ZPUTMNTH) for u201CMonth to Dateu201D with processing by u201CCustomer Exitu201D. This variable was created  on u201CDateu201D characteristics.
    Step 5 : Goto C-mod t-code and use EXIT_SAPLRRS0_001
    to calculate "month to date" user input is "Calday" Key Date
    WHEN 'ZPUTMNTH'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(6). "low value, e.g.YYYYMM (200606) part of key date (20060625)
    L_S_RANGE-LOW+6(2) = '01'. u201C low value e..g. YYYYMM01 (20060601)
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    Assign if helps.....
    Regards,
    Suman

  • How to use the google search from inside a java program

    Hi guys
    How can i use google search in my java program?
    What will be the type of the reply i get back from google?
    Thanks in advance
    [http://javamilestone.blogspot.com/|http://javamilestone.blogspot.com/]

    Hi,
    You have here some examples about how to make search on google from a Java application.
    The type of reply is JSON
    Here some documentation about it:
    [http://code.google.com/apis/ajaxsearch/documentation/#fonje|http://code.google.com/apis/ajaxsearch/documentation/#fonje]
    And here some snippets:
    [http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets|http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets]
    Regards,
    David.

  • HT4847 Please help me how to reinstall icloud back up from specific date. (eg. back up from 1.02.13).

    My phone was not backed up on icloud due to excess storage size for one month. Recently i lost some contacts by accident. and it was backed up on icloud again this morning .so I would like to reinstall from last month back up to get all contacts back. but when i connected to computer, I only have a choice to reinstall from last 5 months ago which was backed up on my computer manually. So, please help me how to choose to reinstall icloud back up from specific date from last month (eg. 02.02.2013). Thank you very much.

    You cannot selectively restore from iCloud. You can only do a full device restore by resetting the device and choosing to restore from the iCloud backup during the setup process.
    See: http://support.apple.com/kb/HT4859

  • How to retrieve modeinfo[n].context_id_uuid from inside an ABAP program ?

    If you login to an SAP session and then create another session via the system menu option (not a second login), transaction SM04 will show two different values for the parameter:
    modeinfo[n].context_id_uuid
    I need to know how to retrieve the value of this parameter from inside an ABAP program.
    This question is related to the one Rich and Naren and I were discussing - about how to create a unique shared buffer memory id that will distinugish between a two sesssions of a single user who happens to be "MIGO'ng" twice.
    Thanks for whatever answer anyone can provide ...
    djh
    Note: also posted in ABAP General ...

    Rich answered in ABAP general:
    REPORT ZRICH_0001 .
    type-pools: thfb.
    data: context_id type THFB_CONTEXT_ID.
    CALL FUNCTION 'TH_GET_CONTEXT_ID'
    IMPORTING
       CONTEXT_ID       = context_id .
    write:/ context_id .

  • How to measure the analogy voltage from different source?

    Hi all,
      I am trying to measure the voltage generated from a function generator ranged from -2V to +2V. I am trying to use a PCI-6023E for analogy input. I directly connect the voltage output from the generator to one of the analogy input channel, but the reading is not that accurate, it should be 2.4V but sometimes it read 2.6V and sometimes 2.2V or less. I am thinking if anything to do the the ground? Where should the ground of the BNC from the generator should connect to? Someone suggests to use differential input but I have no experience of doing that, any suggestion or example?

    Hi dragondriver,
    I'm providing below links to 2 documents that discuss wiring considerations that are applicable to your device.  Hopefully this information is helpful!
    E Series User Manual
    http://www.ni.com/pdf/manuals/370503k.pdf
    Field Wiring and Noise Considerations for Analog Signals
    http://www.ni.com/white-paper/3344/en#toc5
    Josh B
    Applications Engineer
    National Instruments

  • How do I subtract one sum from another and show a balance in another box

    In numbers how do I show the difference in total from one column and another as a balance amount?

    =SUM(range_one)-SUM(range_two)
    Details available in iWork Formulas and Functions User Guide.
    Yvan KOENIG (VALLAURIS, France) samedi 9 juillet 2011 15:45:36 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How do you get CJC Voltages from more then one 1102/1303 module

    I tried using the channel array as follows:
    ob0 ! sc1 ! md1 ! cjtemp
    ob0 ! sc1 ! md2 ! cjtemp
    ob0 ! sc1 ! md1 ! 0:30
    ob0 ! sc1 ! md2 ! 0:30
    I get an error after AI START is run (Error: AI Control -10370).
    The other thing i tried was to put the cjtemp for module 2 after the channel list for module 1 such that it would scan the modules sequentially, the program runs but seems to ignore the second cjtemp command.

    Hello Eric,
    I think you mentioned the correct way to make this work. You need to group the cjtemp of each module with the other channels of that module. I did this with a setup of my own, and everything worked fine. Is it possible that the second cjtemp was just immediately overlayed by other channels and appeared not to be there?
    If this is still an issue for you, please explain what you mean by 'ignore the second cjtemp command'.
    Thank you,
    John Nieri
    Applications Engineer
    National Instruments

  • Need to subtract one day from the date appearing

    Hi, I am modifying a script in such a way that for an output type there is an invoice date appearing.  This invoice date should be back dated to 1 date less to the actually date that is appearing currently.
    For ex the date is 2007.08.30 it should appear as 2007.08.29.
    While debugging I found that it is picking up the data for the date from the structure vbdkr and the field is fkdat. From the following code in the script.
    /:   DEFINE &SALES_ORDER& := &VBDKR-VBELN_VAUF&
    /:   INVOICE DATE,, : &VBDKR-FKDAT&
    What changes do I need to make the changes in the script or in the driver program?
    Can you please suggest?
    Thanks.

    Hi..
    You can get this Functionality by Calling a FORM (subroutine) from the Script Layout itself  There is no need to change the Print program.
    Eg:
    In the layout set -> window -> text elements. Write this before displaying invoice date
    /: PERFORM F_DATE_SUB IN PROGRAM ZPRG01
    /: CHANGING &VBDKR-FKDAT&
    /: ENDPERFORM
    INVOICE DATE,, : &VBDKR-FKDAT&
    Create the report program ZPRG01: In the program ZPRG01
    FORM F_DATE_SUB TABLES INTAB STRUCTURE ITCSY
                                                  OUTTAB STRUCTURE ITCSY.
    DATA: L_DATE TYPE D.
    READ TABLE OUTTAB INDEX 1.
    L_DATE = OUTTAB-VALUE. "you need to convert here
    SUBTRACT  1 FROM L_DATE.
    OUTTAB-VALUE = L_DATE.
    MODIFY OUTTAB INDEX 1.
    ENDFORM.
    reward if Helpful.

Maybe you are looking for

  • Can I install my old OSX on a different computer after upgrading?

    I have a couple questions: 1) I currently have Snow Leopard on my one computer and on another computer I just have Leopard. I am purchasing Mountain Lion from the App Store today and am going to install it onto my computer with Snow Leopard. Can I th

  • Can't install Lion get the message "recovery system can't be created"  -see picture of my screen

    So I have been trying to install Lion for 2 days.  The screen below is what I keep getting.  Here's what I have done so far... 1.) Delete files (I have now have about 50GB free) 2.) Complete all updates (running 10.6.8) 2.) Disk Utility repair with S

  • Loading and unloading applets

    Hello, I want to know is there is a way to automate the process of converting thr applet in a CAP and then loading it into the SIM Card without using the command line? Thank you, Fernando

  • Importing .avi file into Premiere CS5 and losing on quality

    Hello Adobe users, I'm having a problem with importing my material in Premiere CS5. It's file extension is .avi and I'm not sure which step I do wrong to get his but it's pretty important to me to find out what's the problem. Every time I try to impo

  • Power Adaptor Is Not Charging.

    Hi guys I went on holiday for two weeks in which time my MacBook Pro was sat in my computer bag at my fathers untouched. I got back, turned the computer on and the battery was at 91% and it won't charge. It is now at 87% after being back nearly 2 wee