Trigger Solenoid Valve (Digital Output)

I was wondering wether it is possible to use a trigger to send a signal to a digital output. I currently have to send a signal to a solenoid valve when the slope of the data I am acquiring starts to become negative. I know LabVIEW can do triggered data acquisition but can it send a signal to a digital output based on a trigger (falling edge)? I already know what code the signal should send. However, i tried trigger.vi without success. I am relatively new to LabVIEW and would really appreciate any help.
Attachments:
Moses_SBE_SSE_Triggered_Continuous_Acquisition.vi ‏76 KB

Hi M^2,
If all your trying to do is a software timed trigger as shown in the vi that
you provided, theres a few things that I would change.  First off, I would
create the digital output channel and start it prior to the loop.  Second,
I would initialize the value of the digital output to high (I was using an
inverse logic LED output) prior to the loop.  Then after the trigger is
found, write the digital output to the opposite (low).  In addition, I
changed the DAQmx read to 1 channel with N samples (1D DBL).  This seemed
more appropriate if you’re just using one analog input channel. 
I've gone ahead and uploaded the code I modified.  This is setup to my
parameters.  Basically, I triggered when my thermocouple voltage rising
edge went over 0.29V.  You will need to change these settings back to what
you need for your application.  Also, I wanted to note that once the
digital output is changed low when the trigger is found it will remain low
until changed high again.
I hope this helps,
Paul C.
Message Edited by Paul C. on 08-16-2007 03:34 PM
Attachments:
Moses_SBE_SSE_Triggered_Continuous_Acquisition (REVISED).vi ‏81 KB

Similar Messages

  • Output to trigger 120VAC Solenoid valve

    Hi,
    I have 4 solenoid valves 120VAC, working at 6.1 watts, requiring 0.05 amps. I want to control them from labVIEW via a DAQ hardware device. 
    My doubt is if there are hardware devices out there which give that much output to trigger a solenoid valve ON/OFF?
    If NO, is there any way that I can achieve this?
    Thank you.
    Solved!
    Go to Solution.

    Solid state relays (SSR's) are a good way to go, they can trpicially be driven by most DIO lines and create no inductive spike when turned off. They also come in zero-crossing turn on/off styles for a clean power on/off transition on the AC side.
    If you do end up using a coil based relay, be sure to a reverse biased diode (1N4004 work well) to prevent damage to the DIO line when turned off (aforementioned inductive spike).
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Digital stimulus-f​requency response: Need to drive with digital output trigger. Using counters for response.

    I need to drive stimulus-response with a software driven digital trigger and NI-TIO counter based response. No analog I/O is really relevant, although I have a PCI-6035E multi-function DAQ as part of my gear. I intend to use the analog, but its timing is non-critical and can be software timed.
    The real trick is that I want to set the basic timing of the system (in the range of 1 - 50Hz) from the timer0 on the 6035E. This signal needs to be replicated to drive a trigger pulse and to route through RTSI (or a PFI) to trigger frequency counts using the four possible groups of counter/timers on the 6602.
    What I need is:
    while( enabled )
    Repeat at (
    software controllable rate = 1-50Hz)
    Trigger Sets a PFI line for 10-20us
    same trigger sets an RTSI line
    - Software Set Delay (usually zero)- stable is more important than the delay time!
    Count for software set time on 4 counters
    analog samples
    Post-process
    I want to do this in LabView. I have checked out the Advanced sychronization demos online, but the examples all use analog triggering and buffered digital I/O. This doesn't really address what I need to do.
    I have made some failed attempts which relied on software to sync up the trigger and the response frequency acquisition. This is definately flawed. I need to start the counting right after setting the digital output trigger, and stop the count after a fixed interval for frequency calculation.
    I am having trouble working through the signal routing to get the timing to trigger off the digital stimulus output pulse.
    Any help would be appreciated
    Thanks,
    Joe

    Joe
    What are you using the trigger from the 6035E for? I do not know what you mean by, "to trigger frequency countes."
    If you are having problems just routing the signal to the 6602, here is a vi that shows you how to route a signal through the RTSI cable to use as the source of a counter.
    Brian
    Attachments:
    Route_RTSI_to_Source.vi ‏67 KB

  • NI DAQmx Digital Output Trigger To Start Analog Input Task

    Hi everyone.  I am using the NI DAQmx VIs to set a digital output line low (boolean '0').  I want to begin reading an Analog Input voltage (Start Analog Input Voltage reading task) right after the digital output line is set low.  I am using the DAQmx Start Trigger (Digital Edge).vi to try and do this.  I have the digital edge to trigger off a falling edge since the digital output line is being set low.  I am using "do/SampleClock" as the source into the DAQmx Start Trigger (Digital Edge).vi.  
    I don't have the DAQ card (PXI 6229) since someone else is using it but I wanted to write up the SW so that when it becomes available I can have SW to try out.
    I have attached the VI.  Am I setting up this VI correctly?
    Thanks!
    Attachments:
    Trigger AI Task Off DO Edge.vi ‏32 KB

    I think you are going to have to wire that Digital Output to a PFI line on the card with the Analog Input(s).  You then trigger on that PFI line.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Using PWM and digital outputs of myDAQ to power multiple solenoids

    Hello,
    I am attempting to use LabVIEW and myDAQ to power 3 independent solenoids with PWM. I am new to Labview, so I am having trouble grasping the best was to use a digital output to power my solenoids. I have many codes to generate PWM to digital output, but I cannot figure out how to actually power my solenoid from these signals. Any help would be greatly appreciated. 
    Zach

    Google ULN2003 which is a relay/solenoid driver chip. The digital outputs of your card feed to the inputs of the chip, Review the max current/voltage specs of your solenoids and compare to teh driver chip max ratings to ensure the chip can power them.
    How fast do you plan to PWM the solenoids? Can they achieve your PWM rate?
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • PFI Pin Trigger for a Solenoid Valve

    I am currently trying to trigger a solenoid valve based on an analog input (level=5 and slope=falling). I need to do this as fast as possible (5 micro-s delay at most). I talked to some people at NI and they recommended using a reference trigger and routing the signal to a PFI pin. I attempted this but it is triggering on the rising edge even though I clearly stated falling edge in the code of the program. I am confused. The code seems like it should work, however it does not. I would appreciate any help.
    Thanks,
    M^2
    Attachments:
    Solenoid_Trigger_PFI.vi ‏35 KB

     Hi M^2,
     The DAQmx Export Signal.vi you have in there is routing a Reference Trigger event to the PFI9 line. I'm not sure this is what you are wanting to do.
    Your application sounds like the following:
      1. Acquire a analog input when a trigger condition is met. This trigger condition is a falling edge of the analog input signal.
    The VI you attached should work, I made a slight change to the source of the trigger condition and removed the DAQmx Export Signal. The analog signal to be monitored should be wired to pin 20, the source is "/Dev1/APFI0". Where Dev1 is whatever name your daq card is known by to MAX.
     I hope this helps! Please consider the suggestion made by falkpl as well, that would definetly cause the trigger slope to be exactly reversed.
     Best regards,
    MatthewW
    Applications Engineer
    National Instruments
    Attachments:
    Solenoid_Trigger_APFI0.vi ‏32 KB

  • Trigger digital output at every 10 digital pulses

    How can i generate an output pulse at every 10 input pulses comming from an encoder?
    I need to trigger a sensor at every 10 encoder pulses to get data from the sensor.

    Hello jyp777,
    What you will need is a counter with an if statement that activates a digital output every 10 ticks. To do this, I would look at a LabVIEW example titled: Counter - Count Edges (Continuous Clock) that can be found under Help >> Find Examples... >> Hardware Input and Output >> DAQmx >> Counter Input in LabVIEW. Using this example VI, it should be a simple step to add a condition that triggers a digital output when the count reaches 10. 
    You can also use a Digital Output example if you need help in this area. These examples can be found by going to :
    Help >> Find Examples... >> Hardware Input and Output >> DAQmx >>Digital Output. I would recommend "Digital - Continuous Output.vi". 
    Happy LabVIEW coding!
    Thanks,
    Collin D.
    Applications Engineer
    National Instruments

  • PID Control - analog input, digital outputs

    Hello everyone,
    I am trying to use the PID toolkit to convert my existing feedback control system to one using PID or just PI whatever works best. Problem is that the tutorials out there discuss in detail about obtaining Analog inputs and using the PID output to control an analog output. Are there any tutorials that show how I can control my process variable which is an analog input by using the PID output to generate digital outputs?
    Basically, what I am doing is controlling the incline of my device with two digital outputs that control two solenoid valves. The angle is calculated from a calibration curve that plots distance sensor voltage with Angle. Any help would be immensely apprecitated. I want to try this out on my own before I post some vi's. Thanks!
    V
    I may not be perfect, but I'm all I got!

    That is exactly what I am doing currently. I have error bands specified around the target to make sure that it doesn't oscillate. But, under load conditions such as pulsed load conditions, the device goes out of bounds and the values trigger to correct for it. But, what I need is seemless or atleast seemless correction. Currently what I see is sudden adjustments to the incline. Please find attached what I am currently using. I am trying to get a more finer solution if at all possible.
    Note: Within 5% of the target = NO action
              Between 5% and 15% = Pulsed ACtion ( DO On for Pulse width time)
              Greater than 15% = continuous action until it reaches Pulse band
    I may not be perfect, but I'm all I got!
    Attachments:
    TDML_subElevationControl.vi ‏41 KB
    TDML_subPulsedValveFuntion.vi ‏16 KB

  • Opening & closing a solenoid valve using ni usb-6009

    Hi,
    I am very new to labview so any help would be apprciated.
    I am using the ni usb-6009 as a power source for my solenoid valve. The valve is 12vdc but because the max output voltage for the ni usb-6009 is 5v i have designed and build an op-amp circuit which will amplify the voltage. I want to create a vi that will give a +5v digital output when a push button is pressed and 0v when the push button is off. What would be the most efficient way of doing this? Thank you.
    Solved!
    Go to Solution.

    How much current does the solenoid draw? You say that you are powering the solenoid from the USB-6009 so just converting the voltage from 5V to 12V will not work - there is a current limit of 8.5mA on the 6009 which will not be enough to power the solenoid. You will need to use an external supply that can provide sufficient current to drive the coils of the solenoid and then use a transistor circuit to switch on the supply from the digital output of the 6009 (which can't draw more than 8.5mA).
    Once you've got your circuit right, you can use MAX Test Panels, the Data Acquisition Express VIs or the DAQmx palette in LabVIEW to control the digital output. There are lots of examples in LabVIEW on how to do this
    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 actuate 20 solenoid valves using labview

    I want to perform an action of detaching materials from a fixture by actuating 20 pneumatic pistons controlled by 20 solenoid valves.
    If the valve is actuated the piston moves and stays in the location for 1 sec and then return back. Each of these cylinders should be able to be controlled separately.
    Kindly provide me with the necessary equipments i should buy.
    How can i control 20 solenoids using a DAQ card.  is it possible? 
    Also i need to accept around 20 Digital Signals too.
    Could you specify any card that will meet the spec.?
    Thank you in advance.
    Regards
    grugh
    Regards
    Grugh Mike
    Success is Everything !!

    With the equipment that you have, a good choice would be Opto-22 series for the G4 series of the Opto-22. Select the screw terminal base and an ODC module appropriate to your power/voltage requirements. this will use the TTL digital output to control a power solid state relay. If you look to the other signal conditioning products from NI, they will allow you to do the same thing as well.
    Stu McFarlane
    Viewpoint Systems, Inc.

  • Creating a control sequence of digital outputs with timing

    I'm trying to create a controls system for a cleaning process. I am controlling a pump, heater, and several solenoid valves using relays that I am opening and closing with the +5V from my USB 6008 and each relay goes to one of the digital I/O lines, where I provide a sink to switch the relay. 
    I am using the front panel as the user interface for the machine, so the user can specify three different processes, so I'm using an event structure to call each process. An example of the steps in the process are as follows:
    1. Open relay #1 (solenoid valve)
    2. Open relay #4 (heater)
    3. Wait 30 seconds (while relays #1 and #4 are still open)
    4. Close relay #4
    5. Close relay #1
    6. Open relay #2 (solenoid valve)
    7. Wait 5 seconds (while relay #2 is still open)
    8. Close relay #2
    I am trying to use a framed sequence structure within the event cases, with the DAQ Assistant saying which lines are sinks and which are also outputting +5V (no delta, keeps relays closed), but I don't think this is working and will bog down the system if it did. I think inverting the lines will make it so the lines nominally output the +5V so I just need to send it a sink when I want to close the relays, and make sure it keeps doing that while it waits so the process can be completed. 
    What is the best way to do this? I've used Labview before, but I'm hardly a pro, so any help would be greatly appreciated.

    As nijams mentioned a state machine architecture is a good place to start.  In case you are unfamiliar in how to implement this in LabVIEW there is a blank state machine template available in LabVIEW.  When you create a new VI select From Template->Frameworks->state machine.  In addition I've included a link to a simple example posted on our NI Community.
    State Machine Example.zip: https://decibel.ni.com/content/docs/DOC-15515
    Regards
    Regards,
    Isaac S.
    Applications Engineer
    National Instruments

  • Solenoid valves control

    Hey everyone 
    I've designed pressure system(dp cell) with a manifold of 8 ports at each of which solenoid valve. What I'm trying to do is to control the valve through labview so the open 1 at the time,  stay open for 30 seconds then  close and another one is opened and so on. I've attached the data sheet of the valves. I'm using Cdaq 9178 with NI:9203 and Ni :9472.  
    The valves are normally closed and the fluid passing through them is silicon oil. 
    I've been trying to look at different examples but I got confused. 
    I should be grateful for any advice or suggestion you give. (I started using labview only  few weeks ago).
    Best Regards
    Rajab
    Solved!
    Go to Solution.
    Attachments:
    PU220AD (1) (2).pdf ‏578 KB

    Hi ToeCutter
    I've attached an example that I think suits my application, However when I try to edit the type Def to change the number of valve the code went blank.  
    I using Ni9472 (dig. output to energies the valves through Solid state relay.  The valves should open sequentially at equal time interval let say(4 valves, each one should stay open 25 sec.). 
    The code is some thing like that:
    1. Open V1 (25sec)(through Ni 9472) and start pressure measurement  ( through analog input using Ni 9203)
    2. Close V1 and open V2. the pressure is continuously measured
    and so on for the rest of the valves 
    could you please suggest the best way to do that.?
    Is it better to write one vi to control the valves and  separate one to write the measurements. AS for my overall data acquisition system.  I'm planning to measure pressure temperature, flow rate of my  flow rig with one VI ( using Ni 9203)
    to give you the full picture of my date acquisition system: 
    All the instrumentation should be triggered (using trigger out from one of the devices) to give simultaneous measurements,( the valves are part of my pressure measurements only).  So once the first device is on the rest of the devices will be triggered as well as the valves control vi. 
    Best Regards 
    Rajab 
    Attachments:
    example3.vi ‏67 KB

  • Control solenoid valve

    I am a labview beginner. I try to use labview to control our gas permeation system. Firstly, labview acquire pressure data from PR4000 readout . When pressure is down to certain value then the data goes through NI 6501 I/O device then universal relay card to switch solenoid valve. Then labview coninue acquire pressure data from transducer .
    I hope somebody can give me some advice for writing this program. Or what kind of existing VI programe can I use to modify it?
    Thanks

    Howdy MYLONG!
    One of the best resources to find LabVIEW example programs is in the LabVIEW Example Finder.  You can access it in LabVIEW by going to Help>>Find Examples...
    For examples on outputting data to the NI 6501 I would recommend looking in the Hardware Input and Output>>DAQmx>>Digital Generation folder.
    If you are using serial communication to talk with your PR4000 then look in the Hardware Input and Output>>Serial folder for examples.
    Regards,

  • NI 9472 with 9171 to control a 24V Solenoid Valve

    1) I am trying to connect a solenoid valve to a NI digital module 9472 with a USB DAQ Chassis 9171. I have verified the voltage signals and used NI Max to turn the valve on and off. Now I am trying to find a VI to do this operation i.e. turning on and off one solenoid valve.
    I found some example code such as: Digital - SW - Timed Output.vi (attached). I modified the code a little bit to interface the digital channels from the module. Such as in the DAQmx tasks, I have created a "task in" channel to read the signal from specic port from 9472, and as the very same port as the i/o lines . But I keep getting an error  -200463 message: 
    "Specified read or write operation failed, because the number of lines in the data for a channel does not match the number of lines in the channel.If you are using the Digital Waveform datatype, make sure the number of lines in the digital waveform matches the number of lines in the channel. If you are using boolean data, make sure the array dimension for lines in the data matches the number of lines in the channel.
    Number of Lines in Channel: 1; Number of Lines in Data: 8"
    I am very new to Lab view, so any help in this will be greatly appreciated. 
    Vikram

    Hi vdey,
    There is a similar thread that handles that error code when using a DAQmx write. Please take a look at the following link:
    http://forums.ni.com/t5/LabVIEW/Daqmx-read-error-200463/td-p/911975

  • Can the M Series PCI 6221 control 24 VDC solenoid valves like the NI 9477?

    Hi,
    I am working on a project where three solenoid valves requiring 24 VDC and 8 Watts must be controlled by a PCI 6221 multifunction DAQ.
    I read on the NI website that an external power supply and the NI 9477 can be used together to actuate solenoid valves.  Since I already have the PCI 6221,
    I was wondering if an external power supply would allow the PCI 6221 to power the valves.
    Sincerely,
    Tristram Jordan

    Hey,
    Is there any way to control solenoid valves using the PCI 6221 DAQ card? Is it possible for the DAQ card to control a driver circuit for the valves?
    If there isn't an alternate way to control the valves, which DAQ do you recommend purchasing to control 3 solenoid valves and a pressure transducer?
    I am not familiar with the compactDAQ. Does the digital output module need to connect to a DAQ card within the computer? If not, how does it communicate with the computer?
    Sincerely,
    Tristram Jordan

Maybe you are looking for

  • Placed image position change

    I have a few images placed into my website.  The positioning changes between chrome, firefox, and the biggest change in IE.  Is there any way to avoid this?  www.jarminlaw.com  the bottom quote marks under testimonials. Thanks!

  • Officejet 5750 running on Wndows 7 PC starts to print then stops and all lights start to flash.

    Printer had been working fine. Just started stopping a print after a few lines and all lights flash.Have to turn off and back on to clear. Doesn't do it every time. but does it on all programs and web printing.

  • Changing ip of physical and logical host

    I have a 2 nodes Sun cluster 2.2 working. I have to put it in another lan, so I have to change both Physical and logical host and terminal concentrator and console ip addresses. How can I do? Thanks

  • Data displaying in a table

    Instead of displaying my data row by row I want to have a table with columns and rows that have my data and a header in the first table row for a description of each column. How can I make this?

  • Digest a large file using SHA1

    Hi, Is it possible to hash a file of size 1 GB with MessageDigest class. All the update method of the MessageDigest class are having only byte[] as argument. I guess reading the entire file(of size 1GB) and creating a byte array and updating it in to