Data acquisition (different digital output at each iteration)

Hello

I am writing a LabView program using the NI USB 6501 24 e/s digital line.

I want DAQ to give ON / OFF according to the input data.

I call my DAQ more than once in a program so JUST

DAQ Assistant should work in iteration 0

2 DAQ assistant should work to the iteration 1

3 DAQ assistant should work to the iteration 2

I have attached my VI, please take a look.

Thank you

Rana

Because you do not order the same material, you must have DAQ Assistant 1.  With your simple example, you could just build your 3 berries in a 2D array and the autoindex on the table on the loop FOR.

Tags: NI Hardware

Similar Questions

  • How to read the data processed on frm loop on each iteration of the loop?

    Hello...

    I need to display numbers as 1, 2, 3... constantly using the loop on each iteration (IE out of the loop using threads). I generated the numbers 1 2 3... using the back power node... I can read the final value after the last iteration of the loop for.

    I connected an indicator of the loop for. This indicator displays the value as a 4 If the number of loops that 4. I couldn't view 1 2 3 4 an indicator of items at each iteration.

    I'm in a position to read the value of the variable on each iteration of the loop. Please help me fromthis regard...

    Thanks in advance...

    In fact, I'm programming for multiplication of two table 2D.

    I need to select the particular code to perform this action using the structure of the case. who is right for which I need to give the value select 1,2,3 to a case selector, so I finish the task. you got my point?

    Thanks for the reply

  • digital output usb6009 does not switch does not correctly

    Hello

    I have a little problem with my 6009.

    Basically, I switch the inputs of a Demux (74HC238D) (3 lines) write an address on it to select rows of data off the Demux.

    The signal from the acquisition of data through an FPGA and the signal is displayed on the input pins Demux.  That is the problem.

    (It is worth noting that the FPGA is well programmed (coz if it was'nt then the signal would not get the demux in the first place.))

    When I connect the inputs of the FPGA to 3 digital lines of data acquisition and scroll lines (turning each one WE and OFF), the signal appearing at the Demux pins is not a proper logic level. (the voltage I measured the scope is about. less than 1.1 V). For this reason I choose any line, Demux output will always be on the first channel and will not select the other channel.

    I tried the same test 7 connect supply of 5V data acquisition (each line) and after having programmed the FPGA, the correct voltage level is available on the DEMUX pins. The problem occurs when I try to scroll through the entries via the software.

    I'm not which is the cause. My belief is the acquisition of data.

    What are your suggestions?

    Thank you

    Labmat

    Hi Labmat,

    The first thing that jumps out to me is the fact that you use these signals to interface with an FPGA. Outputs digital USB-6009 are 5V or 3.3V TTL and commonly FPGA i/o is 3.3V. Just to double-check, as FPGA did you use?

    Q: When I connect the inputs of the FPGA to 3 digital lines of data acquisition and scroll lines (turning each one WE and OFF), the signal appearing at the Demux pins is not a proper logic level. (the voltage I measured the scope is about. less than 1.1 V). I tried the same test 7 connect supply of 5V data acquisition (each line) and after having programmed the FPGA, the correct voltage level is available on the DEMUX pins. The problem occurs when I try to scroll through the entries via the software.

    A:  This no doubt hits the nail on the head. First of all, I'd be inclined to not use program any software directly and instead use some of the tools for debugging I/O connectivity that come with the Driver NOR-DAQmx. You can get these from the measurement and Automation Explorer (MAX).

    ' ' ' ' 'Start-up' all programs ' National Instruments ' measurement and automation.

    Expand the tree of devices and Interfaces in the left pane, and then select your USB-6009. Using the Test panels button on the right pane, you can quickly perform digital i/o with the device.

    Our best bet is to first take a multimeter and see if we can measure the correct voltage is distributed by the correct pins on the USB-6009 case.

    Now, by checking the box USB-6009 Datasheet, we can see that, on Page 17, there are a couple of different ways that we can configure the method by which the output signal is driven out of the unit; We have Drive open and active collector mode. It will assure you that since you are trying to send a signal to the FPGA, the unit must be set to active training mode, in order to generate signals from 0V to 3.3V . Output open collector allows the generation of signals from 0V to 5V . This can be done through property OR DAQmx nodes in LabVIEW.

    In terms of current...

    The + 5V line that you used for the FPGA Nailer is evaluated to 200 my. General DIO lines on the USB-6009 case can generate a current up to 8.5mA. This limitation fits the specifications of digital input of your FPGA?

  • How do you give each iteration of a loop IF %

    Subject: Send a signal to step to a stepper motor driver at regular intervals.   My first try to use a loop was a failure because the data is only passed on a loop when the loop ends.   Instead this application requires the data to be passed on a loop on each iteration.

    What happens if changes can be made to a loop for output at each iteration?  Or, if a loop is not suitable for this application which is preferable?

    Howard

    A loop looks like a reasonable approach. But you will have to send the signal to each iteration of the loop, then talk to the stepper motor inside the loop on each iteration. You can also think of calendar of loop (how fast you want to send commands to your engine) and stop the loop (for example, the user clicks on a stop button).

    Another concept, you can familiarize yourself with are state machines. LabVIEW courses cover these, and there are many messages about the machinery of State here on the forum.

  • A generated within a loop in a subvi output data can be transferred to the main program for each iteration of the loop?

    Hi LV users,.

    I have a very basic question, I have not succeeded to asnwer using basic considerations.

    I made a sub - vi that performs a scan of current-voltage using a unit of measurement-source Keithley and a loop FOR.

    The subvi outputs 2 tables with my data (essentially an array of voltage and the corresponding current table). I also defined a Terminal at the exit of a group of these 2 tables in order to plot a graph XY - output. Specifically, I indexed this cluster to update after each iteration of the loop FOR, in my sub - vi (the indicator is placed outside the loop, of course).

    My problem is that I want my main program to display the XY-graph in real time, with an update after each iteration of the loop FOR which is in my sub - vi.

    I have a problem because my sub - vi output terminals are available for the main program concluded as soon as the sub - vi has completed its own execution (which is what we expect of sub - vi to do).

    How can I use a sub - vi (because it's handy) and get in the main program in the course of its performance data that are generated from the loops of sub - vi?

    Thanks in advance for your help,

    Yoyo87

    Elements of the queue in the Subvi them put your main VI where you want to display the data and the.

    It is similar to the architecture of producer/consumer. There are examples of it in LabVIEW. The examples work with 2 parallel loops, in your case a loop (the producer) will be in the Subvi.

  • digital triggering of stop/start of analog data acquisition

    I want to use a signal from a digital line to start and stop analog data acquisition. The signal can change levels several times during a race of the VI so I have to start and stop several times data acquisition and store each session data in a different file.

    I tried to play with the following screw: digital triggering of break, DigitalStartandStopTrigger and ContAcq_DigTrig. None of them doesn't seem to work for my configuration. I also do continuous data acquisition so I can't use a reference. I use PCI 6259 DAQ.

    I used the "P0" pins rather than PFI pin on the grid BNC-2090. I know... stupid enough.

  • Digital output to a different voltage?

    Hi all

    I finally finished my program of data acquisition for the laboratory, which made the acquisition of AI voltage multi-channel digital outputs with timed to control the gas valves. My post-doc asked an additional feature, however, which must be able to have the analog output... It turns out that what he really wants to do with the feature is to have output digital, but with a different voltage value (he never hears on the sending of information higher or lower in a simple experiment).

    Now, the program is set up to run digital output now, it would be quite a bit of work to change in a zone of OCCUPATION. Is it possible to simply change the settings somewhere to have the ups to DO at a different voltage? I hope that this is the case from a card of 10 dollar Arduino can do 5V or 3, 3V.  Our DAQ card is the NI PCIe-6353. I looked through the data sheet and found nothing.

    Thank you.

    p.s. I suggested using additional circuits to set the tension for a given experiment. The post-doc said it was possible, but inconvinient. :/

    RaymondLo wrote:

    p.s. I suggested using additional circuits to set the tension for a given experiment. The post-doc said it was possible, but inconvinient. :/

    Well, it is just too bad for the post-doc.  Maybe he should give you better requirements next time

    OK without being in a bad mood, it is not a way to change the digital output voltage.  When you talk about DIO cards really aims to communicate only high or low and have a voltage. The only other option would be to use 4 AO ports on the card and treat them programmatically as DO.

  • Digital relay of data acquisition

    Hello

    I quickly ask you questions. Can I connect several relay digital for single block scb - 68 (data acquisition is: 6321 PCI)?

    With Labview, I want to enable or disable each of these relays.  Is this technically possible? because never, I have connected several sensors to scb - 68.

    Each relay acts as a binary switch to a motor brush continuous (3-12 v and RPM motor voltage: 11.5 krm with weight)< 80="" grams).="" the="" dc="" motors="" will="" receive="" power="" from="" external="" dc="" power="" supply="" unit.=""  so="" the="" power="" for="" the="" relays="" (i="" am="" thinking)="" must="" be="" from="" daq.="" but="" i="" know="" daq="" can="" supply="" only="" very="" very="" less="" current.="" i="" am="" trying="" to="" source="" out="" if="" i="" can="" find="" relays="" that="" run="" with="" very="" current="" (which="" could="" be="" supplied="" by="" the="" daq="" itself)="" can="" you="" suggest="" me="" if="" this="" is="" possible?="" and="" also="" any="" information="" or="" source="" for="" the="" required="" digital="" relays="" would="" be="" lot="">

    Thank you

    MSC


  • How can I use internal clock case OR USB - 6259 BNC for the acquisition of digital data in my own big software?

    I want to integrate the ANSI C sample program ReadDigPort - ExtClk.c in my own big package.

    I want to use the internal clock of the BNC NI USB-6259 (.. 80 kHz 120 kHz).

    In the document:
    High speed M: Series Multifunction DAQ for USB - 16-bit, up to 1.25 MECH built-in BNC connectivity. / s,.
    is written:
    Or sample DI source clock: Any PFI, RTSI, HAVE sample or convert clock, AO, Ctr n out internal and many other signals sample clock
    The digital subsystem doesn't have its own dedicated internal synchronization engine. Therefore, a sample clock must be provided another subsystem on the device or from an external source.

    How can I use internal clock case OR USB - 6259 BNC for the acquisition of digital data in my own big software?
    With what other subsystem on the device can generate a source of the clock? How?

    It is possible to set a clock on an internal counter (for example ' Dev1/ctr0"):
    Creates channels to generate digital impulses that define the freq and dutyCycle and adds the channel of the task that you specify with taskHandle.
    DAQmxCreateCOPulseChanFreq (taskHandle, "Dev1/ctr0" units, clockName, idleState,
    initialDelay, freq, the duty cycle); works

    But it is not possible to drive this internal clock to a terminal (for example "/ PFI0/Dev1"):
    DAQmxErrChk (DAQmxCreateCOPulseChanFreq (taskHandle, "/ PFI0/Dev1", clockName, units, idleState, '))
    initialDelay, freq, the duty cycle); does not work: error DAQmx: measurements: type I/O of the physical channel does not match the type of I/O required for the virtual channel you create. Name of the physical channel: PFI0. Name of the virtual channel: clock

    The sample clock source can be derived from an external terminal (for example "/ PFI0/Dev1"):
    Sets the source of the sample clock, the sample clock rate and the number of samples to acquire or generate.
    DAQmxCfgSampClkTiming (taskHandle, "/ PFI0/Dev1", maximumExpectedSamplingRate, DAQmx_Val_Rising, ")
    DAQmx_Val_ContSamps, bufferSize); works. Acquire or generate samples until you stop the task

    But it is not possible to derive the internal counter of the clock (for example ' Dev1/ctr0"):
    DAQmxCfgSampClkTiming (taskHandle, "Dev1/ctr0", maximumExpectedSamplingRate, DAQmx_Val_Rising,
    DAQmx_Val_ContSamps, bufferSize); does not work. Error: Acquire or generate samples until you stop the task: make sure that the name of the terminal is valid for the specified device. See Measurement & Automation explore valid names of terminals. Property: Property of DAQmx_SampClk_Src: DAQmx_SampClk_ActiveEdgeSource device: Terminal Source Dev1: Dev1/ctr0

    Hi datafriend,

    using what it says is correct:

    Or sample DI source clock: Any PFI, RTSI, HAVE sample or convert clock, AO, Ctr n out internal and many other signals sample clock
    The digital subsystem doesn't have its own dedicated internal synchronization engine. Therefore, a sample clock must be provided another subsystem on the device or from an external source.

    This means that if you do not use an external signal as clock you can use the sample clock to HAVE it on board or at the output of the internal counter.

    There are also 2 ANSI C examples in this regard:

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/4485

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/4488

    So in both cases you have to use a fictitious task you need only for the generation of the internal clock (HAVE or CTR)

  • 2 channels of AI on a data acquisition with the range of different sensitivity

    This vi is based on the 'new project' state machine on the home screen at the start of LV.

    A time loop is parallel to the main loop of the state machine, shown in the picture.

    It works continuously until you press the Exit button.

    The problem seems to be in start this... > read >... stop start > read >... stop along the error line.

    The reason for this clumsy arrangement power is measured voltages are in two lines of different sensitivity.

    The shunt voltage is small and needs-. 2 to the range of V.2. The load voltage is greater and 09:50 V range is good.

    In the initializing state, two separate vi 'create a channel' have been used to specify the range of voltage to the physical channel. The corresponding tasks are sent via via local variables.

    DAQmx errors happen randomly, sometimes the first iteration, sometimes the 50th.

    I tried to disable one or the other start > read > stop for the shunt voltage or load.

    I tried replacing them with the DAQ assistant.

    I tried various DAQmx vi: "wait" and "accomplishment of the tasks by resource cancel selected".

    But error-50103 "specify resource is reserved" keeps popping up.

    Is it possible to create two tasks on the device even when they are not used at the same time?

    The only reason is to measure in two voltage ranges.

    Win 7 Pro 64-bit

    2014 LV database

    Data acquisition equipment: USB-6210

    Thank you.

    This has been discussed many times. Do NOT use separate tasks. You can use different ranges for different channels with a single task. Just wire the task from one channel to another channel to create task.

    You also use local variables when they are certainly not needed.

  • Will be the leak memory for the queue when it is used in producer and mode of consumption data acquisition transfer different size table.

    In data acquisition, I use a loop to query the data from the hardware, another loop to receive the data from query sent by queue loop.

    Each time the size of the transferred data matrix is perhaps not the same, so the system can assign different table size and recycle frequently.

    It cost memory leak. Or it will slow down the performance, given that the size of the array is not fixed, so everytime need to create a new array of size.

    Any suggestion or the best method.

    If I understand your description, your DAQ loop acquires data with the parameter of the function of reading-'1 ' for reading at the DAQmx samples. This translates into different picture sizes.

    Passage of these tables directly to a queue is valid and she didn't mind important in performance (at least AFAIK) and it certainly does not leak memory.

    So the question is more or less:

    It is valid that the consumer receives sizes different picture for analysis? How your consumer manages these tables?

    hope this helps,

    Norbert

  • How to change the accuracy of output waveform and spreadsheet graph data acquisition

    See attached vi, data acquisition connects to a waveform graph in a spreadsheet. I want to change the precision of the output of Wizard DAQ 6 decimal places with 2 decimals, but everywhere I looked on the DAQ assistant, I can't find a control accuracy. I missed something? What is the elegant way to do this?

    Thank you.

    Hello sunflower.

    This seems related to this question...

    Why do you want to change the output of the DAQ assistant?

    Should not change the precision of the creation of the worksheet? To do, simply give a few parameters for the functions "to the string conversion..."

    Outside the file save all the other screen precision parameters are just cosmetic measures!

  • can I use instead of conditioning of analogue output signals data acquisition to provide voltage outputs analog?

    Hello guys,.

    I have a general question regarding the units of packaging such as the USB-9263 analog output signal. If I can use it instead of data acquisition to provide an analog voltage output?

    Thank you

    ELA

    Yes, the 9263 can provide 4 output channels analog voltage (+/-10 v range) with up to 1mA of current drive. Looks like: it refers to the short circuit of conditioning of signals and some protection against overvoltage. Link below is the User Guide:

    http://www.NI.com/PDF/manuals/372406b.PDF

    -AK2DM

  • Control and simulation and data acquisition

    Hello

    I am applying to motor control in Labview. I'm sampling speed from DC engine in real time through an acquisition of data. (my sampling time is 1000 samples per second)

    Then wrap speed as input to a Simulation (simulation and design of the order) and inside the loop simulation, I have a PID controller. The PID has the actual speed of the engine for the acquisition of data and the engine reference speed as input.

    Reference engine speed comes from the generator of signals (control design and simulation-Simulation) and is a waveform.

    My step in the engine size is 1000.

    I am running this application real-time and drawing the reference signal and the motor real signals. I run into several problems with regard to the calendar.

    1. when I change the size of the step of the simulation loop, the frequency of squares of reference also seems to change. For example. What step size = 1000, duration of pulse = 1 s. What step size = 100, pulse width = 0.1. (My pulse frequency is 1 Hz, Simulation clock - 10 kHz). How step size can affect the pulse width.

    2. can you explain the relationship between the DAQ, the Simulation step size loop sampling time, Loop Simulation period.

    3. If I want to collect different sets of data using sampling different hours, it's OK to change the sampling DAQ time without changing the size of the step of the simulation.

    Would also like to emphasize that the DAQmx calendar under sample clock mode is placed in front of the simulation loop and the output is connected to the loop simulation.

    Appreciate any help.

    Hello

    Maybe some screenshots of your code would help. Furthermore, what you have read your samples together with your DAQ screws?

    (1) If you have a waveform, the output is specified as:

    For example, if you change the size of the step of the simulation loop, you change the simulation time which are introduced into the signal generator and affecting the waveform that you see if you do not have a size quite small step to characterize the waveform that you generate.

    (2) sampling DAQ rate is the speed at which samples are taken on the acquisition of card data itself. The size of the simulation step, help. "Specifies the interval between the time when the ODE Solver evaluates the model and updates the results of the model, in a few seconds." Simulation loop, still using, "Indicates the amount of time that elapses between two subsequent iterations of the loop of control & Simulation.". " "Step size determine the value of t that is introduced to the functions you use in the loop simulation while the loop simulation period controls simply to how fast you change the following t value. The sampling rate of DAQ hardware is a clock of completely separate hardware controlling the analogue-digital on the DAQ card converter so that you can get a deterministic dt between the samples being acquired.

    (3) you can change the schedule for the acquisition of data, but you will need to restart each time the changes take effect. If you change the calendar of data acquisition and want your values to correlate with your simulation, you will need to change your size of step as well.

    -Zach

    -Zach

  • Data acquisition reading incorrect when you use a loop

    Hello

    I wrote a simple VI (00, 01, 10, and 11) output to a circuit connected with 4 resistors. Based on what value the ciruit receives, it passes current through a particular resistance. It is again entered in Labview and traced.

    The problem is when I send a particular value (i.e the 00, 01 and 10 and 11) and get that back, it's okay. But when I send and receive the consectively connected via the loop counter, they are incorrect (not synchronized with the number of the loop).

    I made sure that circuit works very well. It has something to do with the loop synnchronization, reset, value compensation, etc. can be.

    Please Guide...

    Change your DAQ assistant that reads to be 1 sample on request.

    Right now it is set for continuous samples.  And 10 samples at 10 Hz.  Then it runs and starts.  The next iteration, you send a new digital out, but the wait for 4 seconds.  When you read again, you get the next 10 samples that are put into the buffer of data acquisition, but now 40 samples have actually entered the DAQ buffer.  In time your DAQ buffer will be finally complete and raise an error.  In the meantime, you will continually read data continues to become more tainted by the iteration.

Maybe you are looking for

  • iPhone5 icloud mail

    I recently bought an iphone 5 to someone, the phone is unlocked, but there an icloud account that I can't remove. There is no way of contacting the seller to remove him. What can I do? Is it possible for me to remove the icloud account?

  • Scan to E-mail MFP budget

    Could someone suggest a multifunction print device priced with a good stand-alone Scan to e-mail feature? For practical reasons, it is quite difficult to test several models. In general, there is no excessive use, so no robust device is necessary. I

  • setting 2 meters - one with FiniteSamps and one with ContSamps

    I try to use 2 counters on the NI USB-6229 (or box USB-6259), where a meter has FiniteSamps and another ContSamps. I have the following code: ErrChk DAQmxCreateCOPulseChanTicks(hCnt0, "Dev1/ctr0", "", "20MHzTimebase", DAQmx_Val_Low, 0, 400, 400);ErrC

  • alignment

    I recently installed a new color cartridge, printed on the alignment sheet and aligned according to the instructions.  My problem is that I use my computer that the message arrives that I need to align again everytime.  I traced changed several times

  • Use the PC migration assistant does not see the imac

    My sony vaio does not see that the imac even thogh the imac can see the sony