Analog Input and Output in One Single VI

I need help in setting both analog input and output in one single VI. How do I assign channels to be either input or output? How do I simultaneously uses both in one single VI with a while loop structure?? Which AO am I suppose to use to obtain signal from the function generator I have built to feed into the DAQCard-1200?? Help!!
Attachments:
Test1.vi ‏48 KB

One thing you'll need to be aware of is that you will need to DMA lines: one for AI and one for AO. If you don't, then you can configure the DAQCard to do without DMA using the Config VI. But you certainly can do this.
As far as your function generator, you will want to do a buffered analog output. You will write your buffer of points to the buffer, and then tell NI-DAQ how fast to update your analog output channel with these values.
So, you can be reading from AI and checking the AO process in the same while loop. Just make sure you handle the while loop execution (the wait it exits) correctly. This can get tricky when you're doing two types of measurements.
J.R. Allen

Similar Messages

  • Synchronizing analog input and output

    I am in the middle of converting some Traditional NI-DAQ code to the
    DAQmx API (I am using C++).  Most of it is going quite well: my
    code complexity has been greatly reduced and (since upgrading to 7.4)
    my CPU usage has plummeted.  However, in one particular case I
    need my input and output buffers to be synchronized.  I.e. sample
    0 of my input buffer should be read at the same instant sample 0 of my
    output buffer went out on the line.  In Traditional NI-DAQ, I
    synchronized my input and output start triggers using the following
    method (which I believe I found in an example somewhere):
    error = Select_Signal(addr, ND_PFI_6, ND_OUT_START_TRIGGER, ND_LOW_TO_HIGH);
    error = Select_Signal(addr, ND_IN_START_TRIGGER, ND_PFI_6, ND_LOW_TO_HIGH);
    This then allowed me to setup my input thread, then initialize
    everything in my output thread and when my output got the start
    command, so did my input.  The result was that I could perfectly
    match buffers of output data to buffers of input data (after taking all
    the appropriate buffering into account).
    When I try the same method with the DAQmxConnectTerms function, my
    buffers don't line up.  They are off by 15-20 ms out of a 400ms
    buffer (sampling at 10kHz).  I tried cutting out the middle man of
    PFI6 with similar results.  So my current "synchronize" block
    looks like this:
    error = m_fnConnectTerms("/Dev1/ao/StartTrigger", "/Dev1/ai/StartTrigger", 0);
    I get no error.  This also seems to cause my output loop to hang
    after a few seconds, although that could be a side effect of something
    else that I haven't tracked down yet.  Is there a better way to do
    what I'm trying to do here?  Perhaps it is a misunderstanding of
    the way buffering works on the M series cards (I am currently using a
    6221).

    Don't use Connect Terminals. Use the technique shown in this example program
    C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Synchronization\Multi-Function\ContAI-Read Dig Chan
    which is the sharing of sample clocks via the DAQmxCfqSampClkTiming function where the sample clock source of one task is set to the clock of the other task.  This example slaves a digital input task to an analog input task but the idea is the same for your application.

  • How to synchronize analog input and output from two different USB daq boards

    Hi all,
    I have two very differnt USB boards the NI USB 6008, which I am using to acquire the data (Analog Input) and a NI USB 9263, it is an Analog Output only board that I am using to deliver a signal (in this case a square pulse). The reason why I am not using the 6008 Analog Ouputs is because I need to deliver negative voltages and need the full +/-10V range.
    Looking at similar posts I am pretty sure that I can't use an external trigger or a shared clock, I also tried to use the synchronization of timed structures but no cigar.
    I am including a quick vi that I whipped out showing how the signal jitters due to the lack of synchronization. The AO from the 9263 connects to the AI in the 6008 in this example.
    Solved!
    Go to Solution.
    Attachments:
    Test Pulse.vi ‏117 KB

    I talked to a specialist in the phone and tols me that it is not possible.

  • Patterned input and output from a single port w/ NI 6534 DIO

    Is it possible to configure certain lines in a port to be read and others to be write? I am interested in doing patterned I/O with a single port, first output, then input. Not both at the same time. Is it possible to perform patterned output on one line and patterned input on a different line within the same port?
    Thanks
    -Scott

    Hi Scott,
    I understand that you'd like to do digital I/O on a PCI-6534. All of the scenarios you outlined in your question should be possible with this board.
    1. You can configure some lines of a port to output signals while others input signals by using a line direction map.
    2. You can do patterned I/O on the same port at the same time.
    I'm not sure what software you're using to interface with the 6534, but if you happen to be using LabVIEW, then there is a shipping example which demonstrates the basics of patterned I/O on a single port of a DIO board. The example is called Digital Multi-line Direction (E).vi and can be found in Help >> Find Examples. If you are using another programming language, then there may be examples on ni.com.
    Hope this helps
    Marcus G.
    National Instruments

  • Multithreaded analog input and output and serial communication during the AIAO

    I need to read in analog data on 4 channels (4000 scans/s on each channel for a total of 250ms) and while this is happening send out two signals: A trigger pulse (which I currently send on an analog channel, using channel DAC0OUT) and two ascii commands using the serial port. My problem is that the data acquisition VI I am using is a blocking VI, it runs to completion before allowing the two signals to be sent. I am using the VI titled, "AI Acquire Waveforms (scaled array).vi" I don't need to look at the acquired data until after the whole operation is complete. Any help anyone can offer would be much appreciated.

    Hello Mark,
    The AI Read VI will block other operations when waiting for data. I would suggest to reduce the number of scans to read (this is an input for the AI Read VI) to help with handling multiple operations simultaneously. By reducing the number of scans to read by the AI Read VI, it won't have to wait for the whole buffer to be read in before "unlocking" the CPU for other operations. You could place the AI Read in a loop and acquire smaller chunks of the data at a time. For instance, your buffer size is probably 1000. Instead of calling the AI Read VI once and waiting for all 1000 scans, you could place the AI Read in a for loop and acquire 200 scans at a time (have the for loop run 5 times).
    Or you could set up the AI Read VI to read 0 scans the fir
    st time and then just read whatever is in the backlog on subsequent calls. There is a backlog output to AI Read; you could use this with a shift register within a loop to read only the data that is already in the buffer. For both of these cases, I would place a wait in the loop (25-100 ms) to give the CPU time to do other things.
    Another method is to use an occurrence. Place the Functions >> DAQ >> Misc >> Set DAQ Occurrence.vi on your block diagram and set the "DAQ Event" input to "Fire every n scans" (the actual string is a little different). Then put in a Wait on Occurrence function (Functions >> Advanced >> Synchronization >> Occurrence) When you use an occurrence, you are waiting for the driver to tell you when the data is acquired, rather than constantly querying the driver, so it is much faster.
    One of these suggestions should help.
    Let me know if you have any additional questions.
    Regards,
    Todd D.
    NI Applications Engineer

  • How to get signal from analog input and send it to analog output (real-time​)

    Hi everyone,
    I am doing simple task in Visual C++ and I am using PCI-6221(37 pin).
    Basically, I want to send same signal from 'analog input' to 'analog output'
    at the same time (almost), to make it real-time application.
    Can someone please provide me sample program. 
    I would appreciate if you could provide me with the good tutorial which explains
    step by step everything about programing NI-DAQmx for C/C++.
    Best Regards,
    Khassan
    Solved!
    Go to Solution.

    This is my code in C++, you can optimize it if it looks too messy. This code reads signal from analog input and outputs it through analog output. 
    To make this code work additional  include directories and library directories must be added from NI.
    I hope it helps someone.
    #include <stdio.h>
    #include <conio.h>
    #include "NIDAQmx.h"
    #include <math.h>
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main(int argc, char *argv[])
    int32 error=0;
    TaskHandle taskHandleRead=0,taskHandleWrite=0;
    int32 read=0;
    float64 dataRead[1000];
    char errBuffRead[2048]={'\0'};
    char errBuffWrite[2048]={'\0'};
    bool32 done=0;
    int32 written;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleRead));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleRead,"Dev1/ai0​","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Vo​lts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleRead,"",100.0,DAQ​mx_Val_Rising,DAQmx_Val_ContSamps,0));
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleWrite));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleWrite,"Dev1/ao​0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleWrite,"ai/SampleC​lock",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1​000));
    DAQmxErrChk (DAQmxStartTask(taskHandleRead));
    DAQmxErrChk (DAQmxStartTask(taskHandleWrite));
    while( !done && !_kbhit() )
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandleRead,1,10,DAQmx_Val_​GroupByScanNumber,dataRead,1000,&read,NULL));
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleWrite,read,0,10.0,D​AQmx_Val_GroupByChannel,dataRead,&written,NULL));
    _getch();
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuffRead,2048);
    DAQmxGetExtendedErrorInfo(errBuffWrite,2048);
    if( taskHandleRead!=0 )
    DAQmxStopTask(taskHandleRead);
    DAQmxClearTask(taskHandleRead);
    if( taskHandleWrite!=0 )
    DAQmxStopTask(taskHandleWrite);
    DAQmxClearTask(taskHandleWrite);
    if( DAQmxFailed(error) ){
    printf("DAQmx Error: %s\n",errBuffRead);
    printf("DAQmx Error: %s\n",errBuffWrite);
    printf("End of program, press Enter key to quit\n");
    getchar();
    return 0;

  • How to temporally match/save Input and Output Channels's data?

    Hello, I have a voltage-input, voltage-output SISO system, and need to indentify its dynamic response (or transfer function) as a reference to a PID control. Without using the system identification toolbox, my goal is to generate/provide a sine sweep input (ranging 1Hz-5kHz for 10sec) to the system and to save the corresponding output response signal as well as the sweep input signal simultaneously.
    I got a sample program online and am trying to modify it as attached, but I really need your advices/comments concerning several problems I am facing with:
    1) With the below setting, the number of the acquired Input channel samples obtained is 5461, which is smaller than expected (i.e., 10000). What would I be missing in setting parameters?
    - H/W: NI-USB-6341 DAQ
    - AO: continuous samples with the waveform timing (1k sampling, 10000 samples => 10 sec, slower sampling just for testing purpose)
    - AI: continuous samples, samples to read: 30k, rate: 1k
    2) I am using flat sequence structure as a way to making the start point of saving AI and AO data same, but wonders if this is a right method or if there is other better approaches. (I had an idea of using an internal clock with "1-sample mode" for sync, but this may not work at the high speed sine sweep like 5kHz, right?)
    3) I just want to provide the sine sweep just once to the system and do not require the "reset" functionality implemented in the original sample program. I failed to remove this "reset" part as I did not fully understand the sample code. If I run the attahed, the generated AO signal is periodically provided to the system. Please give me any advice to modify the program as I want.
    Thanks for your help and valualble time.
    Attachments:
    siso.vi ‏230 KB

    Hi J. Kim,
    To begin, you say you want to synchronize your analog input and output so that they start at the exact same time, yes? To achieve tight synchronization, you need to use DAQmx VIs instead of the DAQ Assistant. There's a good overview of DAQmx VIs  here. There's also a document that deals specifically with synchronization in DAQmx here. Additionally, if you go to Help>>Find Examples in the LabVIEW example finder, you can see many other examples of acquiring data using DAQmx.
    As for your configuration, you have your analog input DAQ assistant wired far before your analog output DAQ assistant in your sequence strucutre, so the dataflow of the program will cause the analog input DAQ Assistant to execute before the output. They cannot be in different sequences if they are executing simoultaneously, and I would not use flat sequences here except to start the two tasks in DAQmx. Where did you find this example?
    Best,
    Dan N
    Applications Engineer
    National Instruments 

  • Synchronize input and output tasks to start at the same sample point [C++ NI_DAQmx Base]

    I'm trying to initiate the analog input and output streams to start reliably at the same sample. I've tried triggering the output from the start of the input using the following code [NI-DAQmx Base 2.1 under Mac OS X with an M-Series multifunction board]. It compiles and runs, but gives an error message at the call to "DAQmxBaseCfgDigEdgeStartTrig". Any suggestions about synchronized I/O on this platform?
    #include "NIDAQmxBase.h"
    #include
    #include
    #include
    #define DAQmxErrorCheck( functionCall ) { if ( DAQmxFailed( error=( functionCall ) ) ) { goto Error; } }
    int main( int argc, char *argv[] )
    // Task parameters
    int32 error = 0;
    TaskHandle inputTaskHandle = 0;
    TaskHandle outputTaskHandle = 0;
    char errorString[ 2048 ] = {'\0'};
    int32 i;
    time_t startTime;
    // input channel parameters
    char inputChannelList[] = "Dev1/ai0, Dev1/ai1";
    float64 inputVoltageRangeMinimum = -10.0;
    float64 inputVoltageRangeMaximum = 10.0;
    // output channel parameters
    char outputChannelList[] = "Dev1/ao0, Dev1/ao1";
    char outputTrigger[] = "Dev1/ai/StartTrigger";
    float64 outputVoltageRangeMinimum = -10.0;
    float64 outputVoltageRangeMaximum = 10.0;
    // Timing parameters
    char clockSource[] = "OnboardClock";
    uInt64 samplesPerChannel = 100000;
    float64 sampleRate = 10000.0;
    // Input data parameters
    static const uInt32 inputBufferSize = 100;
    int16 inputData[ inputBufferSize * 2 ];
    int32 pointsToRead = inputBufferSize;
    int32 pointsRead;
    float64 timeout = 10.0;
    int32 totalRead = 0;
    // Output data parameters
    static const uInt32 outputBufferSize = 1000;
    float64 outputData[ outputBufferSize * 2 ];
    int32 pointsToWrite = outputBufferSize;
    int32 pointsWritten;
    for( int i = 0; i < outputBufferSize; i++ )
    outputData[ 2 * i ] = 9.95 * sin( 2.0 * 3.14159 * i / outputBufferSize );
    outputData[ 2 * i + 1 ] = -9.95 * sin( 2.0 * 3.14159 * i / outputBufferSize );
    // ------------------- configure input task -----------------------
    DAQmxErrorCheck ( DAQmxBaseCreateTask( "", &inputTaskHandle ) );
    printf( "Created input task\n" );
    DAQmxErrorCheck ( DAQmxBaseCreateAIVoltageChan( inputTaskHandle, inputChannelList, "", DAQmx_Val_RSE, inputVoltageRangeMinimum, inputVoltageRangeMaximum, DAQmx_Val_Volts, NULL ) );
    printf( "Created AI Voltage Chan\n" );
    DAQmxErrorCheck ( DAQmxBaseCfgSampClkTiming( inputTaskHandle, clockSource, sampleRate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, samplesPerChannel ) );
    printf( "Set sample rate\n" );
    // ------------------- configure output task -----------------------
    DAQmxErrorCheck ( DAQmxBaseCreateTask( "", &outputTaskHandle ) );
    printf( "Created output task\n" );
    DAQmxErrorCheck ( DAQmxBaseCreateAOVoltageChan( outputTaskHandle, outputChannelList, "", outputVoltageRangeMinimum, outputVoltageRangeMaximum, DAQmx_Val_Volts, NULL ) );
    printf( "Created AO Voltage Chan OK\n" );
    DAQmxErrorCheck ( DAQmxBaseCfgSampClkTiming( outputTaskHandle, clockSource, sampleRate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, samplesPerChannel ) );
    printf( "Set sample rate\n" );
    // trigger output when input starts
    DAQmxErrorCheck ( DAQmxBaseCfgDigEdgeStartTrig( outputTaskHandle, outputTrigger, DAQmx_Val_Rising ) );
    printf( "Set output trigger\n" );
    // ------------------- configuration -----------------------
    // write output signal
    DAQmxErrorCheck ( DAQmxBaseWriteAnalogF64( outputTaskHandle, pointsToWrite, 0, timeout, DAQmx_Val_GroupByScanNumber, outputData, &pointsWritten, NULL ) );
    printf( "Write output signal\n" );
    // set up input buffer
    DAQmxErrorCheck ( DAQmxBaseCfgInputBuffer( inputTaskHandle, 200000 ) ); // use a 100,000 sample DMA buffer
    // initiate acquisition - must start output task first
    DAQmxErrorCheck ( DAQmxBaseStartTask( outputTaskHandle ) );
    DAQmxErrorCheck ( DAQmxBaseStartTask( inputTaskHandle ) );
    // The loop will quit after 10 seconds
    Dr John Clements
    Lead Programmer
    AxoGraph Scientific

    Hi Michael,
    First of all, thanks very much for taking the time to investigate this problem! Much appreciated.
    You asked for "an actual error code you got and any description that is given". The full output from the program that I posted earlier in this thread is appended to the end of this message. In summary, following the call to...
    DAQmxErrorCheck ( DAQmxBaseCfgDigEdgeStartTrig( outputTaskHandle, outputTrigger, DAQmx_Val_Rising ) );
    ... with ...
    char outputTrigger[] = "Dev1/ai/StartTrigger";
    ...the error message is ...
    DAQmxBase Error: Specified route cannot be satisfied, because the hardware does not support it.
    You asked "specifically which M series device you are using"? It is the PCIe 6251 (with BNC 2111 connector block). I'm testing and developing on an Intel Mac Pro (dual boot OS X and Windows XP).
    You asked for "the location you pulled the code from". Here it is...
    http://zone.ni.com/devzone/cda/epd/p/id/879
    ...specifically from the file "Multi-Function-Synch AI-AO_Fn.c".
    I adapted the NI-DAQmx calls to their NI-DAQmx Base equivalents.
    Finally, you asked "Is the trigger necessary, or do you just need to know that the measurements are running on the same clock?". I believe that some kind of sychronized trigger is necessary in my situation (correct me if I'm wrong). Timing is crucial. Say I initiate an analog output stream that delivers a voltage command step 5 ms from the onset. I need to record the response (analog input stream) so that its onset is accurately aligned (synchronized) at 5 ms. A typical recording situation would stimulate and record a short data 'sweep', then wait for the (biological) system to recover, then stimulate and record another short sweep, and repeat. I need all the recorded sweeps to align accurately so that they can be averaged and analyzed conveniently.
    I definitely do not want my customers to rely on an expensive external TTL pulse generator to initiate and synchronize each 'sweep'. That would effectively eliminate the cost advantage of an NI board, as well as adding unnecessary complexity in setup and use. It would be a show-stopper for me.
    It seems perverse, but would it be possible to use a digital output channel connected directly to a digital input chanel to trigger the input and output streams?
    Regards,
    John.
    Full output from test program. Compiled with gcc 4 under OS X...
    [Session started at 2007-05-23 14:17:01 +1000.]
    LoadRuntime: MainBundle
    CFBundle 0x303cc0 (executable, loaded)
    _CompatibleWithLabVIEWVersion: linkedAgainst: 08208002
    _CompatibleWithLabVIEWVersion: result= false, mgErr= 1, theActualVersion= 00000000
    _CompatibleWithLabVIEWVersion: linkedAgainst: deadbeef
    _CompatibleWithLabVIEWVersion: Reseting Linked Against
    _CompatibleWithLabVIEWVersion: linkedAgainst: 08208002
    _CompatibleWithLabVIEWVersion: result= true, mgErr= 0, theActualVersion= 00000000
    _CompatibleWithLabVIEWVersion: linkedAgainst: 08208002
    _CompatibleWithLabVIEWVersion: result= true, mgErr= 0, theActualVersion= 00000000
    com.ni.LabVIEW.dll.nidaqmxbaselv
    CFBundle 0x313760 (framework, loaded)
    {type = 15, string = file://localhost/Library/Frameworks/nidaqmxbaselv.framework/, base = (null)}
    Amethyst:Library:Frameworks:nidaqmxbaselv.framework
    2007-05-23 14:17:02.248 test-ni[4445] CFLog (21): Error loading /Library/Frameworks/LabVIEW 8.2 Runtime.framework/resource/nitaglv.framework/nitaglv: error code 4, error number 0 (no suitable image found. Did find:
    /Library/Frameworks/LabVIEW 8.2 Runtime.framework/resource/nitaglv.framework/nitaglv: mach-o, but wrong architecture)
    CFBundle 0x1751fdc0 (framework, not loaded)
    Created input task
    Created AI Voltage Chan
    Set sample rate
    Created output task
    Created AO Voltage Chan OK
    Set sample rate
    DAQmxBase Error: Specified route cannot be satisfied, because the hardware does not support it.
    test-ni has exited with status 0.
    Dr John Clements
    Lead Programmer
    AxoGraph Scientific

  • Difference in analog input and analog output values

    i am using 6014 DAQ card for providing motor speed reference voltage to Driver and reading back speed
    feedback voltage using LabVIEW 6.0. For this i have used AO Single Update and AI Single scan. Both are in the same while
    loop.The loop has a Wait timer of 50ms. When i take a plot of Analog o/p and input, i get a shift
    between input and output. Why is the shift or the time not synchrnised..please help..When the while loop wait timer is 200ms instead of 50ms, the shift is not there.

    I believe the problem is 2 fold. First if you are using traditional DAQ, or DAQ 6.9.3 or before, the driver is single threaded. Therefore the 2 VIs will not run simultaneous. Try DAQmx and you may be more successful.
    The other is that you are using higher level 1 point VIs. In general they are not the best to use in a time sensitive loop. You are better off using hardware timing, rather than software timing. With hardware timing you have more control over the synchronization of the 2.

  • Analog Levels vs SPDIF Levels Input and Output in Logic Pro

    Hello,
    I ran a test last night for recording input and output levels from my Yamaha Motif XS8 through an Apogee Ensemble to compare Analog to SPDIF
    I connected two TRS cables from the L and R outputs on the Motif XS into the Analog Inputs on the Apogee and also have the SPDIF connection from the Motif to the Apogee.
    I put the master fader all the way up on the XS for the volume for analog.
    The ensemble in Maestro has a +4 and -10 reference notional level option for analog inputs. i had it at +4 but changed to -10 and the analog got louder (i figured it would get louder for +10, confusing).
    anyways, why is it that I can record louder levels for analog than the digital transfer?
    I tracked both options at the same time then recorded vocals over it. the digital sound is too low. what's up with that?
    and when I tried to bounce the recording to listen to it in ITunes, the volume levels were way lower than my cd playing through iTunes. Please enligthen me on these?
    I use to record in a Roland 2480, and had similar results with loudness, but got a little louder through mastering but still....pro cds are way louder and still clear.

    I think there is much confusion here!
    In summary, you wont be able to control the recording level of S/PDIF.
    The reason is that you don't want to!
    You need to think of the SPDIF connection as being more like a file transfer method. You are copying the digital data at an output to your harddrive in effect. If I send you an MP3 via email you'd never imagine that your email software is capable of changing the gain of the MP3 I send you. This might sound daft but its a useful analogy. If you need to increase the "volume" of that MP3 then you'd need to ask the sender. Its the same with your set-up.
    There could well be somewhere on your synth that adjusts the instruments level, other than the master (analogue) output control. For example, make sure the midi volume of the intrument being played is set to full - ie midi vol 128. Perhaps there is somesort of virtual mixer onboard to control all the muti-timbral parts so make sure your part has its virtual fader turned up.
    This is what (basically) is going on in the chain...
    Your synth creates sound in its "digital brain". This sound is sent to an "output stage" which will distribute the sound to various outputs. In the case of the S/PDIF it will just send the raw digital data untouched. For the analogue side the digital signal (same as the one sent to S/PDIF) will be converted to analogue and then sent to a amplifier to get it to an appropriate "line level". This final level could well be controlled by an anogue volume control which could be adding more gain (than you think) too.
    When things go to your sound card/ daw...
    The purpose of a analogue gain control is to set the i/p signal so that it suitably loud to beat any noise that exists in your input circuits - so that a good signal to noise ratio is achieved. Analogue signals need to work in the right loudness zone (so to speak) as the analogue electronics will be designed to handle signal levels of a particular range. the gain control is there to make sure the signal is in that range.
    Digital signals are far more predictable though and there is no advantage to your recordings if the incoming digital signal gets an increase of level at the input stage. All you are doing here is effectively adding a few zeros to the binary digital data!
    Lets face it the point of recording is to get a copy of the original sound, that is as similar to the original as possible. With S/PDIF you get a perfect copy of what's coming out of your synth - so job's a good un!
    If, when you come to mix in logic, you find the level of the digital recording is indeed too low for mixing/mastering purposes then just boost it in logic via a fader or via the gain plugin.
    Those referrence values of -10dBV and +4dBu refer to analogue voltage levels only. they have nothing to do with the digital domain. The -10/+4 switch will be only relevant to analogue inputs and outputs. Using an analogue VU meter you should find that a sine wave that peaks at 0dBVU (totally different to 0dBFS BTW) is the equivant of a digital sine wave peaking at -18dBFS.
    The analogue headroom (how loud you can go before things distort) depends on the analogue electronics and varies with different design. Analogue stuff, like mixers) often has headroom of 24dB or more. So that digital stuff can interface with analogue properly we allow for that analogue headroom to be around 18dB (usually enough in practise!)... hence -18dBFS(digital)=0dBVU(analogue).
    To make your digital and analogue input signals sound similar in level you will probably have to reduce the gain of the analogue input. If you set the incoming analogue signal to peak around -14dB (or less!) or so you will probably find things more equal. If you are working in 24 bit your analogue levels can be seemingly very low before sound quality is affected. Its quite safe to record at -20 or even -30dB as shown on logic's meters for eg.
    I hope all this waffle helps LOL!

  • SIngle reference for PXI 6509 Input and Output

    Hi ,
    I am using 96 channel PXI 6509 as a DIO, In this 96 channels i need to assign 1st port for input, 2nd port for output  and 4th and 5th for input so on. its is not a big deal using labview but labview creates seperate reference( Task in) for input and ouput.
    I need to have a single reference for both input and output ( like we have in NI DCpower for SMU)
    Can any one suggest me how i can achive this?
    Thanks and best regards,

    I would accomplish this with an Action Engine that handles all of your tasks.  Alternatively, make a class that handles all of the tasks.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • SSIS: How to use one Variable as Input and Output Parameter in an Execute SQL Task

    Hello,
    i need your help,I'm working on this issue since yesterday and have no idea how to deal with it.
    As I already said in the tilte i want to start a stored procedure via a Execute SQL Task which has around 15 prameters. 10 of these should be used as input AND output value.
    As an example:
    i have three  Variable:
    var1    int        2
    var2    int     100
    var3    int     200
    the stroed procedure:
       sp_test
          @var1 int
          @var2 int output
          @var3 int output
       AS
       BEGIN
            SET @var2 = @var2 * @var1
            SET @var3 = @var3 + @var1
       END
    So in the Execute SQL Task i call the Stored Procedure as follwos:
        Exec sp_test  @var1 = ?, @var2 = ? output, @var3 = ? output
    (I use an OLE DB Connection)
    The parameter mapping is as follows:
    User::Var1        input                   numeric              0                 -1
    User::Var2        input/output         numeric              1                 -1
    User::Var3        input/output         numeric              2                 -1
    Now my problem. If i set  Var2 and Var3 as Input parameter the values are still the same after running the package. If i set them to a output value the are both Null because the procedure doesnt get any values.
    I already tried to list them a second time - like
        User::Var2        input                  numeric              1                 -1
        User::Var2        output                 numeric              1                 -1
    or i use a new variable
        User::Var2                  input                  numeric              1                 -1
        User::Var2Return        output                 numeric              1                 -1
    but i alwas get the error
    "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
    Has anybody an idea how I can solve this problem?
    Thanks a lot.
    Kind Regards,
    Alice

    Hi Alain,
    thx for your answer.
    I have around 15 procedures called one after the other to calculated and modify my values. Each procedure is responsible for an other but overlapping set of variables. So i thought it would be a good idea to call them one after the other with the needed variables via a execute sql task.
    So if i use a result set, how i get my stored procedure to return 10 values? I would have to use a Function instead of a procedure, wouldn't i?
    As if i have 15 procedures this would be a lot of work.
    But thanks a lot for the idea. I think an other idea would be to create one function which calls all stored procedures and returns all the calculated values as a result set, wouldn't it?.
    Kind Regards.
    Alice

  • I have on;y one audio port can i use it for input and output at the same time?

    i have the new macbook pro 13 in and i want to connect aguitar as input and output on an amp but i have only one audio port

    You can't use the jack as an input and output simultaneously. The solution is to look for a USB or Firewire interface to get your guitar sound into the computer.

  • Multiple inputs and outputs using DAQmx VIs

    Hello,
    I am fairly new with the LabView programming language.  I have a few training books that I have been reading, and I have been following online tutorials and reading the forums.  However, I have come to a problem where I don’t see a clear solution.  I am using LabView 2009 (9.0f3) and DAQmx VIs.
    I am using a NI 9172 chassis PLC, with two 9201 AI cards, 9217 AI RTD card, 9472 DO card, 9263 AO card, and two 9237 AI Bridge cards.
    I am reading eight analog inputs with the 9201 cards, two analog RTD inputs with the 9217 card, three digital outputs with the 9472 card, three analog outputs with the 9263, and eight analog inputs with the 9237 cards.
    I wrote a simple program to test one digital output task, two of the analog output tasks, and a single analog input task.  I put all of them in the same while loop, and it worked perfectly.  However, when I add analog input tasks to the same loop, I get an error 200022.    So I tested each sensor individually by changing the channel before each run.  I searched error 200022 and found that this is because I cannot start another analog input task until the previous one ends.  With this said, I don’t know how to acquire an analog voltage in the same task as an analog RTD voltage.  Both inputs take different constants in the start task DAQmx icon.
    Attached is my test program.  It is titled “Test All”. This is the program I used to test the various sensors.  I tested the input sensors one at a time, and it worked fine.  A few tasks are written just to test functionality, and will be added to later.  The data is only displayed on the screen.  I will add triggers and data write to disk functions later.  This program works now, but if I add more analog inputs, it will generate the 200022 error.
    Can someone show me how to correctly write the code for multiple inputs and outputs using DAQmx?  All training materials and tutorials I can find all show a single input or single output, not multiples of each.  Thanks for looking.
    -Randy
    Attachments:
    TestAll-NI.vi ‏32 KB

    Hi RandyC,
    The Knowledge Base article Using Different Types of DAQmx Global Channels in the Same Task goes into a little more depth of what Bryan is talking about, and it also includes some example code to help show what to do.
    Hope that helps,

  • There are two transactions ZJPVCS303 and ZJPVCS303_US for one single Report

    When run as a batch program, (currently this is the case), or withT-Code ZJPVCS303 the selection screen is unchanged (except for additional sales area above)
    - When run as T-Code ZJPVCS303_UL (UL stands for Upload) the selection screen is changed.  The unix file option is no longer available, and the user is able to upload a local file (in the same format as the current unix file, but tab delimited) to the program for processing.
    Requirements:
    There are two transactions ZJPVCS303 and ZJPVCS303_US for one single Report.
    ->When ZJPVCS303 Transaction is executed, the file is uploaded from the Application
      server to SAP R/3. The selection screen parameters would be:
      Logical Filename:
      Sales Organization:
      Distribution Channel:
      Division:
    ->When ZJPVCS303_US Transaction is executed, the file is uploaded from the Presentation Server
      to SAP R/3. When this transaction is executed, it should not have the 'Logical
      Filename' parameter anymore on the selection-screen. Instead it should only have
      Local File name on the presentation server:
      Sales Organization:
      Distribution Channel:
      Division:
        The same thing is applicable for the other transaction ZJPVCS303. When transaction ZJPVCS303
    is executed, it should not have the 'Local Filename' parameter anymore on the selection-screen. Instead it should only have
    Logical Filename:
    Sales Organization:
    Distribution Channel:
    Division:
    So how should I make these parameters invisible depending on the transaction codes execution.
    I have an idea of using MODIF ID, LOOPING AT SCREEN...MODIFY SCREEN.
    I have an idea of using SY-TCODE.
    EX:
    AT SELECTION-SCREEN OUTPUT.
    IF SY-TCODE = 'ZJPVCS303'.
    LOOP AT SCREEN.
    IF SCREEN-GROUPID = 'GRP'.
       SCREEN-INPUT   = 0.
       SCREEN-INVISIBLE = 1.
       MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ELSEIF SY-TCODE = 'ZJPVCS303_US'.
    LOOP AT SCREEN.
    IF .....
    ENDLOOP.
    ENDIF.
    ENDIF.
    But I am not able to get the output which I require. Please help me out.

    Hello Rani
    Basically the transaction determines whether upload starts from application server (AS) or presentation server (PC). Thus, you will have the following parameter:
    PARAMETERS:
      p_as_fil          TYPE filename   MODIF ID unx,  " e.g. Unix server
      p_pc_fil          TYPE filename   MODIF ID wnd.  " e.g. Windows PC
    AT SELECTION-SCREEN OUTPUT.
      CASE syst-tcode.
    *   transaction(s) for upload from server (AS)
        WHEN 'ZJPVCS303.
          LOOP AT screen.
            IF ( screen-group1 = 'UNX' ).
              screen-input = 0.
              screen-invisible = 1.
              MODIFY screen.
            ENDIF.
          ENDLOOP.
    *   transaction(s) for upload from local PC (PC)
        WHEN 'ZJPVCS303_US.
          LOOP AT screen.
            IF ( screen-group1 = 'WND' ).
              screen-input = 0.
              screen-invisible = 1.
              MODIFY screen.
            ENDIF.
          ENDLOOP.
       WHEN others.
       ENDCASE.
    Regards
      Uwe

Maybe you are looking for

  • How to use xsl-variables

    I have the following piece of code. The numbers are the number of the code lines. In line 17 I want to assign a value to the attribute value of the node options. The value should be the value of the xsl-variable "wildart" which i declared in line 7.

  • How to get the current selected value of a combo box or a option button?

    Hello All, I want to catch the current selected value of a combo box and also of a option button and want save it into different variables in my code. These option button and combo box are in a SAP business one form which I have created through VB do

  • Help Needed in mapping business scenario

    Hi All, I have a RM inter unit despatches for this we are using STO. While doing inter unit despatches we have to pay freight on per kg (Gross Weight) for a source and destination. This has already been mapped by creating a condition type and conditi

  • Language selection

    Hello All... I have an interesting challenge and I figured that the pro's here would know!!! I have some projects that are in use on our LMS and we've been notified that we will need to get some additional language versions and make them available fo

  • Installing multiple packages with pkgadd...

    hi there, sorry about this silly question but I am having some problem to install multiple packages with pkgadd. Basically I have packages with this form "apache-2.4.3-sol10-sparc-local" and not with pkg extension. So, checking the man page pkgadd -d