Definition by digital input or output channels program

Which classes/methods in Measurement Studio NIDAQ-mx support let me set programmatically a digital channel for entry or exit? The only methods I met provide lists of channels of i/o configured previously.

Thank you

If you are using a device with digital two-way lines, then you have not specifically set a channel as ot of input-output. Use string functions DAQmxCreateDIChan or DAQmxCreateDOChan with the lines that you want to use. The line will be automatically configured as input or output.

If the device supports the digital two-way, you cannot define an input as string vice versa and the output channel.

Tags: NI Hardware

Similar Questions

  • 6259 switch digital input to output

    Hi all

    I use the NI PXI-6259. One of the digital inputs I want to switch to digital output, send a serial code and switch again one digital input.

    Does anyone have experience with this kind of configuration change during execution of the VI program.

    Thank you

    Basically delete the task that he had as an input, create another task DAQmx with channel configured as output, this task, erase it, create the task with channel configured as an input.

    If you need a tight with switching schedule, I wouldn't recommend this Board.  You may need to set up a Council of RIO with LabVIEW FPGA.

  • Digital input and output problem

    Hello:

    I do a test for digital i/o:
    for a table of the digital signal to an output of data acquisition in the digital input to detect the output signal.
    (bascially, it's like a loop that goes outside the material)

    It's pretty simple, as shown in the attached fichier_1.
    It works well.
    The manual light switch controls, which means that inputs and outputs are ok.

    Then I went on the low level DAQ for better speed, as in attached fichier_2.
    But it does not work. Especially when I pressed stop to abort the loop, an error has occurred:

    To speed up, I went to the low-level data acquisition as the fichier_2 attached.
    But it does not work. Espeically when I press the "stop"button to exit the loop, the error occurs.

    Possible reasons:

    Requested value is not supported for this property value.
    The value of the property may be invalid because it is in conflict with another property.

    Property: SampTimingType
    Asked the valuelarge clock
    You can select: on request

    I don't understand why the sampling time has a conflict here.
    (It is probably just something very simple in data acquisition, but I checked a few examples and did not find a clue).
    Hope someone can give me a suggestion.

    Ultimately, my goal is to make the attached file_3.
    In this one, I generate a digital output, and then lead to the entrance.
    Then I can take it as a signal to trigger my other task.

    Note:

    I use a similar conti signal to control one of my camera.
    I need to sync it with my another task.
    So I think to generate a digital output (which share the same clock as the signal similar to the data acquisition device), then put it in one of the digital input.
    By detecting this digital input, I can trigger my task and synchronize with this signal similar.
    My camera's USB-6211.
    I am aware of the latency of USB, but once the value is a constant value, then the synchronization is always good for me.
    Actually, I was using an analogue at the entrance of the to do it before, it may work, but the synchronization error is too big for me.
    I need to do some calculations/judgment for this analog value, which makes the time difference varies.
    So I'm trying digital entry now and I hope that the digital input can trigger my task with a stable latency.

    Thank you very much

    Have you looked at the specs? It clearly states that the digital I/o is a programmed software. You have not any hardware clock at all. The best rate that you could possibly achieve is around 1 kHz and which would have a considerable jitter the nature of non-determimistic of windows.

  • 9421 sinking digital input toggles output

    I have a digital input module 9421.  I'm only using a single port (0).  The line is 'high' all the time.  I can see it on the lights and the tool MAX.  I can turn on/off the line and see the LED and MAX change, so I know I have the cable correctly thing.  But in normal operation, it is always powered.

    It is, when I run LabVIEW mode trace with a probe on the output ExpressVI DAQ, I see that all the other times my code, the output of flicks from true to FALSE and vice versa... and so on.  The acquisition of data ExpressVI is inside a while loop.

    Any thoughts?

    DH

    I had selected "simulated" cDAQ

    DH

  • Is it save to use the digital output as a digital input for another channel signal

    Hi all

    I know it's a stupid question, but I don't have another generator of signals by hand. What I want to know is, can I use the signal digital output of my USB-6001 as an input for the same signal device, but on other digital port? I wasn't directly because I don't want to burn the device...

    Thank you

    Done all the time. No problems.

  • Precise triggering voltage input and output generation in the DAQ Assistant

    Hello

    I wonder if anyone has come across a simular problem with the synchronization of input and output voltage. I use a box 11 LabView and NI USB-6259. I have been using the DAQ Assistant to configure the input and output channel. In particular, my task is to generate a single rectangular "pulse" as the output voltage to drive a coil and once the pulse went to get a signal from a sensor of magnetic field and get a power spectrum. This means that the order and the time during which the DAQ Assistant is used is extremely important. For example, the output voltage channel must be opened first for 2 seconds. Subsequently, the channel of input voltage must be open for 1 second, in which the sensor signal is obtained and post-processed. Only after these tasks are performed in this order he can can be repeated in a loop until the experiment is over. I don't know how to trigger data acquisition assistants (one for entry) and the other for the voltage output correctly. Y at - it a trick?

    See you soon

    Michael

    Hi Dave,.

    Thank you that I wired the error strings but the timing issue was unrelated to it. In the DAQ assistant, I simply had to choose the continuous aquistion of the 'samples' methods 'N-switch' for input and output voltage and all works fine now.

    Thanks again

    Michael

  • analog input and output synchronization

    Hello everyone, I seem to have a problem of synchronization of the analog input and output on my M-series USB-6211. My request is quite simple. I want to the production and to acquire a sinusoid at the same time. Theoretically, I should have the same 4000 data points through the input and output channels. The reality, however, captured on an oscilloscope, shows that the analog output is off more than 4000 data points. The entry (acquisition) shows 4000 samples. Please see below an excerpt from the creation of task, timing and execution. I'm afraid that the analog input and output are not attached correctly. Do you see something suspicious? Thank you very much! The task was created: DAQmxCreateTask("",&inTaskHandle); DAQmxCreateTask("",&outTaskHandle); Analog output channel Configuration, with 20Ksamples/s: DAQmxCreateAOVoltageChan (outTaskHandle, physChanOut, ' ',-10, 10, DAQmx_Val_Volts, NULL); DAQmxCfgSampClkTiming (outTaskHandle, "OnboardClock", 20000, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 4000); Configuration of the analog input strings: DAQmxCreateAIVoltageChan (inTaskHandle, physChanIn, "", DAQmx_Val_RSE,-10, 10, DAQmx_Val_Volts, ""); DAQmxCfgSampClkTiming (inTaskHandle, "OnboardClock", 20000, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 4000); Set up the trigger: sprintf ("/%s/ai/StartTrigger", local_port, deviceName); DAQmxCfgDigEdgeStartTrig (outTaskHandle, local_port, DAQmx_Val_Rising); Output: DAQmxWriteAnalogF64 (outTaskHandle, (numberOfSamples * oversample), 1, 40, DAQmx_Val_GroupByChannel, input, & sampsPerChanWritten, NULL); Acquire: DAQmxReadAnalogF64 (inTaskHandle, 4000, 40, DAQmx_Val_GroupByChannel, readArray, 8000, & sampsPerChanRead, NULL); The tasks stop: DAQmxStopTask (outTaskHandle); DAQmxStopTask (inTaskHandle);

    Hello

    Change the finished continuous sampling method seems to solve the problem:

    DAQmxCfgSampClkTiming (inTaskHandle, "OnboardClock", 20000, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 4000);

    Also, I wanted to say earlier to write 4000 samples:

    Output:

    DAQmxWriteAnalogF64 (outTaskHandle, 4000,1, 40, DAQmx_Val_GroupByChannel, input, & sampsPerChanWritten, NULL);

    Thank you

  • OR 9403: Digital Input/Output slows timed loop?

    Hi all

    I use a loop timed sample of 7 current channels (NI 9023), 3-channel (NI 9025) voltage at 1000 Hz in scan mode and it works fine. However, when I add for 8 output channels of the input/output module digital module NI 9403 for timed loop, CAPAS sampling cannot exceed 1000 Hz. According with time stamp data I wroten in file, it seems that I have in all ten milliseconds, I missed a miliseconds.

    I would like to ask is there a reason for this? The digital I/o module affect the timed loop?

    Thank you much in advance.

    I'm not familiar with the FPGA code, so I can't comment there.  However, I noticed that you call writing to text file twice in the timed loop.  Can you only collect data and then write the files after the time loop?  This would save a lot of time.  For each entry, the program needs to access the hard disk, find the end of the file, add him and return to write on the hard drive.  A lot of your time, especially since the files are getting bigger.

  • Problems with the digital input/output

    Hello

    I have a little problem with my card PCI-6143. I would use two connectors digital one as a starter and one as an output. Now, I have the problem that I do not know how I address them. The input works as I want but not the output.

    As an example. I call my channel output on this name: Dev1/port0 / line0:0.
    With this call, the application works very well. If I change the output channel to Dev1/port0 / line4:0 I get an error that the values can be read and 0 and 1 are valid values.
    I hope that the call is right, I wrote that out of my head.

    My questions are. Is it correct to call a single digital channel with this name?
    I'm not sure because I do not understand what these means 'line' and if I allocate really single channel or more.
    The second question is, can someone give me an example of how I assign two digital channels (how to address them)?
    I know it's maybe an easy question, but I can't seem to get it corrected.

    Hope someone can help me.

    Best regards

    The syntax that you use is intended to select several channels: the numbers are the initial and final channel in a subsequent channel list. Thus, written Dev1\port0\line0:4 means 5 lines are included in the read/write (FWIW written 4:0 has the same effect). It is redundant but good writing line0:0, which means a single line, but you can write to Dev1\port0\line0 which is simpler.

    This is a help page on this topic.

  • inputs and outputs analog digital usb 6009

    I'm having a problem with my USB 6009 in labview programming.  I try to read continuously from the analog inputs while having an event focused on digital output within the same program/vi.  Basically, I need to taste all the time the analog inputs while having an event defined by the user (button control) to signal the digital inputs to turn on then after awhile.  The event of digital output must be independent of the analog sampling system.  I was throwing the "error already allocated resource" in most of the vi, I wrote to try to achieve.  What is programmatically possible with usb 6009?  I am at my wits end trying to do this and any help would be greatly appreciated (by myself and my boss).  Thanks in advance for your answers.

    RJ


  • Digital input to Toshiba 46TL-> no analog audio output to amplifier

    Hi all

    When I connect a video source (e.g. computer laptop via DLNA) to my 46TL, output TV audio analog (red/white taken connected to an amplifier) does not work.

    It does, however, watching television.

    Is it possible to configure the TV to read the audio data from digital input (HDMI/DLNA) to the analog output?

    Thank you for the help

    Not quite what series of TLxxx you have, but for example the TL938 supports a digital (optical) audio output port that provides a digital audio signal.
    Why n t connect the amplifier to the TV using this Jack?

    Connectors for component video / audio to the rear of the TV are the ports of ENTRY and not the OUTPUT ports. So, you can send an audio signal to the TV and not the amplifier output.

  • sbRIO-9631 digital inputs/outputs using e/s node FPGAS and FPGA of i/o method node

    Hello, I'm trying to configure my SBRio-9631 for the first time.  I try to use the on boards to inputs and digital outputs.  The following code will work?  This is a simple "read the entries, 'or' some inputs and pass ' exits."  I have to add "E/s method nodes FPGA" between my 'FPGA of i/o nodes"to get"modes of State of sorting for the input and output lines?  Also, I can't simulate/test it works, by adding 5 VDC at the entrances, and not have any source of voltage output.  Thank you for your time.

    Hey, Spex,.

    I really, really appreciate your help.  Your follow up information was exceptional.

    Thanks again for your help and your time.

    gjmm

  • digital output: relationship between input and output values

    Hi, could someone tell me if you are using digital lines material OR daqmx (SMU 6358, if it is dependent on the device), what is the value of weight of the inputs that will change the output of 0s to 1s?

    Suppose, I write a table of 10 numbers from 0 to 9, which will output look the same?

    Thank you.

    This is of specific devices, but you will see a pattern the same values across many devices. Of the datasheet for your SMU:

    • Continuous positive threshold: 2.2V
    • Line negative: 0.8V

    Yes 0 - 9V, depends on which direction you're going. It is a grey between 0.8V and 2.2V area because the value will not switch until it reaches the threshold value.

    From False to True, you need read a value of 2, 2V. Changes from true to False, you will need to read a value less than 0.8V

    This image does a good job of this representative. See the red line (positive course) and green-(négatif cours).

    Your title says "Exit" and with the intervention. The above information concerning the digital inputs. The 0V or 5V output feature.

  • 9421 sinking digital input module toggles output

    I have a digital input module 9421.  I'm only using a single port (0).  The line is 'high' all the time.  I can see it on the lights and the tool MAX.  I can turn on/off the line and see the LED and MAX change, so I know I have the cable correctly thing.  But in normal operation, it is always powered.

    It is, when I run LabVIEW mode trace with a probe on the output ExpressVI DAQ, I see that all the other times my code, the output of flicks from true to FALSE and vice versa... and so on.  The acquisition of data ExpressVI is inside a while loop.

    Any thoughts?

    DH

    I have chosen the cDAQ "simulated".

    DH

  • How to synchronize 2 digital output channels that have been created with DAQmxCreateCOPulseChanFreq

    Hello

    I use peripheral USB6221.

    I created two digital output, operating on a frequency of 75KHz and duty cycle of 50%. But I need a period of 1 microsecond between the two channels.

    I have craeted the two channel on the same task and guess if I use a delay of 0, the channels will be synchronized, but looking at the scope, the channels are not synchronized. Here's the code I used (I checked also all return codes of coarse and fine).

    Thank you

    Danny.

    Int32 RetCode;

    RetCode = DAQmxCreateTask ("", & m_OCtaskHandle);
    LogMessage (RetCode, "CreateTask", "");
    If (RetCode > = 0)
    {
    define the first output channel for 1 transmitter (75KHz)
    RetCode = DAQmxCreateCOPulseChanFreq (m_OCtaskHandle, "/ Dev1/ctr0", ")
    "Transmit1 Line 1", / * name to assign to the channel * /.
    DAQmx_Val_Hz, DAQmx_Val_High,
    0.0, / * initial delay in seconds * /.
    75000.0, / * Freq * /.
    0.5 / * market factor * /);
    define the second output channel for 1 transmitter (75KHz with 1 microsecond delay)
    RetCode = DAQmxCreateCOPulseChanFreq (m_OCtaskHandle, "/ Dev1/ctr1", ")
    "Line2 Transmitt1", / * name to assign to the channel * /.
    DAQmx_Val_Hz, DAQmx_Val_High,
    0,000001, / * initial delay * /.
    75000.0, / * Freq * /.
    0.5 / * market factor * /);
     
    Describe all channels continuous task
    RetCode = DAQmxCfgImplicitTiming (m_OCtaskHandle, DAQmx_Val_ContSamps, 1000 / * I think that NA since continuous * /);

    RetCode = DAQmxStartTask (m_OCtaskHandle);

    Hello Danny,

    If you are looking for more output channels of the Digital pulse trains, you can create 1 task of counter that is used as the clock for digital multi-line data output. For this digital task, you will need to make the clock source line PFI for the output of your task of counter. Once this has been done, you will need to create the digital signal for each line of output and write to the card. The example called write dig Chan - Ext Clk will explain how to set up the digital task so that the task has an external clock (the counter). I hope this information helps you and if you have any other questions, feel free to post.

Maybe you are looking for