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

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.

  • 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​...

  • 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.

  • 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

  • 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

  • USB-6009 pulse train generation with digital output....

    Hello!
    I've bought a new USB NI-Card (USB-6009) and now I'm trying to adopt an old vi that uses traditional DAQ drivers. I wrote that vi for a PCI NI-Card (PCI-6024E), which has two counters to generate two pulse trains simultaneously. Now I've only one counter and that's why I'm searching for a good way to create pulse trains using a digital output! The pulse trains are both ranging between 100 Hz and 100 kHz.
    I'm sure somebody has an idea how I can solve the probem in the best way
    Kind regards,
    Peter

    You can't do it with this low cost board. Both digital and analog outputs are software timed only. The analog out is rated at only 150  samples/sec and the digital is about the same. You can't even use one of the counters because it is not a hardware timed counter output. It is an event counter only as an input.

  • Using mathscript to generate multiple digital outputs for switch control

    Hello 
    I am new to this NI LV and a have kind of a basic question. I would like to use Mathscript to generate an array of bolean numbers which will be used to control the Digital I/O lines. I am using NI 6251 USB device and the Mathscript code runs well. But I have a problem using this array to control the Digital output. So I created a simple test programme where I set the DAQ assitant to generate 4 digital outputs(P0.0 ~ P0.3) and it gives error that  ".. number of channels in the data does not match the number of channels in the task..." (see attachment) . How can I solve this problem thank you.
    Attachments:
    K-9.jpg ‏36 KB

    looks like you did not initialize all 4 of the elements in the bool array....

  • 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 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

  • Digital outputs while sampling analog inputs

    I am currently developing a program using LabView 2012 SP1.  I am interfacing with a NI USB-6009 DAQ using NI-DAQmx 9.5.5f4.  I am attempting to acquire a voltage reading on three analog inputs (AI0, AI3, and AI4) at 1 second from startup and at 20 seconds from startup.  The three digital ports: P0.0, P0.1 and P0.2 are used to turn on transistors for the signals in question and must remain high during the ~20 seconds the readings will take place.  I have figured out how to acquire 20 samples over 20 seconds on the analog inputs but have trouble with the digital outputs.  The DAQ assistant is not a good option and the USB 6009 has limitations that are not necessarily covered in the example code im finding.  Basically I need to turn on (write hex 7) to port P0.0-2, acquire my analog samples for 20 seconds, then bring port P0.0-2 low and end the program.  Can anyone help walk me through this?  Thank you in advance.
    RJ
    I surf therefore I am....

    Solved it.  See attached vi.  
    I surf therefore I am....
    Attachments:
    Level.vi ‏69 KB

  • 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

Maybe you are looking for

  • Internet Sharing turns itself off after a minute or so

    I have an Intel iMac running 10.5.2. Up until a week ago, I was sharing my internet connection with a Windows computer and a wii. Last weekend, the connection went dead, I reset the modem and rebooted my computer, and the internet connection is fine,

  • Why is my macbook so laggy all of a sudden?

    It started close to a week ago.  It will work normally for like an hour or so, then it randomly starts lagging.  Every time I try to click something, the beach ball of death appears for 30 or so seconds, everything that I have open just STOPS working

  • Change in Cost center

    Hey All, I want to find out how I can change the cost center on one of the recurring vouchers.  Do I need to delete the existing one and set up a new one? Please explain the consequences on changing the cost centers. What are the other changes we can

  • What os do I have if I am running 10.8.5?

    I can't remember the clever marketing names they use.  Is it Lion?  Mountain Lion?  Mavericks???

  • Flash Creative Suite CS3 : Professional version and/or Standard

    Please advice. I am looking at scanning results from MANY PCs (mostly from "Add/remove programs") and I can see that  there are 2 different types of applications regarding "Adobe Flash Creative Suite 3": Ones that are just called this and some that a