DAQmx Digital Signals

Hi all,
Need some help with building my LabView Vi. To help you understand what is happening, I am using a DAQ-9472 to send out an output digital signal to a sensor. When the sensor is tripped it will send out a Digital signal to a DAQ-9421 which will cause the DAQ-9472 to send out another digital signal but this time to a solenoid valve. The issue I am having is finding out how to make the second seperate signal from the 9472 to the solenoid valve in response to receiving a signal trigger form the 9421 DAQ. I have attached a sample of what I have so far. Please help out with any examples, ideas, or things too look at. Please also offer suggestions to help complete this goal.
Thanks for all the help in advance,
Shervin Aslani
Attachments:
SolenoidValve1.vi ‏24 KB

Hey friends,
Kbreezy: I am just sedning out one pulse, receiving that pulse then sending out the second pulse to a different location. I am using the NI-9472 output DAQ to activate a photoelectric sensor, then receive back the signal and then activate the solenoid valve. So i guess I would be driving the line high?
Jeff: Essentially what's happening is the NI-9472 sends out 24VDC to a photoelectric sensor when isntructed to do so. When the sensor is tripped it will send back this voltage to the NI-9421 input DAQ. This should cause the NI-9472 to send out another 24VDC but this time to a solenoid valve. It is this second output from the 9472 that I cam having trouble with. 
Also if you have any suggestions or corrections to the VI that I posted before please let me know how to improve it.
Shervin Aslani

Similar Messages

  • DIGITAL SIGNAL GENERATION

    Hi!
    I want to generate a digital signal (0-5V) in order to turn on and off an hydraulic pump. The time on (high) and time off (low) are specified by a MatLab code, so that once the pulse has finished one cycle, the program should be go again to MatLab code and take two times again. Then it should generate the signal again.
    Thank you for the help.
    Miguel

    Thanks for the reply.
    I have a system with an hydraulic pump, power supply, transistor and computer. I would like to send a digital pulse from my computer (0-5V) to the transistor. The transistor then closes a circuit (power supply and pump), and the pump starts running.
    Then, I would like that each sample (each pulse) has specific width (time on), and also specific time off before it starts with other sample. These times (time on and time off) are computed by a MatLab code.
    I'm working with DAQmx drivers and I also have a BNC 2110.
    I also attach my code in Labview that I am trying to modify.
    Thanks a lot.
    Regards,
    Miguel
    Attachments:
    Gen Dig Pulse Train-Finite_original.vi ‏22 KB

  • Acquire 2 digital signal with custom scaling (Engg Units)

    I am a newbie to DIO world.
    I have write a VI to acquire 2 digital signals. one from a load cell and other for motor rpm (pulses). I need to acquire these two signals and then convert them into engg units using custom scaling and write them to a txt file with time stamp.
    Please suggest best ways to accomplish this task.
    Thanks
    DAQG
    Solved!
    Go to Solution.

    Look at the examples on DAQmx in the example finder.
    You wouldn't actually be acquiring 2 digital signals.  You would be acquiring an analog signal from the load cell.  A digital or counter acquisition is what you would acquire from the motor.  Search for analog measurements and counter measurements in the example finder.  Some of the example should show you how to apply the custom scaling.

  • Digital Signal Modification (PCIe 6320)

    Hi,
    We've got a digital signal which is basically a series of trigger pulses for a receiving device, constantly pulsing. However, the pulses need to be modified so that e.g. only every third pulse ends up on the receiving device, but not more than e.g. 4 pulses, with a given delay of e.g. 2 pulses.
    Using this example, input and output signal should look the following:
    in : 1---1---1---1---1---1---1---1---1---1---1---1---1---1---1---1
    out: --------1-----------1-----------1-----------1----------------
    We've got it basically working using Digital Edge Counting and connecting/disconnecting terminals as needed. However, the task is very time critical and I'm seeking for a solution that works as close to hardware as possible (ideally, the task should be carried out by the card itself after setting up the parameters).
    We've got a PCIe 6320 that we want to use for this task, we are programming in C using the DAQmx C library.
    Thanks for your suggestions.

    Since your real code is different than what was posted, I can only take some guesses for why you can't count more than (about?) 1 million pulses.
    1.  If your real code doesn't wire a "# of samples" value to DAQmx Timing.vi, then a continuous task that is told it's acquiring at 100 MHz will use a default buffer size of 1 million samples.  You can create a bigger buffer by wiring in a bigger value.  You can also loop over your Read calls to help prevent a buffer overflow.
    2.  Theres a limit to the rate you can stream data from the board to system RAM.  The X-series is very VERY much better than most of its predecessors in this regard for counter-based measurements.  (See this thread and associated links.)  But it still won't handle 100 MHz effective sampling rates for any appreciable duration.
    3. Another option I've seen used is count binning.  That method works kinda inside-out from your method by letting the external pulses increment the count while that count is sampled at a constant sample rate.
    4. I haven't yet been able to do any real-life playing with an X-series board, but I think there's also a mode for measuring precise frequency while sampling at a constant rate.  That mode might prove useful for you as well.
    -Kevin P

  • Generating digital signals (T/F) continuosly at certain frequency

    Please help me in generating digital signals continuously (TRUE/FALSE alternatingly) in LABVIEW 7.1. I want them to be crreated at frequency which can be controlled by myself. Kindly help its urgent. Contact me at [email protected] Thanks Rahul

    Have you looked at the shipping examples for DAQmx? What kind of DAQ card do you have?
    p.s. since all questions are answered here, posting your email does no good except put you on a list of spammers.

  • Digital signal generation in cDAQ- 9477 with 1ms resolution.

    I am using cDAQ -9477 Digital card with 9178 chassis (USB) .I have to generate some digital signals for 2 seconds. The signal should be
    0 (3ms)  -   1(1ms)  -    1  (2ms)   & repeat the sample 0 (3ms)  -   1(1ms)  …….  upto  2 seconds.
    I had generated samples for 2seconds with 1ms duration of each sample.
    I am unable to do that with 1ms resolution in cDAQ -9477 Digital card.
    Is the above signal generation is possible (each sample -1ms) ?
    I am using LabVIEW2009 .I attached the code.
    Kindly let me know the suggestions .
    Attachments:
    Digital Signal.JPG ‏7 KB
    Digital.vi ‏40 KB

    cDAQ chassis do not currently support hardware timed tasks for digital modules with >8 lines.  The DAQmx help defines these devices as "static digital I/O modules".  The "Digital I/O Consideration for C Series Devices" section in the DAQmx help describes the capabilities of digital modules on different chassis.
    Unfortunately this means you are stuck with static (software timed) generation.  Over USB this will affect the accuracy of your signal.  You won't be able to achieve the signal you are trying to generate with the current support.  Static generation will max out at roughly 1kHz, but Windows can introduce a large amount of jitter.  What you really need is a hardware timed task.
    This is a feature that could be added in the future.  I recommend submitting a feature request, though I know that doesn't solve your problem now.

  • Reading digita signal

    I'm looking to write a simple program code that reads digital signal from the PXI-7350 that I'm using. Using LEDs to display the signal whether its high or low.
    Just looking for someone to point me the way on how to do this. Thanks 

    Hi odsnot,
    you can search in the Example Finder for "DAQmx". You will find a lot of useful examples.
    Mike 

  • SCXI-1162HV Digital Signal Acquisition

    This question has to do with SCXI-1162HV, DAQmx, and Digital Signal Acquisition, but I do this programming in CVI 2010 using the SCXI-1600 USB Digitizer and DAQmx, so I'll start here.
    I have seawrched many discussion forums, the examples and tutorials, and cannot find much on setting up and using the SCXI-1162HV 32-Channel Digital Input module.  I did find some example code in C:\Documents and Settings\All Users\Documents\National Instruments\CVI\samples\DAQmx\Digital.
    What I want to do: 
    I have several Analog Input cards (voltage, thermocouple, etc) in my SCXI chassis, that will be scanned at 1000 samples/second.  Using DAQmxRegisterEveryNSamplesEvent(...) a callback will be alerted every 100 milliseconds to read all the sampled data from the buffer into common memory.  I have a number of digital timing events that must be captured at the same rate.  It would be best if the 1162HV would supply 32-bit words into the buffer at the same scan rate.  Is that possible? 
    So far I have not found anything in DAQmx that would support such a thing.  I can create a task that scans multiple analog boards, but it does not appear that I can add the 1162HV board to that task.  No matter what I select in the DAQmx task generator, the generated code is always:
    int32 CreateDINTask(TaskHandle *taskOut1)
     int32 DAQmxError = DAQmxSuccess;
      TaskHandle taskOut;
     DAQmxErrChk(DAQmxCreateTask("DINTask", &taskOut));
     DAQmxErrChk(DAQmxCreateDIChan(taskOut, "SC1_DIN/port0",
      "DigitalIn", DAQmx_Val_ChanForAllLines));
     DAQmxErrChk(DAQmxSetChanAttribute(taskOut, "DigitalIn", DAQmx_DI_InvertLines, 0));
      *taskOut1 = taskOut;
    Error:
     return DAQmxError;
    Scanning does not seem to be a possibility.
    Now, going to the example code (...\Digital\Read Values\Read Dig Port-Ext Clk ) , particularly attempting to use an external clock to perform scanning, with AI clock selected, when executing these function calls:
      DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
      DAQmxErrChk (DAQmxCreateDIChan(taskHandle,chan,"",DAQmx_Val_ChanForAllLines));
      DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,clockSource,rate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,sampsToRead));
    the DAQmxCfgSampClkTiming() call generates this error

    Hendra@ngms,
    Thank you for using the forums.  I am sorry that you are receiving these errors.  I was able to replicate your system and I have found that if I set up a digital input task in Measurement and Automation Explorer, and chose any timing beside the on demand I received an error.  See screen shot.  Basically what this error says, is that the only timing that the 1162HV can do is On Demand.  So it doesn't appear that you can sample at your desired rate.  I hope that helps.
    Regards,
    Brian P.
    Applications Engineer
    National Instruments
    Attachments:
    Capture.JPG ‏33 KB

  • MyDAQ - Generating a digital signal and displaying it on an analog waveform graph

    Hi,
    I am using the NI MyDAQ to generate a digital waveform with an adjustable frequnecy. This is being implemented into a program I have already written which generates a TTL "like" pulse out of the sound card. I am displaying the output on an analog waveform graph, and I'd like to be able to display the digital waveform generated by the myDAQ on the same graph. (Not at the same time, either one or the other, toggled by a button). I've been messing with arrays and conversions but I cant seem to really get anywhere with it all.
    This is the vi I have made to generate the adjustable frequency digital signal with MyDAQ. Any suggestions on the proper way to do this if the following is wrong would be great too as I just got the MyDAQ a few days ago. I would think there must be a better way but this is the best I could come up with so far.
    Solved!
    Go to Solution.

    Hi Jonny,
    The general logic you are using to create a digital pulse train is fine. This VI you've written should work and will create the pulse train based on software timing (which is fine because you don't have hardware-timed DIO on the myDAQ anyway). However, it is usually good practice to start the DAQmx task just before your while loop and then clear the task after the while loop when you press stop.
    For reference, there are some pretty good LV examples that I recommend looking at for this application too. If you are just trying to create a digital pulse train, the example Gen Dig Pulse Train-Continuous.vi is a good example that uses a counter to create a digital pulse train of your desired frequency. This is generally the prefered method to create a pulse train if you have the hardware available to do so (the myDAQ does have a counter). Alternatively, there are some DIO examples that continuously write to a digital line/port.
    If you're not familiar, you can find the examples by going to Help >> Find Examples... in LV. Then, navigate to Hardware Input and Output >> DAQmx >> Generating Digital Pulses or Digital Generation.
    Also, here is some additional information about the myDAQ and its counters:
    myDAQ Counters 
    myDAQ Manual 
    Hopefully this helps.
    Chris G
    Applications Engineer
    National Instruments

  • Is there a better way to generate custom timed digital Signals

    I am trying to generate digital output of high and lows with particular delays on different lines. Each daq assistant is activating single line on a port on USB 6501. There more complex high and lows that I need to generate with variable time difference between high and low. There is codebelow which accomplishes what I am trying to achieve but for executing a long pattern of high and low signal is very time consuming to do this way. I am sure there is a better way to do this, I  not a expert on labview so I haven't uncovered its full potential. Can anybody suggest a more effective and a quick way to do this. I would hgihly appreciate. Thanks!
    I have not shown in the code below but through DAQ assistant I have initialized lines to low level logic.
    Solved!
    Go to Solution.

    See the attached file
    Attachments:
    Digital Signal.vi ‏335 KB

  • How to input/output a digital signal and acquire an analog signal at the same time?

    Dasylab, version: 8.0.04
    Acquirement Card: PCI1002L
    When I use DasyLab to acquire the analog signals is no problem without digital inputs and outputs,
    and when I use DasyLab to input or output a digital signal is no problem also, but when I do that at the
     same time, DasyLab tell me the rate is too high and stop.
    so, I searched the manual book1 (user guide) for that, it showed me :
    To internally equalize measurement time and system time in the analog input, digital input and counter
    hardware modules, use the following settings:
       Synchronization: PC Clock
       Sampling rate: <= 5Hz
       Block size: =1
    the problem is, if I set the Sampling rate to 5Hz, the speed of the acquirement datas is not enough for my
    application.
    so, how to improve it? who can give me a example programm for me. thanks!
    by the way, I come from China, my English isn't good, I'm sorry.
    Allen, China.

    Hi,
    Have things changed over the years?
    I need to syncronise a digital output (Modul NI9474) and an analoge input (AI-Modul NI9203) module. I need to measure time intervals from a flank in signal A to a flank in signal B. I would like accuracies of the order of 1 ms. Currently, the signals are not synchronised, with errors of the order of 2 times the block length (block size x sample rate), sometimes much higher. The best I got so far was a block size of around 20 with a sample rate of 1 kHz.
    If I use the master and slave settings on the RTSL settings, my program doesn't run properly.
    If I use digital signals for input and output, I can syncronise them with RTSL settings and everything is good, but I can't always do that.
    Also, if I do anything in the GUI (such as scrollowing something or going to another window), my output gets screwed up properly.
    1. What can be done to synchronise AI with DO?
    2. Is there something that can be done to avoid messing up the output when something happens in the user interface? (I know that I am messing up the outputs as they make some valves switch and that is loud).
    Thanks in advance!

  • How do I convert analogue 5.1 surround sound into a digital signal? (Pioneer SE-DIR800C headphon

    I understand that my SB Audigy 2 card will only output 5. sound from games through its 3 analogue connectors. How do I convert this analogue signal into a digital one? What hardware do I need to purchase?
    I have read the thread on "Digital Connections, SPDIF and Dolby Digital Info", and also I've thoroughly read the "Creative Speaker Connectivity Guide".
    The reason I ask is that I have just bought a pair of Pioneer SE-DIR800C Surround Sound headphones. This are supposedly fantastic for recreating surround sound on headphones because there is a clever little decoder box. They accept a DTS / Dolby Digital signal via the digital co-axial and optical inputs, and there is a single analogue input which only accepts stereo sound.
    My XBox and PS2 will output true digital 5. sound via an optical cable and I am confident this will work perfectly with these headphones. I'm really looking forward to playing Halo in surround sound! But for gaming on my PC, I'll be limited to just an analogue stereo signal. Well, unless I can find some device that will convert my SoundBlaster's analogue 5. outputs into a digital signal, which I can then plug into the little decoder box for these headphones.
    So, back to my question:
    What hardware do I need to buy to convert an analogue 5. signal (via 6 x RCA or 3 x 3.5mm stereo ) into a true digital signal (via optical or co-axial SP/DIF)? Is it some type of headphone amplifier I need? If possible, please recommend makes & models of equipment.

    Thanks stefan
    OK, basically I have found 3 options for getting digital 5. out of a PC:
    a) Creative DTS-60 (approx $90). This converts the SB's analogue into digital, but it's not available in the UK and it also introduces a noticeable 50ms sound delay. Also, who wants an extra box hanging out of their PC?
    b) Buy a new sound card which has Dolby Digital Li've output. For example, ) BlueGears HDA X Mystique 7., or 2) Turtle Beach Montego DDL, or 3) Terratec Aureon 7. PCI (NOT the Space, FireWire or Uni'verse cards). I couldn't find the first two available in the UK so I have just ordered the Terratec card from Komplett.
    c) Buy a new motherboard that has built-in Dolby Digital Li've output, for example the ABIT Fatalty AA8XE. Unfortunately my PC is only just over year old and I'm not quite ready to replace it.
    I hope this info is useful for people. Maybe Creative will start making a card with DDL output too.Message Edited by NinjaHeretic on 2-22-2005 08:46 AM

  • How to check 6 digital signals change value at the same time with PCI-6229??

    I am using DAQ card PCI-6229.
    Channel 1 generate a digital signal.
    Channel 2,3,4,5,6,7 acquire digital signals.
    I want to check:
    1. Whether the rising edge of Channel 2,3,4,5,6,7 occures at the same time;
    2. The time delay from the rising edge of Channel 1 to the rising edge of Channel 2,3,4,5,6,7 is within a certain range.
    I know I can use counter to get the two edge seperation time delay. But I only have two counter, it is two time-consuming if I check one by one.
    I don't know how to check the rising edge of 6 different channels occure at the same time.
    Does anyone has any suggestions?
    Thanks

    Hello,
    You can use the DAQ card's digital input change detection circuitry to detect changes in the input, you can then use a counter to measure the relative time between samples. Please read Page 6-9 DI Change Detection Applications for more information. Let me know if this helps
    Christian A
    National Instruments
    Applications Engineer

  • DAQmx: Digital - Continuous Output.vi example with PCI-6519 (error -200077)

    Bonjour everyone,
    Main goal :
    I want to use 1 digital output of the PCI-6519 harware to make  a staked light indicator blink when user is needed to operate the test station. 
    What I am trying:
    I open the labview 2013 wxample "DAQmx: Digital - Continuous Output.vi" to learn how I could use a DAQmx task to perform this blink instead of using a dynamic call of a VI changing the output in 'while loop'.
    The example states that my hardware should be able to run it but I always get an error -200077 right at the beginning with the DAQmx Timing.vi mentionning that my PORT2, line 0 does not support the 'Sample Clock' property which is hard coded in the example. I can't find a different property that this example will accept to try to change the status of my digital output on a time basis.  Does the PCI-6519 device support timing for a digital output or not?
    If anyone has a better or simplier idea to achieve such a simple goal, feel free to suggest.  I am using DAQmx for the first time and I don't know much about what my options are.
    Thanks 

    Hi Nienscecco,
    Unfortunately PCI-6519 doesn't support HW timing, I've just tried with a simulate PCI-6519 device and I confirm you that you must specify an external clock in order to use this example.
    Do you have some kind of frequency generator to provide it ? Or maybe another NI board with embedded counters in order to build it ?
    Thanks in advance for your answers.
    Mathieu_T
    Certified LabVIEW Developer
    Certified TestStand Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    LabVIEW Tour
    Journées Techniques dans 10 villes en France, du 4 au 20 novembre 2014

  • My daq 6008 wil not drop the 5V after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside

    my daq 6008 wil not drop the 5V on a digital output after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside, but i can t seemto get it to work

    i attached the block diagram so you can have a look
    Attachments:
    PID Temp control.docx ‏120 KB

Maybe you are looking for

  • Restore Data from external hard drive

    I just update my Palm TX Desktop software to the new v6.2 and have lost all my calendar entries.  How do I restore the back up from an external hard drive

  • HT201304 I'd like to switch to US store, what to do?

    I want to keep my billing address and get access to US iTunes stores. What to do.

  • How can I edit VOB Video files in imovie 09?

    Hi Everyone I wonder if you can help? How can I edit VOB Video files in imovie 09? Thanks

  • Passing options values

    How do i pass select option values to a new servlet. I have a select list out1.println("<form name =\"delim\" action=\"AccCSVNew\" method=\"POST\">"); out1.println("<select name =\"delimiter\" multiple>"); out1.println("<option value = \"type1\">" +

  • Full Screen Caller ID iPhone 6 Issues - ios 8.1.3

    Hello First time poster, having a big time annoying issue with full screen caller ID. Everytime I insert a picture for a contact as full-screen caller ID, it works for a short period of time (hours, maybe a couple days if I'm lucky) before reverting