Synchronize digital output AND digital input NI-USB 6343

Hello
I'm using NI-USB 6343 to drive 1 TTL device. This device can also output a TTL signal to indicate whether the gate is opened/closed. 
I'm using Digital Bool 1 Line 1 Point. I was able to flip gate open/close in timely manner. But i Like to sync DI and DO properly.
I tried to throw in OnBoard clock but it was not successful. 
Is there any way to sync DI and DOI using onbaord/hardware clock?
Any insight will be great!
Thanks!!

Hi,
Synchronizing your DI and DO tasks should be possible with your device. You will need to time them off of a a clock that is usable by both. This information is available in the X Series User Manual
http://www.ni.com/pdf/manuals/370784f.pdf
pg 6-9 and 6-13
You can also find some information and examples of syncing various tasks in the article below.
http://www.ni.com/product-documentation/4322/en/
Best of luck,
Eric

Similar Messages

  • How can i synchronize analog output and analog input timings to generate and measure voltage at the same time.

    how can i synchronize analog output and analog input timings to generate and measure voltage at the same time.

    Read this Tutorial
    http://zone.ni.com/devzone/cda/tut/p/id/3615#toc3
    And also refer to this link where You have repeated this question.
    PS: Please stick to one thread. That way, its easier to keep track of your query and answers

  • No Digital Output available in Playback devices (USB audio device)

    If one has USB audio device with coax/toslink out, with proper drivers (like ie TurtleBeach Micro Advantage) available & installed then Digital Output is available to select in Playback devices. (and one can play AC3/DTS to external amplifier with ie
    VLC or MPC-HT with AC3Filter DS filter)
    But some USB devices (ie Phonic Digitrack -
    http://www.phonic.com/en/digitrack.html ) do NOT come with drivers (as Windows has default build in). Digitrack uses TI
    Burr-Brown USB Audio Codec 2906 -
    http://www.ti.com/product/pcm2906
    Sadly these Windows drivers do NOT have a clue about what the device actually has as inputs/outputs
    So even it had coax digital out & the sound IS send via it, the actual data send is in right way, not recognized/played correctly by Digital Amplifier (AC3/DTS)
    Does anybody know of a hack to make Digital Out available?
    Seb

    Hi,
    Generally speaking, An Audio Device do need more driver besides USB driver to make itself work properly. In terms of your situation, USB driver is not enough to make your Audio Device works properly.  I think S.Sengupta
    is right. Actually it would be better to contact Digitrack support to confirm its product compatibility with Windows 7.
    Roger Lu
    TechNet Community Support

  • ITunes Digital Output using M-Audio Transit USB???

    Hi all,
    Having recently attached an M-Audio Transit USB external "soundcard" to my Mac Mini (PPC) and hooked up the TOSlink digital output from the Transit to my AV amplifier, I can definitely state that Apple DVD Player and VLC both utilise the Digital Output, giving me full 5.1 AC3 signals from DVDs/DivX movies etc, which I had hoped to be the case.
    However, I'm curious as to what the actual output from iTunes is. If I'm playing an Apple Lossles audio file, does iTunes decompress this to the original 44kHz PCM and send this through Core Audio straight to the Digital output of the Transit? In other words, am I getting bit-accurate audio information into the AV amp?
    Anyone who can confirm or deny this, please let me know, as this was one reason for me buying the Transit!!!!
    Also, any idea how to get DTS audio from a redbook CD out from this setup? Will VLC handle it? Or even iTunes???
    Thanks,
    JF
    15" Powerbook PPC G4 1.5 (1Gb RAM) + MacMini PPC G4 1.5 (512Mb RAM)   Mac OS X (10.4.6)  

    You can get full 5.1 AC3 signals from DVD because that's what the audio on the disk is encoded with. You won't get 5.1 AC3 or DTS signals from iTunes if the files are only encoded in stereo. I don't have a Transit, but I have the Sonica USB which is the previous model of the same device. They have different drivers (and your Intel Mac mini would have different drivers than a PPC Mac mini with the same Transit device), but I would guess we have similar experiences with the devices. You won't get DTS out of any file that's not DTS to begin with. That's one reason the Transit System Preferences pane will give you options to configure non-surround sound audio coming from your Mac mini to your stereo.
    -Doug

  • Can I disable 'digital output' and switch to internal speakers only?

    Last month, a jack from a headphone broke off and got stuck in the audio input of my Macbook Pro.
    They were able to get the broken peace out, but I think they damaged something in the input by pulling it out.
    When I press the volume buttons I get this sign:
    https://www.google.be/search?q=no+sound+mac&espv=210&es_sm=91&source=lnms&tbm=is ch&sa=X&ei=Ldr0UtnzNcb8ygPwwIHgAw&ved=0CAkQ_AUoAQ&biw=1020&bih=546#facrc=_&imgdi i=_&imgrc=o0nxcZoiz0kGUM%253A%3Bbd1IQ1bSgYnzxM%3Bhttp%253A%252F%252Fi54.tinypic. com%252Fop1amf.png%3Bhttp%253A%252F%252Fwww.mac-forums.com%252Fforums%252Fos-x-o perating-system%252F253164-no-sound-after-upgrading-itunes.html%3B211%3B205
    When I go to audio preferences I only see 'Digital Output' as an option. (not 'internal speakers')
    The Macbook still thinks there's a jack inside.
    Is there a way to switch on to Internal Speakers (because they DO work, but I cant enable them) by disabling the Digital Output?

    Are you seeing a red light at the port? It can get stuck so that it still thinks the headphones are plugged in. Try taking another headphone jack and plugging it in a few times.

  • Problem with digital output and microph

    Hello! I recently bought a new motherboard MSI K8N SLI Platinum that have onboard Sounblaster Li've 24bit, with coaxial and spdif and also the standard outputs. I ve connected via a fiber optical cable to my amplifier and i checked the digital output only box to the advanced settings on the mixer. I am hearing sound very well from my amplifier but when i connect headphones to with microphone to my soundcard , i don't hear anything at all from my headphones. Also i cannot speak via microphone. If i uncheck the box digital output only i hear sound from my headphones and also i can speak to microphone. Is there some way to have them both enabled? In my previous motherboard i didn't have that problem. I could hear sound from my amplifier with pcm signal and from my headphones and microphone analog at the same time.
    Thanks!

    Thibaud,
    The clue is here: " i take acquisition with one sample on demand."
    You are apparently using software timed output. To maintain accurate phasing at 80 Hz you need timing which is accurate to better than 4 milliseconds. This is not likely to occur with a desktop operating system. Sometimes it will be good and other times OS latencies will throw the timing way off.
    If your board supports it, use hardware timing. The timebase sources on most boards are far more precise and accurate than software timing.
    Lynn

  • 5th media live with no digital output, and now pci slot is dead

    you may recall my previous thread, where my 4th media live, still had no spif digital output.  well i sent it back to ebuyer and got another one, and low and behold the same, only this one is noisyer and the pci slot seems to be dead!
    i have tried a couple of devices in the riser card, and non of them seem to be recognised?
    anyone got any ideas.
    cheers
    john

    OK Status update:
    I posted this question on the Dutch forum as well. I am happy to tell you all that in the Dutch forum Dragonfly is one of the moderators. He knows his MSI stuff
    He gave me the solution to my problem. So just in case anyone else has a similar problem and can't read Dutch, here it is
    He advised me to start the Media Live up with no monitor or TV attached to it at all. Then start up with either a monitor or a TV attached to it. Lo and behold.... the problem is solved.
    All credits for this solution go to Dragonfly 
    Greetz,
    J@n
    PS Mark topic as SOLVED

  • Analog in digital in and digital out slow ?

    Hi
    6261 PC board used.
    I have 5 analogue channels as input, 2 digital channels as input, one of which is a trigger for the analogue
    sample read. The analogue samples are written to a labview measurement file (.lvm) all this
    is fine and dandy and can read up to about 720 k samples/s.
    But when I try to output the second digital input (the one that isn't a trigger), I do not get an output
    that is related to the input (using an oscillioscope to view input and output). The input shows
    about 5 pulses to the outputs one. Eventually I want to sample the second digital inputm and
    delay it slightly before outputting it, but I want to be confident I will be getting the same number
    of pulses out.
    I even trimmed to vi down just have one dig in, going straight out, and it still didn't match the
    number of pulses.
    I am using DAQmx throughout, could that slow things down (using express DAQ) ?
    any help appreciated,
    sandra

    here is my latest vi, I am still having some problems.
    I created this vi from the 'Gen Dig Pulse.vi' example, I have changed it to
    generate the pulse according to ticks rather than frequency and I have
    added the trigger.
    The source of ticks is a digital pulse from an optical encoder that is sending
    out 360 pulse per revolution of an engine crankshaft, the trigger is from the
    same optical encoder, but it one pulse per revolution. I require the
    output to be of the same frequency as the trigger and delayed by a
    configurable number of ticks.
    The output is ok for up to about 400 revs per minute, but after that the output
    is intermittent and some pulses are lost.
    If anyone can take a look at the vi and advise me on this I would be grateful.
    I have tried leaving only the 'wait until done task' in the loop, but this gave
    no output, I also tried adding an implicit 'timing' task, but this gave to many
    outputs,
    regards,
    Sandra
    Attachments:
    Gen Dig Pulsetickstrigger.vi ‏32 KB

  • Audigy 2 ZS and external digital mixer and digital cd pla

    Guru's,
    I've got a problem getting a sound from my Audigy 2 ZS card in combination with an external digital mixer and a digital cd player. One channel of the mixer receives data from the PC (Audigy 2 ZS) and one channel receives data from the CD player. The mixer is connected to a dolby surround system- dvd player that connected to the speakers. When I try the digital out I don't get any sound, when I use one of the analog ports I do get a sound. What is here the ideal set-up and why can't I use the digital out ?
    Here's also a picture:<IMG src="http://www.delier.demon.nl/Conf.bmp">

    Dmob wrote:
    Guru's,I've got a problem getting a sound from my Audigy 2 ZS card in combination with an external digital mixer and a digital cd player. One channel of the mixer receives data from the PC (Audigy 2 ZS) and one channel receives data from the CD player. The mixer is connected to a dolby surround system- dvd player that connected to the speakers. When I try the digital out I don't get any sound, when I use one of the analog ports I do get a sound. What is here the ideal set-up and why can't I use the digital out ?Here's also a picture:<IMG src="http://www.delier.demon.nl/Conf.bmp">
    Do you mean, you do not get digital out from Audigy?
    If yes, then have you set Audigy for digital output?
    See Audigy User's Guide for options (if you don't have one, you can download it herefrom.
    .jtp

  • Combining Digital OUT and Digital IN with DAQmx on E-Series

    Hi,
    I'm trying to combine Digital IN and OUT-function with the DAQmx-driver. I have set the first four channels of my E-Series to IN and the other four to OUT. How can I programm this? I encounter problems when changing an OUT-channel.
    Earlier I did that with the traditional DAQ driver by setting the port to 240 (first four In, second four OUT)
    Thanks for any help

    Hi,
    The easy way i know, is by configure Global Channels at the NI-Max and then use the Linked VI i send.I know it's a elementary VI, but u can continue from this point.
    Hope it helps ....
    Bush-Man
    Attachments:
    Read and Write Digital.vi ‏61 KB

  • Audigy 2 ZS Pro digital output and Windows XP Pro

    Recently "upgraded" my system to Windows XP Pro X64. My soundcard, an Audigy 2 ZS Pro, connects to my logitech 5. digital speakers via the front coaxial connector, no longer seems to output digital signal. The speakers indicate that there is no signal from the coaxial connection. I can hear sound from headphone through the analog output though.
    Before the upgrade, I had everything working, but I don't remember all the details I went through to get it to work.
    I have installed latest driver for Windows XP X64 from Creative, and I have modified the setting to bypass onboard decoding. Is there anything else I need to do? Online documentation talks about applications that I don't seem to have. Is there a X64-compatible application I need to run to get this to work? Thanks.
    George

    Okay Robert, I downloaded and installed your 6.25 drivers and they work fine. However, the Audigy 4 pro software, http://files.filefront.com/Pax+Audig.../fileinfo.html, does not install anything but drivers, no software applications. I looked on your board and could not find any definati've method for resolving this problem.
    Perhaps you or someone else who is familiar with installing the software apps would care to provide a detailed solution.

  • Blackfin video output and digital I/O

    We are currently using LabVIEW 7.1/8.0 and NI MID-7604/7602 stepper driver
    tooperate an infusion pump stepper motor for our biomedical engineering
    senior design project. We hopefully want to burn the entire program that I have
    attached onto a blackfin chip (we have the ADSP-BF537 EZ-Kit Lite). We also
    need to display the front panels of the state functions on an colored LCD
    display via yellow composite video cable (if possible), in addition to
    digital I/O from buttons and a joystick to operate the "OK", "BACK", "HOME" buttons
    and "UP", "DOWN", respectively in our LabVIEW program. Any help would be great,
    any other hardware that may be needed would be greatly appreciated.  NOT TO
    FORGET: this has to be done through a blackfin microprocessor or ADSP-BF537 EZ-Kit
    Lite, if possible. Our senior design project is an Accessible Infusion Pump
    User-Interface. Thank You!
    NI Software :  LabVIEW  version 7.1, 8.0
    NI Hardware :  Other device
    Driver Version :
    OS :  Windows XP
    Attachments:
    Infusion pump interface 2-02-07.vi ‏62 KB

    By "front port" I mean the front mounted I/O bay.
    so which conenction are you using, the flex jack or the coax? They are two different cables, and ports (the coax is RCA, flex jack is mini TRS, or headphone plug).
    You should use the out port on your module.
    You should either connect the headphones via RCA -> RCA from teh coax port on the front bay, or connect via /8" -> RCA if using the flex jack. If the headphones uses a /8" digital in (just like the flex jack), then use a headphone extension cable.

  • Please help with C code to synchronize counter output to analog input

    Hi All,
    I am using NI DAQ USB-6353 with text-based C code to control it. I would like to send a continuous pulse train from the DAQ to pulse a power supply, which then activates an electron beam producing current to be read by the analog input port of the same DAQ. I would like to keep only the analog samples during the pulse peak and samples of a couple pulse widths right after. I am successfully to generate a pulse train using the sampled clock from a counter output channel, but fail to use the same clock to synchronize the pulse train with the analog input. DAQmxReadAnalogF64 is not called by the static function EveryNCallback set for the analog input task. Am I doing something wrong with the following codes? It would be great if it turns out only I am using the wrong sampled clock name of the counter ("dev1/PFI8") for the analog input. Or is something more fundamental that a counter cannot be sync. with an analog input?
    Would someone be able to send me a link to an example in C or C++ or visual basic showing how to synchronize a buffered sample clocked digital pulse train from a counter output channel to an analog input? To simplify the post, the below codes do not include the static functions EveryNCallback and DoneCallBack, but I can send them if needed.
    Many thanks in advance for your help,
    Thuc Bui
    //setting operation parameters
    double initDelay = 0.0, freq = 10;
    double dutyCycle = 0.0001;           //thus pulse width is 10 microsec
    unsigned highTicks = 4;   //per period
    unsigned numSamplesPerPeriod = highTicks / dutyCycle;   //40000 samples/period
    unsigned lowTicks = numSamplesPerPeriod - highTicks;      //per period
    unsigned sampleRate = 2*numSamplesPerPeriod*freq;       //800000 samples/s
    //create counter
    TaskHandle counterTask;
    int errCode = DAQmxCreateTask("", & counterTask);
    errCode = DAQmxCreateCOPulseChanFreq(counterTask, "dev1/ctr0", "",
                                     DAQmx_Val_Hz, DAQmx_Val_Low,
                                     initDelay, freq, dutyCycle);
    errCode = DAQmxCfgSampClkTiming(counterTask, "dev1/PFI8", sampleRate, DAQmx_Val_Rising,
                               DAQmx_Val_ContSamp, numSamplesPerPeriod);
    //create analog input
    TaskHandle aiTask;
    double minVolt = 0.0, maxVolt = 1.0;
    errCode = DAQmxCreateAIVoltageChan(aiTask, "dev1/ai0", "", DAQmx_Val_Diff,
                                     minVolt, maxVolt, DAQmx_Val_Volts, "");
    unsigned bufferSize = 10* numSamplesPerPeriod;
    errCode = DAQmxSetBufInputBufSize(aiTask, bufferSize);
    errCode = DAQmxCfgSampClkTiming(aiTask, "dev1/PFI8", sampleRate, DAQmx_Val_Rising, DAQmx_Val_ContSamp, numSamplesPerPeriod);
    errCode = DAQmxRegisterEveryNSamplesEvent(aiTask, DAQmx_Val_Acquired_Into_Buffer,
                                            numSamplesPerPeriod, 0, EveryNCallback, 0);
    errCode = DAQmxRegisterDoneEvent(aiTask, 0, DoneCallBack, 0)
    //start aiTask first
    errCode = DAQmxStartTask(aiTask);
    //then counterTask
    errCode = DAQmxStartTask(counterTask);

    Hi Xavier,
    Thank you very much for getting back to me. I really appreciate it. I followed your advice with the option 2 and simplified my code by using one of the NI C example templates to generate the below codes (also attached). I was able to see the pulses generated with an oscilloscope, and on the same oscilloscope I could see the ouput pulses of the electron beam probe. Unfortunately, the below code via DAQmxReadAnalogF64 reports of no data read from the probe and finally times out. Below is the error message given by this function. I did check the connection of the analog input wires to make sure they were connected to pin 1 (A0+) and 2 (A0-) because I was using the terminal configuration DAQmx_Val_Diff. Do you see any obvious errors I have made in my codes?
    Thanks a lot for your help,
    Thuc Bui
    Task started, waiting for trigger...
    Acquired 0 analog samples DAQmx Error: Some or all of the samples requested have not yet been acquired.
    To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger,  make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.
    Property: DAQmx_Read_RelativeTo
    Corresponding Value: DAQmx_Val_CurrReadPos
    Property: DAQmx_Read_Offset
    Corresponding Value: 0
    Task Name: _unnamedTask<1>
    Status Code: -200284
    End of program, press Enter key to quit
    ********************** C Code **************************************************
    #include <stdio.h>
    #include "NIDAQmx.h"
    #include <math.h>
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main(void) {  
    int32 error = 0;  
    char errBuff[2048]={'\0'};
    TaskHandle  taskHandleDig=0;  
    TaskHandle taskHandleAna=0;    
    double  timeout=10;  
    double minVol = -1.0, maxVol = 1.0;
    double initDelay = 0.0;  
    double freq = 10.0;  
    double pulseWidth = 1.0e-5; //10us  
    double dutyCycle = pulseWidth * freq;
    unsigned hiTicks = 4;  
    double sampleRate = hiTicks/pulseWidth; //samples/s  
    unsigned lowTicks = ceil(sampleRate/freq) - hiTicks;  
    unsigned nSpPeriod = hiTicks + lowTicks;
    unsigned numPulses = 1;  
    unsigned nSpCh = numPulses*nSpPeriod;    
    double sampleRate2 = ceil(2.0*sampleRate);  
    unsigned sampleMode = DAQmx_Val_FiniteSamps;
     /*********************************************/  /*/ DAQmx Configure Code  /*********************************************/  
    DAQmxErrChk(DAQmxCreateTask("", &taskHandleDig));  DAQmxErrChk(DAQmxCreateTask("", &taskHandleAna));    
    DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandleAna, "Dev2/ai0", "", DAQmx_Val_Diff, minVol, maxVol, DAQmx_Val_Volts, ""));  
    DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandleAna, "/Dev2/Ctr0InternalOutput", sampleRate2, DAQmx_Val_Rising, sampleMode, nSpCh));
    DAQmxErrChk(DAQmxCreateCOPulseChanFreq(taskHandleDig, "Dev2/ctr0", "", DAQmx_Val_Hz, DAQmx_Val_Low, initDelay, freq, dutyCycle));  
    DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandleDig, "/Dev2/PFI12", sampleRate2, DAQmx_Val_Rising, sampleMode, nSpCh));    
    unsigned bufferSize = nSpCh;  
    DAQmxErrChk(DAQmxSetBufInputBufSize(taskHandleAna, bufferSize));  
    DAQmxErrChk(DAQmxSetBufOutputBufSize(taskHandleDig, bufferSize));
    /*********************************************/  /*/ DAQmx Write Code  /*********************************************/  
    DAQmxErrChk(DAQmxWriteCtrTicksScalar(taskHandleDig, 0, timeout, hiTicks, lowTicks, NULL));
    /*********************************************/  /*/ DAQmx Start Code  /*********************************************/  
    DAQmxErrChk(DAQmxStartTask(taskHandleAna));  DAQmxErrChk(DAQmxStartTask(taskHandleDig));
    printf("Task started, waiting for trigger...\n");
    /*********************************************/  /*/ DAQmx Read Code  /*********************************************/  
    double* dataAna = new double[nSpCh];  
    int32 numReadAna = 0;  
    int errCode = DAQmxReadAnalogF64(taskHandleAna, -1, timeout, DAQmx_Val_GroupByChannel, dataAna, nSpCh, &numReadAna, NULL);  
    printf("Acquired %d analog samples\n",numReadAna);  
    if (numReadAna) {   
        unsigned nPts = (numReadAna < hiTicks)? numReadAna : hiTicks;  
        for (unsigned n = 0; n < nPts; ++n) {    
             printf("%6.3f ", dataAna[n]);   
        printf("\n");  
    delete [] dataAna;
    DAQmxErrChk(errCode);
    Error:  
    if( DAQmxFailed(error) )   DAQmxGetExtendedErrorInfo(errBuff,2048);  
    if( taskHandleDig!=0 && taskHandleAna!=0 ) {   
    /*********************************************/   /*/ DAQmx Stop Code   /*********************************************/   
        DAQmxStopTask(taskHandleDig);   
        DAQmxClearTask(taskHandleDig);   
        DAQmxStopTask(taskHandleAna);   
        DAQmxClearTask(taskHandleAna);  
    if( DAQmxFailed(error) )   printf("DAQmx Error: %s\n",errBuff);  
    printf("End of program, press Enter key to quit\n");  
    getchar();  
    return 0;
    Attachments:
    Correlated DIO AI_Sample_Clock Dig Start.c ‏6 KB

  • Will the HDMI adapter for the Ipad serve as an output AND an input?

    I do a lot of video productions and could use an extra moniter on site. The camera I use has an HDMI out, and I noticed there is an HDMI adapter for the Ipad. Would the Ipad recieve/display the signal being sent from my camera? If not, is there another way?

    The Apple Digital AV Adapter only output to TV. It cannot be tethered to a camera.

  • Why can't I use Airplay/Bluetooth audio output and Guitar input at the same time?

    Just trying to understand why it is not possible to use one of the 3rd party guitar input devices and have AirPlay/Bluetooth output turned on at the same time.  it would be very nice to be able to play wirelessely to the stereo instead of adding yet another cable to the mix.
    Thanks

    I found the answer:
    Use GarageBand for iOS with external output devices
    You can use GarageBand for iOS with external devices, including AirPlay, Bluetooth, and HDMI-equipped media devices. When using any of these devices there is no support of audio input.
    http://support.apple.com/kb/HT4622

Maybe you are looking for