And outputs analog table 2D through 4 lines (PCI 6711)

Hello

I want to design a user interface where the user can set the level of analog voltage of a specific analog channel for a certain period of time.  Basically, I need a 2D table where the columns represent each channel on the PCI 6711 map (Ao 0:3) and the lines represent a specific amount of time for each line to last.  I guess it would have to be another array of verical 1 d with integers representing the number of ticks that each line will last.  I can't seem to find an example of code where this is implemented, so some examples or suggestions would be grealty appreciated.  I have included a picture of another program that does this, and I would like to reproduce this configuration.

Pass the array using a loop for. This example gets each line. You can then use the subset of the table to get the columns with the voltage. This gets wired to a game of writing DAQmx for n channels 1 sample. The duration column index and son to a delay. Try it and post back you're stuck.

Sorry, but the answer above is meaningless to me.

Tags: NI Software

Similar Questions

  • How to trigger and outputs analog and digital Outout tasks begins on a counter to start?

    Hello

    I'm trying to synchronize the start of a task outputs analog, a task of digital output and a task of counter. I want to start the counter to serve the master trigger and analog and digital tasks to synchronize his departure.

    I guess I need something like:

    analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    digitalOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    analogOutputTask.Start (); Slave 1

    digitalOutputTask.Start (); slave 2

    () counterTask.Start; n / / master

    Where? is a string specifying a command source for the beginning of the task of the meter. However, I can't find what this string. Any suggestions?

    Thank you!

    -Jon

    Just FYI, the solution to this problem as well as some other ones is encapsulated in a short example .NET, I created. It is on the Web site of EITHER:

    http://decibel.NI.com/content/docs/doc-15500

    This project shows how to synchronize all your analogue/digital outputs through tasks and forums in terms of synchronizing Calendar and start clock.

    -Jon

  • Producer consumer with inputs and outputs analog and digital

    Hello world

    I'm working on a program of control system for some practical test work. Currently, I am working on the data acquisition of the Labview program component. My architecture is consumer-product loops with a what. My system will have analog inputs, outputs, analog inputs and digital outputs. It is not a criticism of time sytem, but I wish that all the acquisition of data to synchronize. I enclose my program because it is at the moment. I have difficulties to get all the data in the since that I have two types of data. In addition, I don't know if I have synced the four sequences of read/write correctly. I would be very happy if someone could take a look at my program and give me some advice. Thanks in advance.


  • Interleaving of samples: two outputs analog (tables with different lengths)

    CHAN                   AOCHANNEL1       AOCHANNEL2       AOCHANNEL1           AOCHANNEL2       .. .and so on

    SAMP * * * * * * * * * * * * .............and so on

    Hi guys, how could I go on the interlacing of two arrays of different lengths in a two-channel analog output?

    In the illustration above, for example, I like to write 5 values in channel 1, followed a string of unique value 2 and so on...

    I use DAQmx library controls to achieve this (not LabView).

    I am able to write unique values each time a task is opened without any problem, I was wondering if I can interleave the berries so that values are buffered and tasks are performed with greater haste.

    best regards,

    Ravi

    target met: I've made the following changes:

    CREATION OF TASK 1
    CREATION ANALOG_VO channel 1 & channel 2 in TASK 1
    CONFIG. CALENDAR OF TASK 1

    CREATED some TENSION with SAMPLES interleaved pre

    WRITING TASK 1 VALUES

    TASK 1 STARTED



    DAQmxCfgSampClkTiming(taskHandle1,"",SAMPLING_RATE,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,2*SAMPLE_SIZE_WX)


  • 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


  • Using custom control: draw a line and output start and end points

    I'm looking to find or make a custom control (or simple Subvi), which appears as a grid of 100 x 100 unit and allow me to draw a line from one point to another on this grid. It will then display (x, y) of departure and the point of this line on the grid.  Any help or ideas?

    Thank you

    Steve

    LabVIEW 2009 SP1

    You want essentially is a loop with an event structure when you process mouse down, move and up to events for the controls. There are several ways to implement something like that, but it will be probably the simplest:

    1. Use a table or a listbox multicolumn for your grid. Hide scrollbars and headers.
    2. You can use the ActiveCell property to-2, - 2 to select all cells. You can then use the cell size property to define the exact size of the cell.
    3. Then you put a picture on the top of the table control and color its transparent background so that the table shows through. Property node allows you to ensure that both line up on exactly the same location and size.
    4. You use the mouse on the image control events to detect clicks and moves.
    5. Point of the table to the method of the column line allows you to translate the position data of the event to a cell.
    6. You use the image control screws to draw the line on the photo based on these data.
    7. You can even color the cells selected in the table by using the table properties.

    If you want to simplify things a bit, you can also use the event of timeout instead of moving the mouse event to draw the line, but then you keep the timeout value in a shift register and hand it to-1 (no timeout) when the mouse event to the top.

    I would also say treatment mouse enter and leave events to change the cursor and cancellation if the user leaves in the middle of drag.

  • 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

  • Measure the time difference between a digital output and an analog input that responded to the questionnaire

    Hallo,

    I use the following system:

    • OR PXI-1044 with controller NI PXI-8109

    • OR PXI-2564 switch module to turn on the monitor of my test device

    • Data acquisition multifunction NI PXI-6259 to measure the signal that responded to the questionnaire jump

    The two cards are the same - PXI trigger bus. For both, PXI-2564 and PXI-6259 I use DAQmx to set the reading and writing of the channels.

    Now, I want to measure the time between the digital output, my unit turns and the analog input, which measures the response of my system.

    I can't do work by myself, please help me!

    I thank Ludwig.

    Hi Ludwig,.

    If you can't give us any VI we have difficulties with to help you.

    Because I Donat knowledge how your program is mounted it is not easy to know where you should enter signals.

    Here's a question similar to yours:

    http://forums.NI.com/T5/LabVIEW/best-way-to-measure-time/TD-p/178704

    and 2 external links:

    http://www.ehow.com/how_8698983_measure-time-LabVIEW.html

    http://objectmix.com/LabVIEW/385152-how-can-i-use-LabVIEW-measure-time-between-analog-pulses.html

  • Short films through the lines of output of NI USB-6509

    Hello

    I use the NI USB-6509 Board and on the manual of the device it says that external voltage sources must not be connected to any line output, it will be the damaged aircraft if they exist in short in all configured output lines (a line of output (1 or 0) is connected to another line (s) to exit. I want to isolate all lines output configured by connecting a diode in series and a 47 ohms limiting resistance far lines of output, that will help.

    Rgds

    Paul

    Paul,

    If the lines are shorted together briefly he probably will not damage the device because there are protection circuits.  However, it is not recommended to connect two lines.  Why do want to connect in this way?

    -Christina

  • Search for the string in the string table and see the following value in the line

    Hi, I'm new I have LV and I do a Vi that read worksheet values and generates 2d channels of the same spreadsheet table. For the moment everything I need is a function that find specyfic string in this table and show the next value in a line. As:

    Table:

    a; b
    c; d
    f; g

    example: find the 'c '.

    VI shoud show "d".

    Concerning

    Not a bad homework problem.  Do it with pencil and paper.  Write your table and pretend you're the computer.  What you want to do (step by step)?  What questions do you have?

    Now that the translation a bit to computers.  You mentioned that the data is in an array of strings.  What structures (LabVIEW) work with tables?  [Do you know how to work with tables?  [Otherwise, review some of LabVIEW Tutorial material - see top right of the first page of the Forum].  What do you know about channels?  What questions you need to ask questions on the channels?  What do you know about string functions?

    Watch these things in some LabVIEW code, 'feed' some data and see what he does.  If it seems to do things "unexplained", you can try to look at the block diagram to run by turning the performance highlight (and if you don't know what that means, use the help of LabVIEW and see the tutorials).

    Bob Schor

  • Synchronized analog input and output on myRIO

    Hello!

    A brilliant new myRIO just landed on my desk and I'm looking forward to learn how to use it.

    I have a question about the ability of the default FPGA personality.

    Is really similar synchronous HW in and output possible? Can configure you the necessary trigger and clock routing from within VI RT? To say ~100kS/s?

    I need to delve into a FPGA design to achieve this?

    Thank you!

    You will not be able to get your RT loop to run reliably at rates greater than 5 kHz, and we generally do not recommend trying to control I/O faster than 500 to 1000 Hz. This isn't a limitation of the default personality himself, it's just that some tasks are better suited for the OTR and some are better for the FPGA (it is important to understand when developing an application on the myRIO). Synchronization and the output of ~100KS/s signals are something that you have to do on the FPGA.

    http://www.NI.com/Tutorial/14532/en/

    There are some good tutorials in the link above. They use the cRIO instead of the myRIO but the functionality is basically the same. The biggest difference is that you won't have to add modules to your project, because all the inputs and outputs of the myRIO are fixed and must fill out automatically when you add a FPGA target to your project.

  • Integrate the outputs analog with analog inputs

    I have a program that displays 2 analog output waves and a separate program that captures the analog data through several materials of NEITHER. I need to integrate the program outputs analog in my analog input program.

    The program of analog output is fixed as "AO_Triggers_LowLevel.vi" and the analog input is fixed as "ExperimentDAQ.vi". When I try and integrate these programs I get 'error-200560 occurred at DAQmx waiting until the Done.vi' to my function to wait until it makes my task of analog input (background of the program). I think it is my mistake in the order that I'm wiring to the top of my son of error but I'm not sure. I watched several tutorials (Timing and synchronization features of DAQmx) but I'm totally stuck.

    Any suggestions are greatly appreciated. Thank you!

    Alberto M.

    I think I've fixed this problem. I extended my flat sequence structure to include the lines of task and error of my task outputs analog and things seem to work.  I'm still not sure about what caused my error and why it has solved the problem...

  • Synchronization of the inputs and outputs with different sampling frequencies

    I'm relatively new to LabView. I have a NOR-myDAQ, and I am trying to accomplish the following:

    Square wave output 10 kHz, duty cycle 50%.

    Input sampling frequency of 200 kHz, synchronized with the output that I get 20 analog input samples by square wave, and I know what samples align with the high and low output of my square wave.

    So far, I used a counter to create the square wave of 10 kHz, display on a digital output line. I tried to pull the document according to (http://www.ni.com/white-paper/4322/en), but I'm not sure how sample at a different rate than my clock pulse. It seems that this example is intended rather to taste one entry by analog clock pulse. There may be a way to create a faster clock (200 kHz) in the software and use that to synchronize the analog input collection as well as a slower 10 kHz output generation square wave?

    I eventually have to use the analog inputs to obtain data and an analog output to write the data channel, so I need the impetus of the square wave at the exit on a digital PIN.

    How could anyone do this in LabView?

    Hi Eric,.

    All subsystems (, AO, CTR) derive from the STC3 clocks so they don't drift, but in order to align your sample clock HAVE with pulse train that you generate on the counter, you'll want to trigger a task out of the other. I would like to start by a few examples taken from the example Finder > Input and Output material > DAQmx. You can trigger GOT off the train of impulses, start by Gen digital Pulse Train-keep -you probably already use a VI like this to generate 10 k pulse train. AI, start with an example like Acq Cont & chart voltage-Ext Clk - Dig Start.vi-you'll want to use the internal clock so just remove the control of the "Source of the clock" and it uses the internal clock. From there, simply set the "Source of the command" either be the PFI line generates the meter, or ' //Ctr0InternalOutput '-assuming that you are using the counter 0. You'll want to make sure that the start of the task HAVE faced the task of counter I is ready to trigger off the first impulse. They should be aligned at this point.

    For debugging, you can use DAQmx export Signal to export the sample clock - you can then brought the train line and the PFI pulse to make sure that they are aligned.

    Hope this helps,

    Andrew S

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

  • Delay between angle and entered analog on a 6221

    Hello

    my test setup consists of a (8184 current run LabVIEW RT) embedded PXI controller which uses a PXI-6221 of data acquisition. One of the outputs analog of the 6221 creates a demand for speed that is sent to a servo controller. the servo drives then the test configuration. Between the servo and the remaining test configuration, a quadrature encoder is located. Both the 6221 meters are used to measure the position of the servo (using the trains of pulses A and B) as well as the speed of the servo (frequency of A pulse train). In addition to these counter inputs, some analog inputs of the 6221 serve as well to recored the configuration of test signals.

    In this configuration, one of the analog signal has a frequency of n periods per revolution of servo (determined by the mechanical design of the test facility). But when I leave the servo turn to for example 100 rpm, then decelerate from status quo with a constant deceleration and then draw the analog signal against the measured angle, I see clearly that as long as the speed is telling, I n periods per turn (or a passage from my analog AC to zero each 1/2n towers); However, as soon as the slowdown begins, the plot gets stretched along the axis of the angle (so the plot tells me there are less than n analog periods per turn, which is impossible because it would require the mechanical destruction of the facility).
    However, I can calculate a position based on speed information signal, as I got to the second counter (by integration of the speed). When I do this for the above velocity profile and draw the analog signal against the calculated angle, I see exactly n times / revolution, no matter how fast the installation program is rotating (just the expected behavior).

    So, apparently, the speed measured is "in phase" with analog signals, while the measured angle has a "phase error. Draw the angles measured and calculated against the time tells me the same thing: the measured angle is always late (compared to the calculated angle). The period is not constant throughout the measurement; I've seen values between 30 and 170 ms within a single record. Due to this change of variable, inserting a delay for all channels, but the angle is not a great idea.

    Unfortunately, calculation of the position of the speed signal is no option for me, because the direction of rotation is changed during measurement; because speed information I have based simply on a frequency of pulse train, it contains no information management, therefore a calculated position would be unaware of the changes of direction.

    Does anyone have an idea whence thios delay and what I can do to fix this problem?
    Try a position different methods of decoding or exchanging the meter channels has not made a difference.

    Thank you!

    Hey Kevin,

    attached you will find the last block diagram (no new translation this time, since no changes have been made that require a), which includes your last suggestions (explicitly start the task of AI, remove the excess constraints) with a flat sequence structure that applies all the preparations of task to finish before the start of the first task (I know I could have achieved the same effect of intelligent routing of the signal error, but I think the code is) better readable this way).

    Without OPI, LabVIEW tends to start to have, ao and tasks of the angle of the very different moments, which (for some reason that I don't understand - we have a sample clock based calendar here, and the sample clock is run, well after the three mentioned tasks...) tends to cause delays in the order of several 10-100 ms between tasks. With the structure, this problem is eliminated.

    The Sub - VI just above DAQmx writing contains the "conduct" code that I used in the last screen shot to "serialize" the requested speeds - in this way, the table that contains the requirements of speed does not need to be rebuilt.

    The code that creates a weather channel frequency implicitly timed measure left the VI shown here in a second VI that is running on the host computer, because everything that involves a calculation and does not require any intzeraction with the DAQ hardware is better placed there (the 850 MHz on the PXI controller celeton is slower than 2 definitiely something host GHz Dual-Core system).

    The behavior you mentioned for the task "not started" HERE is what wrote using LabVIEW. I thought the block of relaxation that I had at the beginning would treat the start of the task - at least, the code like this figure repeatedly in the examples that come with LabVIEW.

    I don't really understand what has caused the problems I've had - it seems that it was the combination of the measure quickly loop iteration with the start of task based on trigger HERE, but I do not understand what are the mechanisms in the background caused the problem (too forced loop was not the cause; the same block diagram works well with an additional loop timer).

    If the solution was composed of the following steps:

    -remove the old code calculating speed, replace it with a better code out of the main loop. This allows to

    -reduce considerably the frequency of the main loop.

    -Pull the DAQmx writing out of the loop, and

    s ' ensure that all tasks are started explicitly just before the main loop starts to run.

    -Possibly remove excess constraints of the main loop.

Maybe you are looking for