Calculating scale factor from miliamps input to labview output

I am setting up a testing fixture with Fieldpoint and Labview. I am bringing in a 4-20MA single to the fieldpoint. I need to scale it so I can have a pressure and vacuum reading in my labview screen. Do I use a multiply function or make a sub VI.
Thanks, Bob

I built a sub VI for my amp meter. I have a current transducer that is set to read 100 amps. So we used y=mx+b and got the scaling right on. I copied the Sub VI and used it for a pressure reading. This time the scale was based on a 250 PSI Transducer. This transducer puts out a 4 to 20ma signal. Again this one works perfect. It is dead on compared to the precision analog gauge. The problem is with my Vacuum Transducer. It is a 0-200 psi or 0-30" in Hg. I calculated the y=mx+b for this sub VI and I can not get a valid vacuum reading. I checked the port to make sure I was pulling vacuum there.
In the sub VI if you click on it, it shows the original calculation for the amps. I tried to save the sub VI as a different name but it will not allow two sub VI's in the same state. I was able to get the pressure to work by changing the value in the constant that is connected to the Y multiplier.
So how do I get the vacuum meter to show a 0-30" value.
Thanks for the reply, Bob

Similar Messages

  • How to get signal from analog input and send it to analog output (real-time​)

    Hi everyone,
    I am doing simple task in Visual C++ and I am using PCI-6221(37 pin).
    Basically, I want to send same signal from 'analog input' to 'analog output'
    at the same time (almost), to make it real-time application.
    Can someone please provide me sample program. 
    I would appreciate if you could provide me with the good tutorial which explains
    step by step everything about programing NI-DAQmx for C/C++.
    Best Regards,
    Khassan
    Solved!
    Go to Solution.

    This is my code in C++, you can optimize it if it looks too messy. This code reads signal from analog input and outputs it through analog output. 
    To make this code work additional  include directories and library directories must be added from NI.
    I hope it helps someone.
    #include <stdio.h>
    #include <conio.h>
    #include "NIDAQmx.h"
    #include <math.h>
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main(int argc, char *argv[])
    int32 error=0;
    TaskHandle taskHandleRead=0,taskHandleWrite=0;
    int32 read=0;
    float64 dataRead[1000];
    char errBuffRead[2048]={'\0'};
    char errBuffWrite[2048]={'\0'};
    bool32 done=0;
    int32 written;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleRead));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleRead,"Dev1/ai0​","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Vo​lts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleRead,"",100.0,DAQ​mx_Val_Rising,DAQmx_Val_ContSamps,0));
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleWrite));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleWrite,"Dev1/ao​0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleWrite,"ai/SampleC​lock",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1​000));
    DAQmxErrChk (DAQmxStartTask(taskHandleRead));
    DAQmxErrChk (DAQmxStartTask(taskHandleWrite));
    while( !done && !_kbhit() )
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandleRead,1,10,DAQmx_Val_​GroupByScanNumber,dataRead,1000,&read,NULL));
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleWrite,read,0,10.0,D​AQmx_Val_GroupByChannel,dataRead,&written,NULL));
    _getch();
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuffRead,2048);
    DAQmxGetExtendedErrorInfo(errBuffWrite,2048);
    if( taskHandleRead!=0 )
    DAQmxStopTask(taskHandleRead);
    DAQmxClearTask(taskHandleRead);
    if( taskHandleWrite!=0 )
    DAQmxStopTask(taskHandleWrite);
    DAQmxClearTask(taskHandleWrite);
    if( DAQmxFailed(error) ){
    printf("DAQmx Error: %s\n",errBuffRead);
    printf("DAQmx Error: %s\n",errBuffWrite);
    printf("End of program, press Enter key to quit\n");
    getchar();
    return 0;

  • Acquiring Analog Input from Multiple Channels in Labview

    Hello,
    i am working on a VI where i need to acquire signals from multiple channels in Labview using NI-9129.Initially i want to acquire contineous input signals (voltage and current) and display it on the graph.
    Having looked at forum and Labview examples i tried to make an initail VI but i am not sure if the setup i made needs any modification to serve my purpose.I am fairly new to Labview software.
    All i want is
    1.To acquire conteneously current and voltage 
    2.Display current and voltage individually on the graph.
    3.Perform some basic calculations like MAXIMUM,MINIMUM and AVERAGE values of voltage and current.
    4.Log the data into  excel file
    I have attached the VI i made so far.i need abit of advice if i am moving in the right direction or not.
    Thank You for having a look at my question.
    Attachments:
    Voltage-Current VI.vi ‏81 KB

    Engr_tech wrote:
    i think i already have the tdms for  data logging.as far as the tdms data logging is concerned,when i enable the logging mode to "read and log" the data logged inside the excel sheet would be seperate for current and voltage.?
    Is it practically possible to acquire data from 4 different channels and plot them.if yes,then am i right to assume that all i need is to modify the current VI for four channels having all of them in parallel.
    Yes, you are logging directly to a TDMS file.  This is definately the best route for data logging from a DAQ.  The currents and voltages will show up as different channels in the same group.
    To add more channels, just add them to your DAQmx task.  The logging will handle it with no issue.  Your calculations will also a little work to add the extra channels.  Same for the graphs, since you are using seperate charts.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Thermocoup​le Scale Factor

    Hi,
    As I learned in Basic I & II, 100 is the scale facto to measure thermocouple. Is this valid for all type or just the device at the training center.
    I am reading thermo Type K as a voltage with scale of 100 but the reading is .4 V instead of 70 deg c. The range set to 25-100 C.
    My Q is: Do you have to do some measurment to set the scale factor to the right number?
    Thanks 

    What device are you using to measure the voltage from the thermocouple? Are you using a National Instruments DAQ board, or something else to input the voltage to the PC? Is the voltage from the thermocouple amplified by anything before you measure it? That would help a great deal in determining the answer to your question.
    But this might be useful info:
    According to this website: http://www.picotech.com/applications/thermocouple.​html
    Type K (Chromel / Alumel)
    Type K is the 'general
    purpose' thermocouple. It is low cost and, owing to its popularity, it
    is available in a wide variety of probes. Thermocouples are available
    in the -200 °C to +1200 °C range. Sensitivity is approx 41 µV/°C. Use
    type K unless you have a good reason not to.
    So, at 100°C, without any amplification, the thermocouple would output a voltage of
    .000041V/°C * 300°C = 0.0123V (the TC range starts at -200, so add 200 to the desired temp)
    And at 25°C, the TC output would be
    .000041V/°C * 225°C = 0.009225V
    So, I would say that you have some kind of device that is amplifying your TC to a higher voltage. Therefore, you need to know what that amplification factor is before converting that voltage to a temperature. If, just as an example, you have a circuit or box that inputs a TC voltage and outputs 10mV/°C, then your 25-100°C range would be .250V - 1.00V. In that case, the .010 is your scale factor, and your 0.4V output would translate to 40°C. Again, that depends on the hardware you are using.
    Does that help at all, or just confuse you more?
    B-)

  • Using calculation view in excel with input parameters

    Hello
    I have a calculation view which receives 2 input parameters for a range of dates, when i create the connecction with Excel i get the error "sql processing error: Hierarchy source query: SQL: column store error: search table error: [34092] search on calculation model requires parameters: Required variable $$MyVariable$$ is not set"
    I would like to know how can i pass the parameteres from excel to my calculation view??
    Thanks

    I doubt this can be achieved with a native Excel connection. Try SAP Advanced Analysis for Office. (I believe it may now just be called Analysis for Office).

  • Problem in JAI scale factor

    I am using scale method for Zooming purpose.So i set scale factor as 0.5 for Zoom-in and 1 for Zoom-out.First I load the image,then i perform Zoom-in to make fit width.After Zoom-in,i am getting the image co-ordinates which is totally different from that of original.But actually what I need is the image co-ordinates to be same when i Zoom-in or Zoom-out. So i think Scale in JAI is only for Resize and not for Zoom.So please provide me the solution for Zooming as early as possible.
    Thanking You,
    Kannan

    I am not saying it will work, but I would ask if you tried "Dilate"? I don't know what the parameters are supposed to be for the different methods, but I do know how to get a listing of them. See the code below:
              OperationRegistry ory = JAI.getDefaultInstance().getOperationRegistry();
              String [] temp = ory.getRegistryModes();
              String []temp2;
              for (int which = 0; which < temp.length; which++) {
                   temp2 = ory.getDescriptorNames(temp[which]);
                   System.out.println("\t"+temp[which]+":");
                   for (int cual = 0; cual < temp2.length; cual++) {
                        System.out.println("\t\t"+temp2[cual]);
    That will get you a listing of all of the registry modes and the descriptor names within each mode. For parameters and explanations, well, I guess check out the source code for the JAI library and then rifle through it until you find an example, or use trial-and-error, since the only documentation seems to refer to deprecated calls (as I have noted in the most recent version of JAI).

  • How to control the line-in volume input via LabView?

    Anyone know how to control the line-in volume and balance input via LabView?

    I assume you are referring to audio line-in volume control and lerft-right balance...
    If so, then check out this thread:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000D83A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    Look at the info near the bottom from Paul S & Spectre. They talk about "winmm.dll"
    -cheers-
    JLV

  • Scale factor change in 11g?

    This is what i do on Oracle 10g R2 and 11g.
    select wktext from cs_srs where srid = 28992;
    On 10g R2 I get:
    PROJCS["Amersfoort / RD New",
              GEOGCS [ "Amersfoort",
                   DATUM ["Amersfoort (EPSG ID 6289)",
                        SPHEROID ["Bessel 1841 (EPSG ID 7004)",
                        6377397.155, 299.1528128], 593.16, 26.15, 478.54, -1.30439800822601264037402186442411206952, -.103297414968545854662361857351254024323, -1.14450153042326354585672371782129234178, .9999959225],
                   PRIMEM [ "Greenwich", 0.000000 ],
                   UNIT ["Decimal Degree", 0.01745329251994328]],
              PROJECTION ["RD New (EPSG OP 19914)"],
         UNIT ["Meter", 1]]
    On 11g I get:
    PROJCS["Amersfoort / RD New",
              GEOGCS [ "Amersfoort",
                   DATUM ["Amersfoort (EPSG ID 6289)",
                        SPHEROID ["Bessel 1841 (EPSG ID 7004)", 6377397.155, 299.1528128],
                        593.16, 26.15, 478.54, -1.304398008226, -.103297414969, -1.144501530423, 4.0775],
                   PRIMEM [ "Greenwich", 0.000000 ],
                   UNIT ["Decimal Degree", 0.01745329251994328]],
              PROJECTION ["RD New (EPSG OP 19914)"],
              UNIT ["Meter", 1]]
    Now the interesting part is in the scale factor of the datum transform:
    On 10g R2 this is:
    .9999959225],
    on 11g this is
    4.0775
    I understand that 11g is doing it correct as the scale factor needs to be defined in Parts Per million, so it should be read as:
    1.0 + 4.0775 * 1.0e-6.
    But then I don't get 0.9999959255.
    I only get that value when I do:
    1.0 - 4.0775 * 1.0e-6.
    So has the scale factor been wrong in Oracle 10g R2 all the time?
    Is Oracle Spatial wrong again as it should be 1.0 + ppm * 1.0e-6?
    Am very confused here...
    Edited by: [email protected] on Jan 25, 2010 4:04 PM

    Yes, a small subset of the EPSG SRIDs had this problem in 10gR2. OGC SRIDs were not affected. The value in 11g is correct, based on the EPSG data.

  • Wrong sampling rate from Sound Input Read VI on Dell Latitude E6510

    Hi,
    When I
    receive data from the sound card with the Sound Input Read VI, the actual
    sampling rate is not equal to the sampling rate set in the Sound Input
    Configure VI. I estimate the sampling ratio by dividing the number of samples received
    by the difference between the first and the last t0 from Sound Input Read. For
    example, if the sampling rate is set to 7000 S/s, the actual sampling rate is
    around 6900 S/s. If the sampling rate is set to 7050 S/s, the actual sampling
    rate is around 7200.
    This problem appears when the
    code is run on my Dell Latitude E6510 machine. When I run the
    same code on my Lenovo ThinkPad, the sampling rate is correct.
    The Labview application I
    am developing is to be used to acquire data synchronously from several sources,
    including the sound card input. It is therefore important that the sampling rate
    is correct.
    If anybody has any idea
    about what may cause this problem, and a way to fix it, I would be grateful.
    Ole

    It has been a trend the last years that sound card only support some sampling rates, not a range. You should refer to your sound card manual for this kind of information.  You should also be aware of that the NI sound interface is junk, and they do care about it either. Use the WaveIO interface instead See the link. But I am quite sure your problem is related to the sound card hardware not some NI driver issue
    http://www.zeitnitz.de/Christian/waveio
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • How to read data from analog input and export it to a file using Components Works

    I've made a simple application (Delphi 5 using the activeX) that read data from analog input channel 0. After I read the data, I want to export it to a file using the Components Works on a 6035E NIDAQ. (I'm not using labview and don't want to use it)
    How can I do that???
    Regards,
    Francis

    Here's a sample code to do this...
    P.S.: If you read only one channel this code won't work.
    function MyFunction: Integer;
    var
    Low, High, i, j, ChannelCount, RowCount: Integer;
    Po: P;
    begin
    //you are reading multiple channel
    ChannelCount := VarArrayHighBound(Buffer, 1);
    RowCount := VarArrayHighBound(Buffer, 2);
    for i := 0 to ChannelCount do begin
    for j := 0 to RowCount do begin
    WriteToDisk(Buffer[i, j]));
    end;
    end;
    end;

  • Acquiring a waveform from the input channel

    Hi, while I am trying to acquire teh waveform from the input channel,
    it is not showing up in Labview "waveform graph", but the same
    waveform is seen on the oscilloscope. I am using NI PCI 6052-E DAQ
    board.

    Greetings Amu,
    How have you configured the PCI-6025E? Is it configured for
    differential readings or single-ended readings?
    By default, the configuration of the device will be differential,
    which means that two input channels are used for every input signal.
    When configured in differential mode, you need to connect the positive
    terminal of the signal to channel X and the negative terminal of the
    signal to channel X+8. For reading a differential signal from channel
    0, you will connect the positive terminal of the signal to channel 0
    (pin 68) and the negative terminal of the signal to channel 8 (pin
    34).
    I would suggest to use the Measurement and Automation Explorer (MAX)
    software to test the signal before going to LabVIEW. Open MAX and go
    to the devices and i
    nterfaces folder. The PCI-6052E should be located
    in this folder. Right-click on the PCI-6052E and select test panels
    and you will be able to test the input signal here. You can change
    the mode to continuous and set an sampling rate in the test panels as
    well.
    Once you can view the signal in the test panel of MAX then I would
    suggest to move to LabVIEW. Search for the shipping example entitled
    'Cont Acq&Chart (buffered) VI' which is a continuous analog input
    example. Select the device number, channel number, and scan rate and
    run the VI.
    For more information on connecting your signals to the PCI-6052E I
    would suggest to refer to chapter 4 of the user manual. I've linked
    it below for your reference.
    NI 6052E User Manual
    http://digital.ni.com/manuals.nsf/webAdvsearch/552436964E347DAF86256BDE00670E9B?OpenDocument&vid=niwc&node=132100_US
    I hope this helps.
    Let me know if you have any additional questions regarding this issue.
    Regards,
    Todd D.
    NI Applications Engineer

  • How to send values from Acquire Input data through Xbee

    Hi,
    I've initialzed my joypad- Zebronics ZEBST50JP and can read data from Acquire Input Data. I've seen that button work with Boolean Logic(True or False) and Arrow keys work with axis logic(32767 to -32768).
    Now all i need to know is, How to send these values through Xbee(Connected to PC using USB Adapter) to another Xbee connected to an Arduino (with Servo motors)
    Thanks in Advance

    Now i have Intialized my joystick.. But still have confusion with sending to XBee Pro...
    Here is my Post, which has the file
    http://forums.ni.com/t5/LabVIEW/How-to-send-signals-through-XBee-connected-in-USB-port/m-p/2135382 

  • Output gain adjustment factor from DAQmx Perform Shunt Calibration (strain).vi

    Hi
    We are using the DAQmx Perform Shunt Calibration (strain).vi to apply a gain adjustment to the output of our strain gauges. We would like to view the Gain Adjustment applied by the DAQmx Perform Shunt Calibration (strain).vi, and we have tried to do this using a property node.
    I have attached screenshots of the property node we included before the DAQmx Perform Shunt Calibration (strain).vi (which seems to work fine), and the property node we have included after the DAQmx Perform Shunt Calibration (strain).vi (which doesn't output anything).
    Could someone please advise of what I am doing wrong, or if ouputting the Gain Adjustment applied by the DAQmx Perform Shunt Calibration (strain).vi is even possible?
    Cheers
    Bart Scicchitano
    (using his supervisors NI account with her permission)
    Attachments:
    ShuntCal_GainAdjustFactor_Before.PNG ‏29 KB
    ShuntCal_GainAdjustFactor_After.PNG ‏45 KB

    Hello, thank you for your response.
    Sorry I wasn't clear. We get 0 from the property node when using multiple gauges in series. We have since found that the property node works when outputting the gain adjustment factor from only a single gauge, but we still cannot get it to work for multiple gauges in series.
    I have posed the question in a more clear fashion (I hope) in the Labview forum (link below)
    http://forums.ni.com/t5/LabVIEW/How-to-get-gain-adjust-from-multiple-strain-gauges/m-p/2304956/highl...
    Thank you again for your response
    Bart

  • Labviewcode wanted to count pulses from analog input

    Can somebody help me with the following problem?
    I don't have a Data Aquisition board so I use my steppermotor controller, the MID-7604, and it's analog input to read from a
    sensor (photointerrupter) which outputs 0 or +5 Volts. I want to count how many times an output of 5 Volts appears.
    The problem is that the signal is not a Waveform, so  the Daq functions in Labview won't work. I've tried to generate a waveform
    from the signal but also no results.
    What I have created now is a counter which counts every signal above an adjusted value. The problem is that it counts on and on
    when the signal is above the value, I want it to count one time. (like a trigger which detect a low to high level signal)
    In the attachment you see that program and an other I've found (event counter) doing what I want, but I haven't been able to transform it in to
    my own problem. Please help me on this because I'm stuck right now.
    Thanks in advance
    Message Edited by Trabuca on 07-04-2005 02:56 AM
    Attachments:
    monitor ain pulses with display.vi ‏31 KB
    Event_Counter.vi ‏39 KB

    Hi,
    there are some ways - one is using a shift-register.
    Attached is a flank detector - each time "Boolean" changes from 0 to 1 or 1 to 0 the count is increased by one.
    I hope that helps
    Greez
    Stefan
    Message Edited by mycroft on 07-05-2005 06:41 AM
    Message Edited by mycroft on 07-05-2005 06:41 AM
    Attachments:
    Change detector_LV.GIF ‏9 KB

  • How to pass the data from a input table to RFC data service?

    Hi,
    I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
    I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
    Thanks for your answer.

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

Maybe you are looking for

  • Flash Builder will not debug app with .ane on Android Device

    Hello , I'm having a big issue with the overall stability of Flash Builder 4.7 on my Mac (OS X 10.7.5) I developped an extension on FB 4.6 for iOS and Android and it was  working good. In the meantime I updated to 4.7, and since then I keep on runnin

  • IPhone 5 battery quickly losing charge after updating to ios 7.0.4

    Just upgraded my iPhone 5 to the iOS 7 v and immediately started seeing the battery losing power. Has to be the upgrade. I old go evn 2 days before without recharging but now I have to recharge at least twice a day. What's up with this?

  • PDF modified while opened in preview

    Here is a weird behavior (bug) for 10.6. When a pdf file is modified outside while it is opened in Preview, now Preview automatically shows the first page. (The behavior for Leopard was showing the updated pdf in the current page.) This new behavior

  • Service error 31 28

    when i turn on my iphone 5, in the screen says service error - 31 28, whats that?, how can i resolve that?

  • Search feature not finding all correct results

    Hi Everyone. Need some help please. I have just edited my sons soccer game. I have marked all 10 goals as favourites and added goal as a keyword for each goal. I now want to search all goals. I click in the in the little search box at the top of the