How do i expand my labview program to read 8 analog inputs?

I am an electronic tech learning labview, The program I developed drives a solenoid high for three seconds, takes an analog reading, and then goes low and takes another reading.
Program seems to work well. I would like to expand it to drive 4 solenoids and read 4 analog channels. Any sugggestions on how to create multiple instances and info on other design implementations would be appreciated. Thanks in advance. I have attached vi.
JohnG.
Attachments:
write_and_read Dig Port9b.vi ‏40 KB

You can define multiple channels in your DaqMX controls.  In your write and read statements, you change them from 1 channel to N channels.  You will need to send in an array on the Write Booleans, and the output of the Read Analog will also be an array.

Similar Messages

  • How can i do with labview program,when i have 20 different values,and 1 want to add it with constant value.and how to get the results?

    how can i do with labview program,when i have   20 different values,and 1 want to add it with constant value.and how to get the results?

    Why do the 20 values have to be different? The same code should work even if some are equal.
    What do you mean by "get the result"? The result is available at the output terminal and all you need is a wire to get it where you need it. That could be an indicator, another operation, or even a hardware device.
    What is the data type of the 20 values? An array? A cluster? A bunch of scalars? A waveform? Dynamic data?
    LabVIEW Champion . Do more with less code and in less time .

  • How to read 2 analog inputs with VISA

    Hello everyone! I want to read two analog inputs using VISA serial communication from the arduino.  I'm currently able to read one of the input but how do I read two analog inputs on labview?

    Hi lamela,
    again I have to ask: HOW does the string look like? Is it so hard to provide an exact example of your received string???
    I think the string is showing one value from the two inputs
    Are you sure or are you guessing? How can we tell what you might "think" when you aren't able to provide examples?
    You wrote you send values from the Arduino using the command "println(value1, value2)", but now you "think" you only receive ""value1" in LabVIEW?
    Get your data communications clear! (And learn to provide meaningful examples!)
    Edit after your edit:
    my code to serial print two inputs: Serial.println(Voltage, Current);
    Even if I print separately: Serial.println(Voltage);
                                                 Serial.println(Current);
    The first command is completely different then the second part! In the first you should receive two values in one line, in the 2nd one you receive one value per line: You need to adapt your string parsing to these strings!
    Again: send both values in one line. Use the LF as termchar. Separate the values by some separator char like comma. Check the received string for validity. Use some error checking in your VI.

  • How do I make a labVIEW program for a linear CCD camera?

    Hi, I'm pretty new at LabVIEW and I'm having a hard time figuring out how to connect my linear CCD image sensor (Toshiba TCD1304AP) with my computer. I know I need a DAQ device, what would work best for this particular CCD? After I got that connected, I need to create a LabVIEW program that displays the light detected by my CCD. Does anyone have a similar program or template I can use as a model? Any help would be appreciated. Thanks.

    Hello,
    I'm not sure the type of signal that is generated as an input to a DAQ device. This could either be an analog or digital input. The signal type will determine how you make your program in LabVIEW. You will also need to correlate the signal level to the light detected. That will be determined by your sensor. I don't have any programs or templates for this, but if you look at the basic analog or digital input examples, you might get a good starting point for DAQ device programming.
    -Zach
    Certified LabVIEW Developer

  • How to use Digital output to turn on sensor for Analog Input?

    I am trying to use a digital output to turn on an array of sensors that I then wish to read on 16 analog input lines. I have a 6024E DAQ card. I am planning to take data at 10-20 hz, so not terribly fast, but I will be acquiring for long periods of time (days) so I will be streaming data to disk.
    I have a fair bit of experience in Labview basics, but can quickly get out of my depth when I try something new (like this). I have V6.01.
    It looks as though the best way might be to do the DO and then a single AI as individual events, then write to disk and continue through the loop. I am puzzled, however, how to keep this cycle on schedule given that I don't know how long it will take to sample 16 channels
    , write the data to disk and get back to the starting point... perhaps this is so fast that I don't need to worry about it? The actual timing of the samples (be it 10 or 20 hz) isn't too critical, as long as I can record at what time they were taken... it would be frustrating to find that I was several seconds off after days of data.

    Hello,
    Thank you for contacting National Instruments.
    If you are worried about the time of your acquisition being off, then you should associate each voltage measurement with a timestamp. This will allow you to know the exact time at which the sample was taken and you will never be off. You can use the Get Date/Time in Seconds.vi in our while loop with your AI code so that you can read a sample and read the time. You can than log the voltage value and the timestamp to your file.
    Regards,
    Bill B
    Applications Engineer
    National Instruments

  • How can I lock the Labview program in runing mode?

    Hello
    I want lock my program in running mode. can you help me to know how it is possible?
    when we design a program for a user, maybe a child or ane person change the program or stop it, or change the value like an array. is it possible to lock the progran in running mode?
    thank you
    Best Regards

    behzad1 wrote:
    Hello
    I want lock my program in running mode. can you help me to know how it is possible?
    when we design a program for a user, maybe a child or ane person change the program or stop it, or change the value like an array. is it possible to lock the progran in running mode?
    thank you
    Best Regards
    I have attached a primitive example, it should give you some idea, maybe it helps. Of course i put it together quick, so the style is not nice
    The password is a string, visible on the block diagram, so password protect the block diagram via the "VI properties". Also, change the "Window appearance" to custom, where the closing "cross" is disabled ("Allow user to close window"), and you also hide the abort/pause buttons...
    Of course if you build an exe, the story is different...
    These steps should give a minimal protection against children and evil colleagues 
    Attachments:
    lock_unlock_FP.vi ‏42 KB

  • I am obtaining a new computer.  How do I install my Adobe programs -Adobe reader 5 and Adobe Acrobat

    5.?

    On a new computer you would install the current version of Adobe Reader (XI), though in many cases it'll be installed already. Nobody should be using an out-of-date version of Adobe Reader, it's a massive security risk.
    Acrobat can possibly be installed from your original media, but it depends on how old it is. Version 5 for example will not cope with modern operating systems, and the activation systems for old versions of Adobe software get shut down after a while.

  • Is there any Labview program to read pusle width or jitter on Agilent54622d

    I want to test the real width a clock signal by Labview6.1/Agilent54622d/GPIB-USB-B. Is there any way to control the oscilloscope to the state i required and get the result?
    Thanks.

    Hi,
    I am not familiar with your instrument, but is this a functionality that is built into the scope? You may consult the manual for more information on the function you are looking for. There is a driver already created for the IVI driver that can be found in our insturment driver library at www.ni.com/idnet.
    Hope this helps out.
    Best Regards,
    Aaron K.
    Application Engineer
    National Instruments

  • How to build a current loop with cFP-1808 and analog input module AI-110?

    I am trying to build a current loop to measure temperature via and a resistance thermometer a transmitter that converts the signal to current. I am using cFP-1808 with the power supply PS-5 directly connected to it.
    For the current measurement I am using AI-110 but I am having trouble with getting current in my loop. I have looked in he manual of the AI-110 module and am using the set up for a "loop with an external power supply", counting the PS-5 as external. That is to say, I have connected the negative transmitter terminal to Vsup on the AI-110, and the positive side to Vin. Now, however, I am stuck. I don't get any signal in my loop.
    Can I use the PS-5 to power my AI-110 module or do I need to use another external power supply? In this case, how do I connect this?
    Thanks for any help!

    Clara G:
    I overlooked that in your 1st post you were connecting the other end of the transmitter to Vin, you actually need to connect it to Iin on the AI-110.
    Regarding the use of the PS-5 to power the cFp and supply power to the loop, I do not know if that will work or not.
    Suggest that you switch over to Iin terminal and use the separate 24V supply to power the loop. If that works, them maybe try the PS-5 for both the cFP and loop power.
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • How do I get audio output from a labview program

    We are modifying an existing labview program that reads data from a BNC-2140 DSA and displays as a graph. We want to be able to stream audio in audible range instead of a graphical display. Is there a VI available that can create audio? If not, how can I go about creating one?
    Thank you

    Hey Lost-
    There is a wonderful document on our external website that groups our knowledge on using sound with LabVIEW.
    Under the LabVIEW Resource Library (http://zone.ni.com/libraries/) choose -> LabVIEW -> Advanced Programming Techniques -> Using Sound.
    This page lists over 5 examples for playing sounds with LabVIEW through WAV, MP3, and other formats. Streaming audio might be tough, depending on your processor. It might be hard to translate your input into a format LabVIEW can play. I am not sure what sound format that input data you refer to would be. This will be a good starting point. Also, I have heard of a Microsoft ActiveX control, DirectShow, that might help you. I have not worked with this guy, but I would check into it at Microsoft's site -> www.msdn.
    microsoft.com.
    Post again if you have follow-up questions.
    ben schulte
    national instruments

  • Connecting hardware(c​onnected to myDAQ) to my labview program

    Hi,
    I have a labview program that will send an email (Gmail) when you click the " Button " in the program but 
    i need to modify it so that when i press a switch button at my hardware(connected to myDAQ)  the email will be sent ; meaning to replace the " Button " with my hardware 's switch button.
    Consulted with my lecturer and she says something like inputing logic 1 into the mydaq/labview to run the process.
    I have attached my program below.
    Any help is greatly appreciated!
    *I'm using NI LabVIEW 2013 SP1 (32-bit)
    P.S : i know this is the 2nd thread i created but i'm not sure how to close that one(i have already selected a solution) 
    Attachments:
    Basic Sending email program.vi ‏341 KB

    In order to use your signal input instead of your button, you need to read in the signal as a boolean. Digital inputs are already in the form of booleans (just like how your digital outs are set up), but if you are pulling in the trigger through your analog inputs, you'll just have to add some threshold logic to convert from an analog value to a boolean.
    If you have digital inputs, just set it up the same way you have that DAQ Assistant in there already reading in analog inputs and wire the boolean trigger to the same case structure as your button.
    Your teacher probably means channel 1 is your trigger input when she says "logic 1". This just means if you're pulling in multiple channels, that you use channel 1 as your trigger (which is actually the second channel becauce indices in LabVIEW are base zero).
    Actually, after thinking about it, maybe your teacher is pointing out that you need to add logic to read in a value of 1 as True? This makes me think you're reading an analog input as your trigger and you need to use logic so that a value of 1 is True.
    James
    LabVIEW Professional 2014

  • Having a major problem with LabVIEW programming

    I have been a faithful supporter of National Instruments hardware and software since 1997. During that time I have worked in academic laboratories using NIDAQ boards and LabVIEW for basic and applied biomedical research. To date, all my work has revolved around using the amazing analytical capabilities of LabVIEW for on- and off-line processing of analog input signals. I have not been involved in the programming of multifunction input/output vis.
    Now I am at a point where I am ready to construct and design experiments that require what I suspect are some very basic multi-function DAQ capabilities.
    But I am having very little success after several weeks of concerted efforts. Each attempt is partially successful, but fails to address the exact components I need.
    For example, my most urgent need is to read an analog input channel set, and stream it to disk. I would like one channel to trigger a single TTL-like pulse based on a known, period signal. But, I absolutely need an accurate, user adjustable (not necessarily on the fly) delay from when the trigger is received to when the pulse is delivered. What I have so far is a combination AI-CO vi that outputs a perfect CO-driven pulse. It is phase-locked to the periodic signal, but I cannot adjust the delay; the 'inital delay' input to the CO channel does not reset when the trigger is set to 'retriggerable.'
    I would like to stay with hardware timing, but I'm not sure I need to. If I go the software timing route, I don't think I have the skill/ability to make a stable vi.
    I have extensively searched, used, modified, and tried almost all of the DAQmx example vis, and extensively searched the NI website and discussion forum. This has been very successful, and I have learned from these, and incorporated them into my vis.
    Specifics of my set-up are: PCI 6023E, Labview 7.0 express (Full), Nidaq 7.3.
    My question is this: is there an enthusiast, or NI guru that would be interested in corresponding with me to help me solve some of these problems? I am a resident physician with only a limited amount of time to construct a successful project. I absolutely know LabVIEW can do what I want, but clearly I can't make happen without some help. For an expert what has taken me several weeks can probably be optimized in a very short while.
    I am available to correspond by phone or email. If anyone is interested, I can post or email code. Thank you very much, matt ([email protected]).

    Dear Matt,
    Thank you again for contacting National Instruments.
    You are correct to notice the initial delay will not reset. It is not meant for that purpose. So I've been working on a workaround for you.
    I believe you'll need to implement a new counter. This counter will be triggered by your current trigger, counts down for a certain amount of time, and when it reaches the terminal count, outputs a pulse you can use to trigger the other counter.
    There are a few difficulties in making this work. The count down must be reset every time you trigger. Also, the count down must only occur for a finite amount of time, otherwise multiple triggers will be fired when the count reaches the terminal count. Therefore, creating a pause trigger to activate the
    first counter is the way to go.
    Using a pause trigger, the count down will occur whenever the trigger is high, and will cease to execute when the trigger goes low. If we put this count down mechanism in a continuous while loop so that it is reset every time the pause trigger executes, you will be able to specify an exact delay (due to specifying how long to count down).
    Then, we just use the counter internal output - that is set high whenever the terminal count is reached - as our second trigger to execute what you already have.
    I've included an example. In this example, it shows the idea behind what we're trying to do, but it isn't right yet. There is a conflict in routing I still have find a workaround for. I think if we route one of the counter outputs externally, and then back in, it may work. Both parts of this program work separately (for example, the triggering off the counter output, that you also set up, works correctly, and the countdown triggered off a different d
    igital pause trigger, also works correctly).
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments
    Attachments:
    retriggerable_analog_input_with_delay.vi ‏189 KB

  • How to convert double to unsigned long integer for cRIO analog output?

    All,
    Having issues sending out my arbitrary waveform to my cRIO analog output. My values are doubles and by the time I send them out, they have been converted to U32 values and are all turning out as zeroes. This led me to assume two things: 1) That cRIO analog output can only output integers since the values need to be deployed in the memory first and 2) that I'm missing a step in the conversion process. My values range from 0-8, therefore I don't expect that the simple conversion tool in labview should make everything into zeroes.
    Any help?

    Since we are using the cRIO's FPGA interface, you really should be doing most of this inside of the FPGA.  Use DMA FIFOs to pass your data between your RT and the FPGA (and visa versa).
    On your FPGA, you can have a loop that just reads the analog inputs at whatever loop rate you want.  You just send the data to the RT using a DMA.
    Similarly, use a DMA to send your analog output values to the FPGA.  The FPGA can have another loop that reads the DMA and writes the value to the analog output.  This should be done in the FPGA since you can have the FPGA send out the values at a given (and deterministic) loop rate.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How do I use directional PDA buttons in LabVIEW programs?

    Hi all,
    I've been assigned to get a LabVIEW program to work on a Palm PDA with LabVIEW 7.0 and palm PDA module 7.0.  I am basically totally new to LabVIEW, and my possibly very simple problem is, the PC program requires input from a serially connected number pad for the 8, 4, 5, 6, and 2 keys which are used as four directions (8, 4, 6, and 2) and an enter (5). 
    I am trying to rewrite the input vi to use the directional buttons and middle enter button on the PDA itself but am having trouble figuring out what to use.  I am using a PDA simulator because of the PALM OS5 we own.  The input demo vi example provided will not build for PDA because of size so I am unsure of how to approach this.  Another thing is, we have LabVIEW and PDA module for pocket PC 8.0, and a Dell Axim PDA on order.  From what I understand off of this website, the latest PDA module has example button vi's.  I would still like to figure out the way to do this on 7.0 so I can have a better understanding of LabVIEW.  Eventually the program's endgoal is to be used on a PDA and inputting with a bluetooth keyboard, but we are going step by step right now.
    I guess my biggest questions are, how do I assign the directional buttons on the PDA in my program, and will this differ greatly when we switch to 8.0 and pocketPC.
    Oh and I did try to look at the example asteroid.vi but from looking at the input subvi, still couldn't figure out how they assigned the buttons.
    Thanks,
    Stephen

    I can't help with any specifics (no access to the PDA module at the moment and I didn't use the buttons anyway), but I would like to say that it probably would make a big difference if you used LV 8. 7.0 was the first version of the PDA module and was extemely limited and problematic (it didn't even have a tab control). 7.1 was somewhat better and I understand that 8 is even better (although still very limited and buggy).
    I also remember reading about several differences between Palm and PocketPC and I think you will generally be better off with the PocketPC as it's related to windows and will probably support more stuff.
    Try to take over the world!

  • How to open labview program with Quit Labview function inside?

    Hi Any idea how to open labview program with  Quit Labview function inside?
    I forgot to add and set the condition of the type for this program.
    If the program is an application, it would close straight away.
    If it is still labview work, it will go straight to editing program without closing.
    So I need to recover, open it and make some changes.
    Clement
    Solved!
    Go to Solution.

    Put the VI in a project and open it from there, then it shouldn't autorun. You can use App.kind property of application to decide whether to close or not.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

Maybe you are looking for