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

Similar Messages

  • Is there a way to acquire a set number of points from multiple channels?

    I had set up a VI to use AI ONE POINT.VI for multiple channels. Getting one data point for me is useless. I need, say, 100 data points from multiple channels at once. Is there a way to do that? Is there an example program I'm not seeing that already does that?
    Thanks!
    p.s. I have Labview 6.1

    Hello,
    Thank you for contacting National Instruments.
    As Dennis had mentioned, there are many example programs that ship with LabVIEW that demonstrate how to take measurements from multiple channels with either a finite or continuous amount of data to be acquired. In LabVIEW 6.1 you can find these examples by going to Help >> Find Examples >> Hardware Input and Output >> DAQ >> Analog Input >> General.
    In these examples, if you would like to sample multiple channels, you simply need to add the physical channels separated by a comma for example: 1,3,5 would sample channels one, three, and five. You can also use a colon to sample a sequence of channels for example: 4:6 would sample channels four, five, and six. This makes it easy for you to choose the chann
    els that you would like to sample without having to make any modifications to your code.
    Regards,
    Bill B.
    Applications Engineer
    National Instruments

  • Data acquisition from multiple channels.

    Hello
    Right now, I am able to acquire the signal from a single load cell and display it.But I would like to know of how to acquire  acquire signals from two load cells simultaneously.I am using Labview 6i and I am using AI S-Scan with AI config to acquire the waveform.It would be of great help if you could suggest a simple method to acquire the signals.
    PS: Please find the attached file used for acquisition from a single load cell.
    Looking forward for your reply.
    Manasa
    Attachments:
    test 4.vi ‏102 KB

    Hi Manasa,
    If I understand what you are trying to do, it is relatively
    straightforward to configure your application to acquire data on two channels.
    I was unable to run your vi as it was missing some of the subVI’s
    from your application.  However, your
    attachment was sufficient to see what you are trying to do. 
    Here is how to add channels:
    1.      
    In the I/O Channel Constant, you can add
    additional channels by using a comma or a semi-colon.  For example, to scan the first four channels
    you would put 0:3 in the constant (see attached screenshot ChannelConfig.jpg).  To scan the first and third channel you would
    put 0,2.
    2.      
    The AI Single Scan VI will now read from
    multiple channels.  Often it easiest to
    configure the output of this VI for viewing by first putting the data into an
    array using the Build Array VI.  It can
    then be plotted in a waveform graph. (see attached screenshot ReadtoGraph.jpg
    and WaveFormGraph.jpg)
    Just a few notes about “simultaneous” sampling:
    Most of the NI data acquisition cards have a multiplexer
    between the various input channels and the Analog to Digital (A/D) converter
    creating a very small delay between each channel (usually ms range or
    smaller).  NI does make several data acquisition
    cards that can perform true simultaneous sampling, meaning that there is an A/D
    converter for each channel.
    For the large majority of applications, the small delay
    between channels is negligible.
    Jared T.
    Attachments:
    ReadtoGraph.JPG ‏21 KB
    ChannelConfig.JPG ‏288 KB
    WaveFromChart.JPG ‏61 KB

  • Displaying real-time data using gui meter from multiple channels.

    I am using DAQ USB-6009 for my assignment. Part of my task is to display real-data from multiple channels in the form of gui meters.  eg. irradiance and voltage...
    I used a split signal to separate the signals from different channels coming out of the data output terminal of the DAQ assistant. The problem is that I do not know which vi to connect in between the split signal and the gui meter. I am looking for one vi that is capable of handling signals (measurement)  and outputting the data to the gui meters simultaneously and individually based on the channel they are coming from.

    Thnx for your tip, Dennis.
    However, I have another problem that just occurred to me when my VI manages to execute as I wanted.
    I noticed that the needle on my gui meter will only "appears" to be responding to every changes to its input when I have set it to run continuously and the only way to stop it is via abortion which might leave the resources (eg. external hardware) in unknown state. Is there any safer and workable ways to organise the VIs using while loop?
    I have placed my DAQ assistant, write to measurement file (vi), add function, split signal and gui meters all in 1 single while loop.
        DAQ-------> write to measurement file
                 |
                 |                                                 ​                   |--------------------------------> add function----> gui meters
                 ---------------------------------------------> split signals ---|--------------------------------> add function----> gui meters
                                                      ​                                |--------------------------------> add function----> gui meters
    If I do the following steps,
    1. press run continuously to start the VI
    2. click the same button to disable continuous run when the VI has completed its task.
    3. click the stop button in the front panel to stop the while loop
    Does doing these steps ensure that I will not leave resources in unknown state? Is it a safer way to stop a VI which is running continuously?
    Pardon me for I am new to LabView. Even though, I have read the user's
    manual and tried out all the execises, there are some concepts that I
    need clarification on and mistakes that I need to discover through more hands-on.

  • Multiple input limit range from multiple channels

    Hallo I´m kinda new to LabView and need some information,
    I use a Multifunction DAQ 16 Bit with the following specifications:
    1. M-Series
    2. NI PCI 6250
    3. Operated by Microsoft XP
    My problem:
    * I would like to use 4 analog input channels from my M-Device to measure 4 diffrenttypes of voltage. The resolution from each channels varying from +/-10, +/-5, +/-1, etc (those are the possible range if i dont misunderstood the Data sheet from NI). I have tried to use a daqmx create task in a For-Loop so that vi runs only 1 input limit for 4 times and then put all the signals in the daqmx create channels.
    The vi does execute the measurement but I dont get the right scale that I want.
    Thanx for the info
    Message Edited by Piiwee on 11-29-2005 08:40 AM

    Hi Piiwee,
    You are doing just great with your English.
    I got an idea as to what your problem is.
    Just Have a look at attached VI.
    it should solve your problem.
    I have used chart instead of graph
    I have stacked the 4 plots one over other and auto scaled each(  you can also set scale of each graph by going to properties)
    Hope this helps
    Regards
    Dev
    Attachments:
    DAQ channel acq_chart.vi ‏85 KB

  • Acquire sensor input from FPGA using multiple loops/

    Hi,
    I have a sbRIO and I am acquiring inputs from ultrasonic, temperature sensor and pressure sensor in a same while loop. When these inputs go to the RT for processing, only one sensor value changes i.e FPGA is only fetching input from one of these sensors. 
    Should I use parallel loops i.e. acquire each input in a separate loop? If yes, should I be concerned about timings for each loop?
    Regards.

    You don't have to use different loops unless you need the data at different rate. Please show the code how you are acquiring the data and passing it to the RT (A clear snippet or image is good enough).
    The best solution is the one you find it by yourself

  • Reading multiple channels in labview with 6062 e series dac card

    To whom ever can help,
    I have the e series dac card 6062 pcmcia as well as labview 7.1. I am trying to setup a program just to continuously read all of the analog channels and display them on the front panel via meters. I have setup
    one channel quite easy but after setting the others up the only one that actually works is ai0, the others
    don't seem to want to communicate.
    with thanks
    Nathan

    Hi sag666,
    By "don't seem to want to communicate", do you mean that no signals are acquired after selecting the specific channel or the string as suggested by zenith (ai0:15)? To first verify that all channels are working properly, try using the Test Panel in Measurement and Automation Explorer (MAX). When you enter the Dev1/ai0:7, you should acquire readings from the first 8 channels. If you can acquire proper signals from here, try running an example in LabVIEW 7.1 (e.g. Help >> Find Examples, then in browse tab, Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage >> Acq&Graph - Int Clk.vi). Setting the channels in differential mode, you should be able to acqurie signals from Dev1/ai0:7 (Assuming the card is device 1).
    Thanks,
    Lesley Y.

  • Can I read more than 2 analog inputs from myDAQ?

    Hello, 
    I am trying to read 3 voltage values. However, the myDAQ only has 2 analog inputs.
    There are multi-meter ports in the myDAQ as well. Could I read the 3rd value via this port?
    How would I read these values via the DAQ assit on labVIEW?
    Thanks in advance. 
    Yzhi 

    Hello Yzhi,
    You can acquire from the DMM and the analog inputs using two parallel tasks. The simplest way is to configure one DAQ Assistant for the AI channels, and another DAQ Assistant for the DMM channel. Be aware that the DMM is a software-timed single-point measurement (no hardware waveform acquisition), so you can't tightly synchronize the DMM with the Analog Inputs.
    Here is a screenshot demonstrating how to acquire from all three channels. You could also run the DMM in a separate loop so it doesn't slow down AI.
    Good luck and let us know if you have any other questions.
    Charles Y.
    National Instruments
    Attachments:
    myDAQ acquire two AI and DMM.jpg ‏196 KB

  • How to Read from multiple channels

    Dear Sir
    I am acquiring data using FP-RTD-122 using OPC Client software. I ahve made one socket for that and i am using command
    CWDataSocket1.AccessMode = cwdsReadAutoUpdate
    CWDataSocket1.URL = "opc://localhost/National Instruments.OPCFieldPoint/FP Res\FP-RTD-122 @1\Channel 0"
    CWDataSocket1.Connect
    v = CWDataSocket1.Data.Value
    where v is a variant type.But this is 8-channel RTD so how can i read values from all channels using single socket connection Because at presnt i have to use 8 sockets for all eight channels.

    At least as of FieldPoint 4.0 and earlier (I do not know about 4.0.1 or later), the OPC Server did not support multiple channel analog items. Thus to read all eight channels of a FP-RTD-122 module, you would need 8 separate socket connections. For discrete modules (boolean), the "All" tag, is treated as a single 8 or 16 bit number.
    Regards,
    Aaron

  • I am getting a -50101 error when trying to get analog input from a compact rio

    I am just doing the initial setup of my compactRIO system and have been able to successfully add the cRio in Max and then into a new project.  I created a very simple VI with analog input that I am trying to read into an indicator, following one of teh tutorials.  The module I am reading the input from is a cRio-9201.  The input is voltage.  I have already added the module to teh project under the FPGA, which is under the RIO in the project tree.  Any ideas what I may be missing would be greatly appreciated!
    Thanks

    The 9201 C Series module needs to be created under the FPGA Target
    (cRIO-910x) in the LabVIEW Project. You can either discover the module
    or create it by type. In case you haven't created the FPGA Target
    (cRIO-910x) under the cRIO Controller (cRIO-900x), you must do that
    first. You also have the option of discovering the cRIO-910x or to
    create it by type. I suggest you do it through discovery, so you don't
    need to manually configure the addresses.
    As how to create the items, that's done through right-click on the
    cRIO-900x and select New>>Targets and Devices.... It will pop up
    a dialog in which you expand FPGA Target and it will discover the FPGA
    Target. Similar steps are followed to create the 9201 module.
    If you don't see the FPGA Target and C Series module options, then you
    need to make sure NI-RIO 2.0 is installed in you computer.
    JMota

  • How to enable 2 or more analog input pin in arduino uno labview simultaneo​usly for voltage analysis?

    Hi everyone,
    i am new to labview and using arduino uno board for measuring microwave analysis in my project. i want to measure the refflection coefficient by dividing two analog input received to arduino (Vref and Vin) to obtain so. problems come where i just can analyze only one analog input pin only. please, kindly helped to figure it out.i've try the others solution where i create two while loops for different analog pin. u can refer to my circuit in the attachment below.i really2 appreciate ur help, thank you.=)
    Attachments:
    reflection coefficient and Vswr.vi ‏665 KB
    front panel.PNG ‏66 KB
    block diagram.PNG ‏40 KB

    Try this if you have a POT around hook it up to the arduino than use the AnalogInSerial.pde and  load it to your arduino exit out of the arduino platform and  than try my VI see if this helps you.
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Attachments:
    TalkToArduino.vi ‏28 KB

  • Acquiring thermocouple data from mutliple channel

    Hi,
    I am developping a temperature measurement data acquisition application (Using the NI-9211). I already managed to acquire data from one channel at a time and plot in on a graph.
    But my final system should allow the user to select from how many channels they want to acquire data, up to  4 channels at the same time. (the NI-9211 got 4 channels).
    Any hint or help on how to do that would be greatly appreciated.
    Thank you

    I tried using the Property Node -> Node name, but with no luck (Can't figure out how to use it properly).
    I included a picture showing how I want my interface to look like. The
    user chooses which channel by checking its corresponding box and the
    graph will only display those checked.
    What is the easiest way to implement it?
    Thanks for your help.
    Attachments:
    Interface.JPG ‏41 KB

  • Error when running VI to acquire data from multiple channels

    Hello there, I am currently trying to write a LabVIEW program interfacing with the Agilent 34970A data acquisition unit. Have managed to get seperate VIs to acquire temperature and voltage data and to graph the data. Running them separately is fine.
    However when I try run one after the other, (ie, run temperature acquisition VI, then voltage acquisition VI; or vice versa) the first one runs OK, but upon trying to run the second one I get a VISA error along the lines of "VISA write". When I try to run the first VI again, that one fails to acquire readings as well. Any way I can rectify this problem? (Want to combine the VI's into a single program.) Thanks!

    Hi Laeral:
    You should be able to just open one VISA session then write and read both commands then close the session at the end. This sounds to me like an error that comes from trying to open two VISA sessions to the instrument at the same time. I have attached some very basic LabVIEW VISA code that writes and reads two different commands. Hopefully it will get you started.
    Regards,
    Emilie S.
    Applications Engineer
    National Instruments
    Attachments:
    Basic VISA Example Two Commands.vi ‏39 KB

  • Ni 6008 acquiring digital inputs from an absolute encoder.

    Hi, i'm a student working on my master thesis.
    I'm trying to acquire 9 digital channels from a 9bit absolute encoder on the NI-USB 6008 but i'm encountering the following problem.
    I'm powering the encoder trough the 0V (GND) and +5V ports on the NI-USB 6008, and if i read the digital outputs directly from the pins
    of the encoder with a tester, without connecting them to the NI-USB 6008, i see +5V or 0V with respect to GND.
    If then i wire the outputs of the encoder to the NI-USB 6008 digital ports, the readings of the tester,  are 5V or 3.6V with respect to GND, so basically
    when i try to acquire the signals with Labview, they never switch to logic low.
    I'm a doing something wrong or is it a problem with the NI-USB 6008?
    Thank you for the help.

    Hi,
    It seems that NI-USB 6008 works well and that the encoder is not able to force low the digital output signal.
    I think that this problem could have different explanations:
    - the encoder needs a pull down resistor in order to work properly
    - the encoder try to force low the digital port while the 6008 is forcing high the same port
    - the encoder is damaged
    Try to take a look at the encoder manual in order to see if the encoder needs some additional circuitry to work properly.
    Alex

  • High CPU usage during 15 acquiring analog input and write to file (suggestion needed)

    Helllo everybody,
          I have a problem about the usage of CPU now i am using a realtime target (PXI-8186) with Daq (PXI-6259) to get 15 analog signals at the rate of 10kHz
    at first i try to get signal at different rate but i found out that all of the channels share the same clock so i get the highest frequency that i desired  after that i do 
    some data manipulation with displaying charts  and use shift register to stack data in array of string  finally i write the data to spreadsheet every  5 second, by doing this the CPU usage
    is always 100% and reduce by the time the file is recordedto 71% or so and then start to increase to 100% again. I think  the things that make CPU usage too high are
    1. Time loop: because i set the period to be 10ms maybe this is too low.
    2. The shift registered: may be it use too much overhead memory but i do not know other method to stack data before writing to a file 
    3. RAM too low: The RAM of PXI is only 256mb
    4. Poor program arrangement: Because i am new to labview the program is not arranging correctly or i may use some inappropriate structure.
    My program is very messy sorry about it because i avoid using SubVI and i am new to labview. Please help any suggestion is apperciated. Thanks in advance.
    Best regard
    Wuttikrai
    Attachments:
    target save.vi ‏328 KB

    It looks like you are writing your data to disk every so often.  For that reason, I recommend making it based on the number of samples you have instead of the time.  With that you can preallocate your arrays with constants going into the shift registers.  You then use Replace Array Subset to update your arrays.  When you write to the file, make sure you go back to overwriting the beginning of your array.  This will greatly reduce the amount of time you spend reallocating memory and will reduce your memory usage.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for

  • How do I have multiple Facebook accounts on my iPad?

    Hi, I'm a new iPad user and I'm wondering whether we can have more than one Facebook account on the device?

  • I synced my iphone too my computer and I got all my husbands info and lost all mine how can I get my info back.

    I synced my iphone too my laptop and got all my husbands info and lost mine how can I get my info back off this laptop.

  • Menus are dissapearing

    When I click on "Firefox" orange button Top Left Corner of the program, The Menu disappears. Not just that menu but all menus. right click anything the popup menu disappears. Click on the bookmark tab and the popup menu disappears. I was hoping this

  • Internet & BB Services

    New Blackberry owner here Bought a Curve 3G from Amazon unlocked and then a Tesco SIM contract with a data but have since had confirmation from Tesco that this SIM contract does not support BB services so I need to upgrade by another £5 a month.  Not

  • What is going on with lib32-nvidia-utils

    the lib32-nvidia-utils package has been downgraded from 180.29 to 173.14.18 also there are 2 new packages now : lib32-nvidia-utils-180.29-3 and lib32-nvidia-utils-173.14.18-1 It's quite messy. Also 173.14.18 doesn't have corresponding nvidia and nvid