DAQ Continous Digital Output Changing Buffer each 1 ms

I am developing an application using labview 8.5 and Real Time with ETS.
I need to output continuous digital output in 4 lines but the values will be recalculate in each cicle in a deterministic loop.
I cannot figure out how programm this in LabView.
My last try is in the attached picture.
I would apreciate some help in this issue.
Thanks,
JR Osses
Attachments:
DigitalContinuous2.JPG ‏198 KB

Hi,
You have some examples in LabVIEW Help about DAQmx continuous write digital chanel. You can implement it for RT application to respect the deadline.
Hope this helps.
Benjamin R.
R&D Software Development Manager
http://www.fluigent.com/
Attachments:
Cont Write Dig Chan-Pipelined Sample Clock.vi ‏49 KB

Similar Messages

  • NI PXI 6229 DAQ Card Digital Output High/Low Levels

    Hi everyone, I can't seem to find in the NI PXI 6229 DAQ spec what the Digital Output high voltage and low voltage is when I set a digital signal high and low.  What is the voltage when I set a Digital Output "HIGH" and what is the voltage when I set a Digital Output "LOW"?
    Thanks! 

    See the digital I/O characteristics section of the specs. Typical ttl levels.

  • Digital output daq

    Hi,
    This should be very easy, but for some reason I'm having issues. All I want to do is have a switch control a digital output. I am using an NI 9742 Dsub (link) card, which should be capable of digital output. 
    Attached is my code, with a simulated card. When testing I switch the DAQ assistant properties to the real card.
    Using this code, I cannot get a DC output at all, my scope just hovers around 100mV. Using other cards, I have the Analog I/O working just fine, but for some reason the digital output on this card isn't? Also, if you look at the card, there are 8 green LEDs towards the top. I believe each one specifies when an output is on. When I turn the switch on, the corresponding light does in fact light up, but I cannot measure a voltage? Is there some setting I'm missing?
    Hopefully this makes sense. Thanks!
    -secondary question: Once this works, how do I change the output range. The specs say 6V-30V output, but I do not see where to change this. 
    Solved!
    Go to Solution.
    Attachments:
    digital output help.vi ‏42 KB

    If you dig into the Operating Instructions, you'll notice that you have to supply an external power supply.  The way this card works to by connecting the external supply to the output.  You should also see this on the side of the module.  NI's site doesn't have a good sideways shot, but it looks like a switch.
    So basically, with no power supply you will get no voltage out.  The output range is also adjusted by adjusting the external supply.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Generate a 12 bit digital output at DAQ output pin

    Hi 
      I have only a little knowledge in Labview
     I want to generate a 12 bit digital output at DAQ output pin , from a decimal number. I am using NI USB 6009
     Thanks in advance
      regards DK

    It seems to me that the same question was asked, answered, and marked as solved.
    http://forums.ni.com/t5/LabVIEW/Binary-output-at-t​he-digital-output-pin-as-1111-1111-1111/m-p/249969​...

  • Help with DIgital Output Array with 6062E DAQ CARD...

    Good morning, folks... I need some help with digital output of the 6062E PCMCIA card... I can output 1 line without problems... I need to control a 4066 with my digital outputs... I am doing this without greater problems... but there's something... I need that when one of my outputs is high, the others become low, unchangeably... so I tried to use an array to control my output and I couldn't do that... some errors showed up... can you help me please? Maybe there's any errors at my software, then I thank you if you help me... the vi is anexed...
    Best Regards...
    Attachments:
    Untitled 3.vi ‏20 KB

    See below for one of many methods. Change the "lines" string for your setup.
    Also, please explore the Examples that ship with LabVIEW, and read your card's manual.
    Richard

  • DAQ error on digital output.

    I use a MIO-16E board on my Mac G4. Its analog input and analog output work
    fine. However, whenever I use digital output, I get a error code -10008,
    which means "the group is invalid" (?). This error is generated by "DIO port
    Write".
    Does anyone know what it really means? Even the examples come with LabVIEW
    get the smae error message. Your help is appreciated.

    I believe that the default for digital i/o is that they are configured as
    inputs. If you didn't use DIO Config to set them as ouputs, that might explain
    the error message.
    "Joseph Chao" wrote:
    >>I use a MIO-16E board on my Mac G4. Its analog input and analog output
    work>fine. However, whenever I use digital output, I get a error code -10008,>which
    means "the group is invalid" (?). This error is generated by "DIO port>Write".>>Does
    anyone know what it really means? Even the examples come with LabVIEW>get
    the smae error message. Your help is appreciated.

  • PCI-6023E & digital output

    Hello,
    I have a PCI-6023E and I want to generate a continous pulse train with a digital output line, and I need to know the maximum frequency for this pulse train that I can generate.
    Thanks a lot for your answer.
    Regards, Anacelia

    Hi Anacelia,
    You should not realy on this answer without verifying with NI first. So here goes.
    Page 347 of the catalog indicates the supported data transfer mode is "programed I/O". This indicates that each line state change must be initiated by an operation of the controlling software. Therefore, the upper frequency limit is determined by how often the code that sets or resets the line runs.
    So, the upper limit is determined by the software and the environment it is running in. If you are woring in Windows environment, and your machine is faster than about 400 Mhz then there are two factors to concider when answering your question. How fast does the code run, and how deterministic is it.
    If determinism is not an issue, you could resonably expect to get
    about one update every 10ms if the code is clean. This would give you 100 update per second or about 50Hz.
    If determinism is required, and you are not running in a Real Time environment, the above estimates should be backed off. Anything above 5-10Hz is going to be questionable.
    Like I said, verify what I have said with NI.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Error -200279 with simultaneous analog input (different devices) and digital output.

    Hi guys,
    I am a beginner in Labview and have been dealing with this problem for a couple of weeks now and just can't seem to get it completely right, I have a feeling there are a few small bugs in my code/hardware setup.
    I am running an scxi-1000 chassis with a 1600 module and 1302C along with a 1303 accesory for temperature measurements, this is connected to four thermoucouples. Unfortunately I have a limited number of modules available so I am also using a PCI-6221 DAQ card with an scb-68 breakout box used for a digital output and analog input voltage channel. Attached is my labview program. When I run the code at a 50 Hz sampling rate it runs with no errors but the data file comes out extremely wrong, this is also attached. When I run the code at 100 Hz I get error-200279 after a few loops. I used to have 2 daqmx timing VIs (one for each input), but the same error would eventually happen, I have also tried increasing the buffer size on said timing VI. I am also using an old computer (Pentium IV) could this effect the program?
    I have learned a lot going through forms for similar problems to mine but I just can't get it to for an extended period of time, I have posted my simplest code.
    Thanks in advance,
    Luca
    Attachments:
    tc_2.txt ‏1102 KB
    FinalCombined_2.vi ‏128 KB

    Ok this makes sense. I have made the suggested modifications but still getting the same error with sampling rates of 100 Hz or higher. Could you check that I have implemented the queue VIs properly (new file attached)? Also when running at 50 Hz in debug mode it does not look like the second while loop (with the dequeue element) comes into play until I hit the stop button, once I hit the stop button I get the following error:
    Error 1 occurred at Dequeue Element in FinalCombined_2.vi
    Possible reason(s):
    LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
    =========================
    NI-488: Command requires GPIB Controller to be Controller-In-Charge.
    This leads me to believe I have programmed the queue elements incorrectly.
    Thanks for your help, any suggestions are greatly appreciated.
    Luca
    Attachments:
    FinalCombined_2.vi ‏102 KB

  • MyDAQ, Increase Digital Output?

    Hi y'all,
    I'm currently working with a myDAQ trying to trigger three 3V relays through the digital outputs. My main problem is instead of giving me 5V when triggered, the digital outputs are only giving me ~2V since they can turn on an LED, but they don't switch my relays. Is there any way to increase the voltage coming from the digital outputs?
    I've tried using the analog outputs instead (since they can put out 10V), but can't seem to get those to work the same as the digital outputs. I essentially just want to press a button and the output to send a steady voltage >3V and then turn off once I press the button again. I got this to work with the digital outputs, but the analog outputs throw me buffer errors and other input errors I can't seem to fix.
    I'm a beginner to LabVIEW and myDAQ and would appreciate any help! Thanks!

    Hello SNorrell,
    According to the myDAQ's specifications, each DI/O line can source a maximum of 4mA, which won't be enough to drive your coils unless you use multiple outputs to drive each.  I don't recommend attempting that. 
    Depending on how many relays you need to use, however, it's likely that you can get a few to work without additional hardware by using the built-in 5V supply line to drive the lines and grounding them at the DO.  Invert the logic on your digital lines so that they go low to turn on the relays. You'll need to account for power-up conditions and ensure your hardware doesn't toggle on or off unexpectedly when powering on the DAQ or the PC. You'll also want to ensure you're not driving too much current to the digital pins, refer to the documentation for current and voltage limits.
    Regards,
    Tom L.

  • Route counter ouputs to same Digital Output

    Hi,
    I'm not sure this is possible but i'd like to route the outputs of 2 counters (PCI-6602) to the same Digital Output line.
    My 2 counters each generate a pulse train defined by frequency, dut-cycle and delay. I want to combine the 2 pulse trains into one resulting pulse train. How would this be possible if I can't route the outputs of the counters to the same digital line ? Do i have to abandon this idea and define the desired pulse train in binary and repeatedly output that to a digital line ?
    Many thanks in advance for any feedback here.
    Cheers, Shaun.
    Solved!
    Go to Solution.

    In the end I configured a counter for Pulse Train generation and opted to change the duty cycle and frequency via 'DAQmxWriteCtrFreqScalar" (i.e. Pulse Width Modulation)
    I registered a callback for the 'DAQmx_Val_CounterOutputEvent' and then changed the dutycycle and frequency in that callback. 
    Unfortunately, I kept getting  "The pulse generation with previous property settings must complete a
    full cycle before the property can be updated." error messages and, opon further reading, managed to find a doc where National Instruments suggest adding a 'Wait(period)' before executing the 'DAQmxWriteCtrFreqScalar' call.
    The problem with this solution is that it one has to wait a minimum of 2 Periods before the Pulse Train can be modified which is not acceptable for our work.
    So is there an alternative solution which allows us to change the Pulse Train after only 1 Period ? Is there an event we can trap which allows us alter the Pulse Train after every period ? I'm sure PWM must be possible on Daq cards (PCI-6602 or PCI-6281 or PCI-6259)?
    Cheers, Shaun.

  • Create 4 digital output pulses base on input ttl signal

    Hi
        I am a beginner in Labview and would appreciate any advice on how to solve the following problem.
    I am creating a TTL pulse train, and would like to send that into Labview as input.  For every falling edge detected on the input signal, I'd like Labview to generate 4 digital output pulses.  For each output pulse, I'd like to be able to specify the delay, and duration.       The picture should illustrate it more clearly, with the numbers showing the intended order of magnitude.
    System:  NI PCI-6733 DAQ card, Labview 8.5
    My daq card has 2 24-bit timers, and 8 digital I/O but I don't know what the best approach is for creating between 4-8 output pulses of this precision..should it be handled in hardware, or in software?  And how would I go about it
    Thanks,
    -Sidney
    NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
    Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
    Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5
    Solved!
    Go to Solution.

     Hi Yann,
       Wow, thank you so much for this example!  I'm trying to take a look at it, but when I run it.. it responds with the following error message
    Error -200452 occurred at Property Node DAQmx Trigger (arg 1) in DAQmx Start Trigger (Digital Edge).vi:1->reprise-1.vi
    Possible reason(s):
    Measurements: Specified property is not supported by the device or is not applicable to the task.
    Property: Start.TrigType
    Task Name: _unnamedTask<49>
    This is strange too, because ive already used the Digital Edge Start trigger for a different application with this card.
    -Sidney
    NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
    Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
    Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5

  • Digital Output With Timer (Simulation)

    Hello everyone, I just learned how to make LabVIEW program a week ago. I try to make a simulation of Digital Output by LabVIEW (my attachment). In this simulation I have a slider as an input (0-10 V), two numeric control (upper limit and bottom limit), a waveform chart that plot those 3 value, and two boolean LED (P0.0 and P0.1) as an indicator. In this simulation you can fill any number (between 0-10) in the numeric control as a limit for your slider input. If the input from a slider exceed those upper and bottom limit then the boolean LED will turn on, P0.0 if exceed upper limit and P0.1 if exceed bottom limit. The problem is I don't know how to make timer for those boolean LED. As example:
    1) Make an input from slider,
    2) If input (1) exceed the upper limit,P0.0 will turn on for 5 second,then turn of for 10 second,
    3) If in that 10 second you change the input back to normal (between upper and bottom limit) then P0.0 will stay turn of until the input from slider exceed the upper limit again,
    4)If in that 10 second you didn't change the input (stay exceed the upper limit) then P0.0 will repeat the process (2) until you the input from slider back to normal.
    (Same process for input that exceed the bottom limit).
    Can you help me to make this timer? Thank You (I'm sorry I made a double post):newbie
    Regards
    Juventom
    Attachments:
    Digital Output With Timer.vi ‏16 KB

    Hello Juventom,
    As I understand it you want to be continuously checking the value of the sliding bar and comparing that to the upper and lower limit controls whilest also chaning the LED booleans to true for 5 seconds then false for 10 seconds if the sliding bar value is outside of the limits.
    To do this you would probably be best using a parallel loop design, where you have 3 while loops in place of the one you have currently. Each one of these while loops would be responsible for a part of your program (e.g. the top one would display your values on the graph and the second one who check the sliding bar value against the upper limit and then turn on the LED, etc)
    I've found this tutorial about multiple loop programs and I think you should look at the section entitled "Parallel Execution"
    http://zone.ni.com/devzone/cda/tut/p/id/3749
    This way you can use normal delay VIs but when they run they only pause that loop rather than the whole program.
    Please let me know how you get on with this, and ask me if you need further help.
    James W
    Controls Systems Engineer
    STFC

  • Digital output NI 9474

    Hello,
    I am trying to learn labVIEW DAQ, and right now I am trying to figure out how to use NI 9474 with labview. NI 9474 is a device with digital outputs. I have attached a (poorly drawn) schematic of how I have my real circuit wired. For some reason, the voltage across the resistor is 9v instead of whatever the digital output should be when i set daq assistant to be 1 sample on demand. When I change daq assistant to continuous samples, it reads 4.6v. So I am wondering what am I doing wrong and what should my digital output be?
    I have attached my vi file, so can someone please help me figure out how to use NI 9474 with labview?
    Solved!
    Go to Solution.
    Attachments:
    DO example.vi ‏44 KB
    schematic.png ‏16 KB

    You are supplying 9V, so you should have 9V going across the resistor.  I'm thinking what is happening with the Continuous Samples is that it is toggling between High and Low.  If you measured that with a DMM, you will get around 4.5V.  Measure with an oscilloscope to make sure what is happening here.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Make USB-6001 digital output always high or low in C

    Hello all,
    I am new to the NI DAQ interface. I have an USB-6001 and I am trying to use this device to control some logic circuit in C. So what I want to do is:
    * set some digital output lines to high or low levels, and change their status when needed (in C).
    I have tested the device in NI MAX -> Test Panels, and found that the device is able to do this. Then I try to do it in C. I hace checked the examples, and the function I should use is the one called "DAQmxWriteDigitalU32". I have problem in understanding its input parameters. I have tried something with my own understanding, but it does not work as I expected. Here is one test I did:
    uInt32   data=1;
    int32 written;
    TaskHandle taskHandle=0;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev1/port0/line7","",DAQmx_Val_ChanForAllLines));
    DAQmxErrChk (DAQmxStartTask(taskHandle));
    DAQmxErrChk (DAQmxWriteDigitalU32(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,&data,&written,NULL));
    taskHandle=0;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev1/port0/line0","",DAQmx_Val_ChanForAllLines));
    DAQmxErrChk (DAQmxStartTask(taskHandle));
    DAQmxErrChk (DAQmxWriteDigitalU32(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,&data,&written,NULL));
    I want to simply set "Dev1/port0/line7" and "Dev1/port0/line0" to high level, but only "Dev1/port0/line0" responds me. The second parameter of the function DAQmxWriteDigitalU32 corresponds to numSampsPerChan. If i replace it (currently 1) with a larger value, e.g. 100, I can see that "Dev1/port0/line7" sends a number of 1 out, then return back to 0. So I guess the problem is just that I do not understand well all parameters of the function DAQmxWriteDigitalU32. Can anyone please tell me how I can set a digital output line to 1 or 0? 
    Thanks!
    Hongkun
    Solved!
    Go to Solution.

    Hello,
    Here is a link explaining the inputs of function:
    http://zone.ni.com/reference/en-XX/help/370471W-01/daqmxcfunc/daqmxwritedigitalu32/
    Also here you can find a lot of examples in ANSI C
    http://www.ni.com/example/6999/en/
    Randy @Rscd27@

  • 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

Maybe you are looking for

  • Will Not Sleep In Energy Saver Mode

    My iMac G5 20" 1.8Ghz will not sleep when I set it to sleep in the energy saver panel. This just started for no specific reason a few months ago. It will sleep fine when selected from the Apple menu. I have been through the discussions and no one see

  • MPEG-2 Encoding Results in Silent DVD

    I exported a 23.98fps video from FCP to Compressor and then encoded with the MPEG-2 6.2mbps 2-pass setting under the "DVD: Best Quality 90 Minutes" folder. The DVD I burned from that file in DVD Studio Pro is silent. No audio. What am I doing wrong?

  • How do I get a song off my itunes onto my iphone 4 ?

    How do I get a song off my itunes onto my iphone 4 ?

  • About the physical path for data archive

    Hi guys, Now we're doing the archive work.As our PRD system is a CI+DI system which has two servers just let me call them 63 and 64 here.We mount a media on 63's root directory.So 64 cannot recognize the media indeed.And the background job of delete

  • Would a WD 320Gb drive work in a 1st generation MBP?

    Hi Does anyone know if a "Western Digital Scorpio Black 320 GB - WD3200BEKT" will work in a first generation MacBook Pro? I assume it will but I thought I would check first. TIA, Mark