Interrupt with digital input

Hello

I am relative new to LabWindows.

I have a program that starts when I press a button. The program controls a motor. Now I press a button on the motor and the program must cease (Safty Stop). The button is connected to a digital input on my card (PCI Express 6343). Now, I have the question, how do I program the interruption? I know not how do in CVI (controls the digital input whenever the program runs).

I hope someone can help me.

Best regards

The starting point must be to look relevant examples that NEITHER provide:

ReadDigChan - ChangeDetection.prj

and

ReadDigChan - ChangeDetectionEvent.prj

However, I must advice against using a PC as a "Safety Stop". As a general rule, the PC are completely inappropriate to the core functions of security, unless you follow the standard IEC 62304 relevent to the letter. Tip: it's hard to do with a PC. To implement safety functions such as emergency and interlocks stops you buy much better a specialist dedicated safety relay and following the instructions of the manufacturer. If life-threatening energy (either electric or medcanical) may be present, then consult a professional engineer.

Tags: NI Software

Similar Questions

  • How to count the pulses with digital input on 6351

    Hi all experts in Labview,.

    I just got my USB x series 6351 and it works fine, but I certainly lack of labview skills to use it to its full potential.

    I would like to read digital pulses with several digital inputs and count the number of pulses each T interval in time. All impulses that I entered on any edge of the clock are not synchronized and can occur at random times during the tests. Basically I have an oscillator of square waves can I modulate the frequency. I don't want to use the meter as inputs as I'm limited to only 2 entries (if I use the option 2 input meter for metering of pulses or frequency). The input frequency can range from 0-1 kHz and goes 0 - 3V. So not too fast, and I shouldn't make too many mistakes trying to get the count of pulses and then back out the frequency in accordance with article ni.com on counters.

    I would like to read the 8 digital input channels and get the number of impulses for each channel. I searched high and low for help online but can't find examples that have been useful. Anyone have any ideas on how to go or direct me to a resource? Thank you very much in advance!

    Are you worried about getting the number as a physical operation timed?  It would be nice to acquire a digital waveform and then postprocess on it to detect how many events took place?  I've attached an example that shows how you can accomplish this. It reads a digital waveform and then uses a detection of crete VI to determine how many pulses occurred. Should be a few adjustments to your particular signal.  The VI I use seems to count events twice (probably count each edge), so counting it gives should be reduced by half in order to work.

  • How to upgrade the digital indicator with digital input

    Hello guys,.

    I'm trying to write code to do the following:

    The P0.0 USB-6501 connected to a switch which is held at the top via a resistor.

    The switch is pressed and I can detect the entry (my LED panel changes color).

    I need to update a digital indicator (I think it's the correct vi I use) whenever you press the switch.

    Any assistant will be much appreciated.


  • Trying to create a push-button locking with digital inputs

    Hello world

    I am writing a program to control a motor with 3 push buttons, upwards, downwards and stop. I want the top button to lock when pushed and delatch when the stop or down are pushed. I tried the example program Latch.vi REARMABLE of this Web site, but no luck. It seems that out of the gate AND is indeterminate. I have attached to my program, any help would be great! Thank you

    Use Index Array to get the desired Boolean value of the table.  If you do the wiring one index, it will give you element 0.  With this, you can have all the switches wired to different pins of the same registry on your DAQ hardware.  Then, you can read a byte and unravel what bit does what.  You will also need to build Boolean individuale in a table before you write in the acquisition of data.  Here's a quick example:

    You must decide which games to buttons that bit.  I have not yet checked your lock algorithm logic.

  • Programming of the event with digital I/o

    A Structure of the event can be used with digital I/o?  All the examples I've seen show the Structure of the event used with the keyboard or the mouse.  But have not found many examples showing the Structure of event used with digital input.  I'm mainly looking for a link to an example. But you can provide any help will be appreciated.

    Howard.

    Yes, you can register events DAQmx.  Look in the IO position-> data DAQmx-> Advanced-> palette of events acquisition DAQmx to start, or search for events DAQmx.  All DAQmx devices support events of change detection, which is probably what you want if you have the digital I/o, in order to verify that it is supported by your device.

  • the analog inputs with digital edge trigger

    I am currently triggering a readout with a digital trigger using a 0 - 5v as the digital source encoder.  I am running LV 8.2.1 DAQmx 9.0 and a PCI-6259.  I use a VI I wrote and which is very similar to 'Acq & chart voltage-Ext Clk.vi', and using the one-pulse encoder connected to PFI8 as the clock source for the sample clock vi.  The only major difference is using the channel of the Z-trigger as a software reset inside the While loop with the DAQmx reading.  Currently, the sample clock doesn't allow that either read the lower edge or an increase of PFI8, so I get a sample by one-pulse.

    I need to double the rate of analog playback for a given tree rpm and encode them, so I need to read on the fronts and edges of the one-pulse encoder.  The sample clock can be reconfigured for the detection of changes and still read the PFI8 port to increase and decrease as inputs of physical channel, or do I have to configure detection of modification of the task/digital input for a single line and use the "ChangeDetectionEvent" as the source for the sample clock HAVE? Detection of Timing/change DAQmx can still use the signal in PFI8, or should I use DI ports, and which ports are DI should I use?

    Thanks in advance!

    In fact P0.8 is.  I was looking at the pinout for the 6251, no 6259.  Sorry about that.

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

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

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

  • 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 input current limits

    Hello

    After reading everything that specifications and manuals, I decided to ask a general question.

    In the data sheets, user guides I've read, in general, there are two warnings for DIO:

    -Do not connect the outputs digital circuits which operates above the limits.

    -Do not drive the line with tensions outside its operating range.

    Generally speaking they tell me I need to know when dealing with output and voltage when dealing with entries. So I have this question, can I wire a power supply for digital inputs directly without exceeding its "beach of normal operation and without any protection circuit? In fact, my feelings, this is not possible. But why certain documents produced clearly mention that the impedance internal inputs while that of others is not clear those? How can I determine if I can connect a signal directly to an entry (for example USB-6525 indicates a current limiter circuit, but I don't see a clear explanation in the datasheet USB-6251)?

    As long as the input voltages are within specified limits, no damage will be the DAQ hardware. Logic devices often have two lines of non overlapping input, one for low input and high input. If the input voltage lies between the beaches, the performance of the device can be unpredictable. Also, check your power supply to make sure that this doesn't not exceeding when turned on or off as that could exceed the DAQ limit.

    Lynn

  • Reduce the period of sampling of the digital inputs of NOR-USB-6009

    Hello

    I need to read a line of digital input in the NI USB-6009 using NOR Express 2013 Signal box. I selected 1 sample (upon request) as acquisition mode. I need to define a smaller sampling period as 1 MS, but it gives error too short sampling period: "the current sampling period is too short.  Please specify a longer sampling period. ».
    I do not understand the reason for it and a way to slove this.

    Any help would be greatly appreciated!

    Thank you!!

    The 6009 doesn't have a clock that you can set for a sampling period. According to the specifications, the digital I/o is software programmed - sample on request you use now. I'm not at all familiar with SignalExpress but I don't think that you can find near a reliable khz sampling frequency on Windows or any other os non-deterministic.

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

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

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

Maybe you are looking for

  • Re: Toshiba 40RL838G - No DLNA - firmware need

    Hello I have a Toshiba 40RL838G TV.DLNA function does not work... I heard that a firmware update may fix this problem.I often try to check firmware menu tv, but never again found on air. I hope you can help me! Thank you!Andrea

  • Iconia b1 using too much ram

    Hi yesterday I bought my Acer b1... but it seems the Tablet using 70% of ram or more! Can someone help me? Thank you

  • OfficeJet 6700: ADF works only when you scan not copy

    Our officejet 6700 has an irrational problem - will take the ADF and scanning a document using the pc without problem, but if load you something using the function copy on the machine itself, he acknowledges that he is a responsible original, you hit

  • Wmp54g connectivity

    Is there a way to force the wireless device to maintain a connection after logoff? I am currently on windows xp professional in a corporate environment and need the adapter to maintain a connection once a user disconnects, so that other users can log

  • Manager connection audiotext

    Hi all We are in the final phase of our move from Octel to su2 7.1 connection of the unit (3B) and are Audio text on application development. I have been using ATM for the connection of the unit to build these new 'trees' and it looks excellent (than