virtual digital input problem

Hello

I'm learning about labview data acquisition. So, I made a base for digital vi, with a virtual digital input device. For some reason any I can not output anything other then zero, but when I run the daq assistant (when you install assistant daq) Boolean values between 0 and 1. But, in my VI I can't get any other input then set to zero.

I enclose my VI.

Thank you

You should associate your stop button at the entrance to Stop on the DAQ Assistant.  You are openening and close the task each time when you do not do this.  According to me, which is also reset the activation/deactivation of the simulated device.

Tags: NI Software

Similar Questions

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

  • How can I set up a digital input task to read continuous samples?

    I am trying to create an exclusively digital task that will make digital readings at a rate timed by the material using a PCIe-6509. However, when I try to put the task timing as follows (which works on a PCIe-6509), I get the following error:

    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: NationalInstruments.DAQmx.Timing.SampleTimingType

    Required value: NationalInstruments.DAQmx.SampleTimingType.SampleClock

    Possible values: NationalInstruments.DAQmx.SampleTimingType.OnDemand, NationalInstruments.DAQmx.SampleTimingType.ChangeDetection

    Task name: DigitalInputTask

    State code:-200077

    The relevant parts of my code are:

        public class DigitalInputReader: IDisposable
    {
    public DigitalInputReader()
    {
    dataReadyHandler = new System.AsyncCallback (DataReadyEventHandler);

    daqmxTask = new DigitalInputTask();
    daqmxTask.Configure (Globals.NI);

    daqmxTask.Control (TaskAction.Verify);
    daqmxTask.Control (TaskAction.Commit);

    daqmxReader = new DigitalMultiChannelReader (daqmxTask.Stream);
    }

    public class DigitalInputTask: task
    {

    public DigitalInputTask(): {base ("DigitalInputTask")}

    public virtual void Configure (NiConfiguration niConfig)
    {
    <= niconfig.digitalinputs.count="" -="" 1;="">
    {
    String physicalChannelName = niConfig.Device + "/ port" + niConfig.DigitalInputs [i]. Port.ToString () + "/ line" + niConfig.DigitalInputs [i]. Channel.ToString ();
    String nameToAssignToChannel = niConfig.DigitalInputs [i]. Name;

    DIChannel ch is this. DIChannels.CreateChannel (physicalChannelName, nameToAssignToChannel, ChannelLineGrouping.OneChannelForEachLine);
    c. InvertLines = niConfig.DigitalInputs [i]. InvertLines;
    }
    var signalSource = "";
    This. Timing.ConfigureSampleClock (signalSource, Globals.MachineSettings.SampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);// Globals.MachineSettings.SamplesPerChannel);
    }
    }

    The last call to Task.Timing.ConfigureSampleClock, it's which throw errors.

    Of the options available, or SampleTimingType.OnDemand or NationalInstruments.DAQmx.SampleTimingType.ChangeDetection provide the same precisely timed calls that I am familiar with the analog input interruptions.

    How is it possible in a digital task?  I mean, it seems that I could set up another task to do call by material for the production of a clock signal and use the ChangeDetection synchronization mode, but this seems a bit complicated for what should be easy to do.  What Miss me?

    Update: I thought about it.  You cannot call ConfigureSampleClock when the digital input card is a device of 650 x, because these devices have any automated examples of clock.  They are configured to run in mode default finite samples.  You must make all sample synchronizing with these devices in the software.

    Be cautious, however, because the .NET timers ensure they put any faster than their scheduled interval.  In practice, they are usually 5 to 10 ms slow by tick.  This means that if you want to read samples every 100 ms by sample clock, you'd end up reading all 108 ms samples.  All counters based on the elapsed time and number of samples would be away after a few seconds of it.

    Instead, you must do one of four things: write a doggone driver that runs in ring 0 and interfaces with the PCIe card in the required interval (i.e. on NC, not you, in practice), tolerate the inclination of the clock, use a multimedia timer as an interruption audio or video that is more likely to respond to the correct interval, or , my solution, an accurate clock allows you to set the interval of the timer.  I wrote the following code to the timer:

    var CorrectiveStopwatch = new System.Diagnostics.Stopwatch();
    var CorrectedTimer = new System.Timers.Timer()
    {

    Interval = targetInterval,
    AutoReset = true,
    };
    CorrectedTimer.Elapsed += (o, e) =>
    {
    var actualMilliseconds =;

    Adjust the next tick so that it's accurate
    EG: Stopwatch says we're at 2015 ms, we should be at 2000 ms
    2000 + 100 - 2015 = 85 and should trigger at the right time
    var StopwatchCorrectedElapsedMilliseconds = newInterval +.
    targetInterval-
    CorrectiveStopwatch.ElapsedMilliseconds;

    If we're over 1 target interval too slow, trigger ASAP!
    <=>
    {
    NvelIntervalle = 1;
    }

    CorrectedTimer.Interval = NvelIntervalle;

    StopwatchCorrectedElapsedMilliseconds += targetInterval;
    };

    I hope this helps someone.

  • NEITHER 6501 digital input

    Hello world

    I use an NI USB-6501 and I'm trying to understand how to read the entries.

    I used this card to generate output using the example vi write Chan digging, it works fine.

    Now, I'm trying to use the example of reading dig Chan vi to read an input voltage. But it seems that, by default, the map reads 5V (a 1 logic) as entered on each pins, even if nothing is connected to them. I tried to connect the output to the input, use a relay to see if it detects a change in the entry, if we send a voltage or not, but it changed nothing. It still reads 5V anything.

    Can someone help me understand how to be able to read an entry? This problem has happened to someone else?

    Thanks in advance.

    Frédéric

    If you dig through the data sheet, you will see that there is a 4.7kOhm shoot all digital inputs.  So with the floating inputs you will get a high (logic 1).

    As Dennis have already said, wire your digital output directly into your digital input.  So everything that you set the output that you will read on the entry.  I don't know what you do with a relay.

  • Raising an event based on digital input? Treatment of a condition of emergency stop

    I'm working on a test sequence into LabVIEW.  I have a security which I am followed by a digital input the relay status, and I would like to pass to my failed state that I am in a State of emergency.  (In my case, this happens when a barrier is broken or emergency push button is pressed).

    It would be easy to do if I could use a digital input to trigger an event.  However, this doesn't seem to be possible.  I tried bind my digital input to a control, and then follow the State of the control as an event, but that doesn't seem to work.

    My main problem is that I can be in one of the stages of test 5 seconds approximately.  So far, I have not found a way to out or interrupt this step if my digital input changes state.  I can get it to transition to the failed state after the step in progress, but I want that it to transition immediately when the safety relay is broken.

    I've attached a picture that shows the basic structure of my program.  The actual program is much more complicated, so I hope this is enough information to get started.  I have stops in each loop attached together with the help of a subvi, which basically returns a Boolean TRUE if you press the 'stop' on the operator interface (it is one of the events of my structure of the event).

    It seems that it would be a fairly common situation that there must be some answer I'm missing.  Can anyone help? Thanks in advance...

    You need (somewhere) a loop that monitors the digital status and can detect the transition Fail.  The timing of this loop of 'surveillance' apply to how fast you can respond to failure.

    But now you need to trigger an event when this happens.  When I started programming in LabVIEW, I learned on the events of signs of value that could trigger programmatically a value indicator has changed.  However, a few years later I learned the user events, a more flexible method for generation "software interrupts' who have a number of advantages over value of signage.

    I don't know if you are looking for using LabVIEW or LabVIEW examples user events you'll find a good explanation for how to use these (use the Help Index, and then type user name).

    Bob Schor

  • Digital inputs only noisy when the laptop is plugged

    I had problems with loops of Earth and power supplies for laptop in the past.  But it is the first time I got it so wrong that it makes the digital inputs which are both related to the ground and the debounced software cannot be used.

    It is NOT material OR.  It's a DT9816 of data translation, a USB DAQ Multifunction with small budget.   The laptop with the problem is a refurbished Dell, with a very obvious not Dell PSU who throws to the top of the warning in the BIOS and scales back from the processor.  (Danger Will Robinson!)

    The problem with the digital entries shows only upward on the Dell when it is plugged into a power outlet.  On all other machines and with the printer unplugged Dell, digital inputs floating.  But those that I have attached to the Earth is rock solid and work very well.

    What surprises me is more than the noise is so bad that even tied to the ground with a half second debounce, I get always false triggers.  I have not brought to power, but considering that it sounds really loud, I suspect that it looks pretty bad.

    I think I'll try a powered USB hub.  If this does not work, then I think that the customer will have to replace the power supply on the laptop.

    However, I was surprised.  I used a lot of USB DAQ hardware, and it's the first time I've never seen a problem like this.  The NI USB 6002 I tested on this same laptop does not seem to show the same problems.  Even if it is true that this is a different software and the test was brief.

    I'm curious to know if other developers have found something similar in the past.

    I can confirm that using a USB hub external powered eliminated the problem of noise in the original post.

    Interesting things.  I had not seen this before.  Now, I wish I had again the NI DAQ USB I had here last week so I could test that.

    Looks like I'll use a hub powered on this project.  But I think I will recommend always replace this power.  Although a lot of noise coming from the power supply, probably isn't good for nothing plugged it... or even sitting near him.

  • A voltage divider will be enough to read a 28V pulse in NOR-6251 digital input ports?

    Hi all

    I am a scientist life sciences that attempts to read a 28V 4.2mA pulse signal sent from my operative box animals in my NOR-6251.

    Sounds like a voltage divider should do the job. But I would be aware of anything else that my card OR not to burn? And should I be concerned about the current entry in the map OR?

    Thanks for your help!

    Hello

    Research on page 7 and 8 of the Datasheet of NOR-6251 , it shows that the maximum voltage is 5.25V, so use a voltage divider to make 28V up to 5V and you should have no problem providing you can guarantee your 28V source will always be to 28V or less and your resistances are fairly accurate. Under no circumstances should provide you more 5.25V to the digital input.

    The only concern you have on current is that the resistance divider is not affected by the impedance of the digital input which is little likely (datasheet says max 250uA), so if you use resistors around the range of 5 to 50 k, you should be fine. Also, be sure your part of wiring resistance as if she had the wrong way, you will have a great chance to break the map!

    I hope this helps!

  • Question of the digital input USB-6009

    Hello

    I use USB-6009. I have problem in Input.I digital did not connect anything on all channels. But all of the DI/O channels generate 5 volts. And I tested the DI/operating system in the Test Panel also. All digital inputs are high. How I use it? Please suggest me the solution.

    You're the one who said it was generating 5V. And I said that a fine should be detected as a logic one. Connect a gnd input.

    When it starts, all of the default value of I/O at the entrances.

  • NI 9421 - Digital input Module

    Hello

    We have a 9073 cRIO chassis and a digital input module (NI 9421). We installed also driver on this website - http://sine.ni.com/psp/app/doc/p/id/psp-177/lang/en and added 'modules C series' under the 'chassis (cRIO - 9073)"as shown in the illustration #1 as an attachment.

    True to use 9421 is this way? And should we right click and select "deploy all '? And how can we resolve the conflict as pictured #2?

    Thank you...

    Hey drycsr,

    First of all, make sure you have the drivers and rt versions listed here:

    FTP://FTP.NI.com/pub/DevZone/tut/crio_software_versions.htm

    Since you seem to have most of the currently running system, I think that you do not have those are installed.

    To solve the problem in photo 2, follow the instructions to install on your cRIO scan engine support. This document is for PXI chassis, but it explains the general process:

    http://digital.NI.com/public.nsf/allkb/D170D1AF82303EA086256B4200780579?OpenDocument

    This document may also be useful:

    http://zone.NI.com/DevZone/CDA/tut/p/ID/7191

    As for your other question, you seem to be using the hybrid mode, which uses both FPGA (you have your module to your FPGA project level) and the scan mode of the interface (you have your module to the "frame" of your project level). This is not necessarily recommended for reasons explained here: http://ae.natinst.com/public.nsf/web/searchinternal/61276465e3043c0c8625749e005cc8a1

    Scan by itself is discussed here: http://zone.ni.com/devzone/cda/tut/p/id/7338

    FPGA and scan mode to discuss in the guides started can be found here:

    http://sine.NI.com/NP/app/main/p/AP/global/lang/en/PG/1/SN/N24:cRIO/fmid/104

    Good luck.

  • With the help of digital input for Boolean control?

    Hello!

    I have spent a lot of time to search but have not found a solution to this...

    I have LV 2015 with chassis NI 9188 and module NI 9425 DI.  Try to use the input signal to assign a State structure machine program and/or events in real time.  It would be acceptable to have an indicator show the status of the input line, since I can use it elsewhere with Value (Signaling).

    Please do not ask for the code - the problem is quite simple.  I just want to use the digital inputs to program control as a T/F.  I want just the program to analyze the State of the input and decisions - a bit like a PLC.

    All I seem to be able to extract is data of digital waveforms with a task DAQmx.

    It's not a trigger - I already use a trigger to start the analog acquisition.

    Formulate the problem in a simpler way...  What to do if you had a digital input module and you wanted to see the status of each input line in the form of a LED on your face in real time.  How would you do it?

    I really appreciate the help!

    greyhorn23 wrote:

    Formulate the problem in a simpler way...  What to do if you had a digital input module and you wanted to see the status of each input line in the form of a LED on your face in real time.  How would you do it?

    I would like to write what has been read to the Terminal.

    From what I can tell, you want to just read a single static value from your digital line.  You can then simply read the value of one and do some logic with her.

  • Boolean values of multiple digital inputs

    Hi guys,.

    It must be really basic but I looked around to find a solution with no success...

    I have a digital input with multiple-entry device.
    For example, I read signals 0-24VDC of pushbuttons and limit switches.

    I would just like to be able to assign to each entry to a Boolean to use anywhere in the code variable.

    Example: I install the DAQ help and get the usual result of 'data '. I'm guessing that this generates a table of Boolean signals.

    How to convert this table in a single Boolean DI signal for each entry?
    Or better yet, is there a VI I should use that emits individual signals?

    I also have the same problem for outputs digital. I'm guessing that I'll be able to apply the same principles to the problem well.

    Sorry if this is obvious and my thanks for the help.
    Joel

    Index table will collapse a table into individual elements.

    Build table opposite taking individual values and build in a table.

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

  • You can synchronize digital input with an analog input on a 6034e?

    Is there a way to synchronize the digital input and analog input on a 6043e?

    I tried the test application "SyncAI_ReadDigChan", but it fails during the humor tick Verify():

    "The requested value is not supported for this property value.

    Property: NationalInstruments.DAQmx.Timing.SampleTimingType

    You asked: NationalInstruments.DAQmx.SampleTimingType.SampleClock

    "You can select: NationalInstruments.DAQmx.SampleTimingType.OnDemand.

    I'm currently collecting analog input data for the duration of a digital input pulse.

    Thanks for any help.

    Joe

    No, you can't.

    The problem with E-Series cards, is that they have just static DIOs, so you cannot have their clock.

    You would need a M-series card for that where you have correlated DIOs.

  • the value of the digital inputs to change the field

    Hi all

    I have an edit field that has a digital text filter that only accepts phone numbers. Users have the choice to load these numbers from address book or direct entry.

    I used the digital filter to allow only numbers. .

    But when I tried to load these address book.  with editField.setText (phoneNum); It is to throw IllegalArgumentException.

    How to set digital inputs to the editField?

    Hi thanks for all your entries!

    My issued are resolved. I used BasicEditField aulieude EditField to solve this problem. the basicedit field allows the digital text and it solved the problem.

    Thanks for all your interest...

  • The iMac has a digital input?

    Hello

    I searched for centuries for the answer to what I thought was a simple question - the iMac has one digital input (optical or other)?

    I know that the headphone port doubles as an analog audio to as well as an optical digital output, but this port also accepts input optical? If not, is it possible to enter a digital signal via a USB port?

    I have an iMac (20-inch, mid 2007).

    Thanks to all who can help.

    AL

    Yes exit usb audio and are truly comprehensive external soundcards, they can have any type of entry and exit of the machine to be desired that they have

    and if they do a driver of OS x for him it's just a matter of connection installing the driver and choosing the entry in system preferences for being that

    https://Flipboard.com/@mariahlolas/top-10-best-USB-external-sound-card-adapters-for-Windows-and-Mac-2016-2017-npa5lltvz

    If the audio minijack that also take in charge the headset for iPhone I believe support the digital input and I don't know if

  • Digital input to Toshiba 46TL-&gt; 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.

Maybe you are looking for