Continuous sampling PlotStripChart DAQmx and multiple channels

I modified the sample code sychAI DAQmx - AO.cws slightly to provide more output wavforms. I can read at the same time on a single channel without problem. Then when I try two channels I read in an array of N (N > have a lot of examples of PlotStripChart 2, N = 2 with 2 tracks so it updates a point at a time...) I don't want that.)  samples. 0 to N - 1/2 is what AO1 (output channel 1) written on, and N/2 to N - 1, that's what written AO2. Now, if I put the number of tracks 2 and try to draw on a stripchart I get the range 0 to N - 1 on both routes.

How to draw a picture of say 10000 samples on 2 tracks with table grouped by channel?

Thank you

I changed my DAQmxReadF64 to the group by number of Scan instead of channel and set skipcount = 0 and staringIndex = 0 and which has worked exactly as I wanted... but according to documentation it should not work.

Tags: NI Software

Similar Questions

  • Question-DAQmx: using multiple channels on a single device with a relaxation

    The purpose of the attached VI (Switching_Controller.vi) is to wait for a triggering of the input signal and an output pulse whenever it occurs. However, at the same time I want to output and read a sample of another entry and exit of the pair of channels (Main_Controller.vi behavior). I was counting on this operation in two parallel Subvi but I am running in the commune-50103 error 'the specified resource is reserved. I understand that in order to solve this problem, I need to compress all output channels and all channels of entry into just two tasks. However, I cannot address the issue of the trigger, because I want the second set of inputs and outputs to occur continuously and relaxation force the task to a certain repetition rate. Is it possible to run a multichannel task in two parallel Subvi?

    Thank you for the insight.

    Hello!

    Please post on the Forums OR! 'Reserved resources' are a common mistake and it seems that you are aware of its source. With the help of two tasks of the same type at the same time without having anything between the two that uncommits resources will not work. Your best option here would be to combine all your HAVE AO in another task in a task and every one of you.

    What you could do is to use an analog line available that you can analyze and implement a logic with something as a structure case to insert a value in a table, display it, open a session, or all you want to do with it, when this analog channel crosses a value you're looking for.

    You can include your other I / AO in the tasks and have just their acquisition / output as usual.

    Hope that this gets you going in the right direction. Have a great day!

  • Basic question about the selection of the AP and multiple channels

    I have about 10 PA (Aironet 1240 G) intended to be deployed one of my floors of office. We examined a diagram of the floor and made sure that we ordered enough to completely saturate the ground with wireless coverage. There are a few AP which are probably only 50' with each other. It's actually a bit exaggerated.

    I put a base on the switch configuration so that there are two different SSID on the access point (one for a production of WLAN and the other for a WLAN comments). Each SSID is associated with a VLAN different.

    I want to know is this what to do on the channels for the AP? Each access point will be independently configured and controlled.

    I understand that there is a way to control which channels each AP uses, but I'm not familiar with the controls or best practices for the configuration of the AP

    Can I do something like make sure that each access point uses a different channel than its nearest adjacent neighbors? Someone would mind sharing what is the command to do it, and where it is applied?

    I have read through some archives and saw people talk to set "no bunk channels" and to configure them to use 1,6,11 channels. I guess I don't understand what is meant by there.

    Manually define you an access point to channel 1, then set his neighbour to use 6 and another neighbor to use 11, and then you who stay?

    What is the worst of the scenarios on what happens when you have no AP too close to the other located on the same channel?

    It is a pleasure to read through the documentation if someone wouldn't mind pointing me to it. I'm still trying to understand the concept, and then I should be able to understand the documentation that came with the AP.

    Thank you for your help.

    If your stand-alone Access Points. If it was a deployment of Comptrollership, in fact to dynamically manage the channels for you.

    But what you really want to do, is you see APs do something like this:

    (imagine each number represents an access point, and it channel)

    1 6 11 1

    6 11 1 6

    11 1 6 11

    1 6 11 1

    It is a conceerne configuration guide. I think he has a small section on the channel assignment. If you do this manually, I think that you specify the actual frequency used in the CLI instead of the channel number.

    http://www.Cisco.com/en/us/docs/wireless/access_point/12.4_3g_JA/configuration/guide/s43rf.html

    So the CLI under the Dot11Radio0 you would do something like 'channel 2412' for channel 1... 2437 for 6, 2462

    for 11...

    If you have APs side by side on the same channel, you are likely to have clients interfere between them.

  • acquisition of continuous sample with multiple channels

    Hello! Please tell me what I'm doing wrong here, I'm confused about how the acquisition of continuous sample with several channels (using NI USB-6215 boxes).

    Following code is python code, but I don't know who confuse you (and it's only a part of my code in order to not try, it won't work

    buffer_size = 2000 #samples to read
    sampling_rate_hz = 20000
    channels = "Dev1/ai0 ai1/Dev1" #this can be a string or a large number...

    CHK (nidaq. DAQmxCreateTask ("", ctypes.byref (taskHandle)))

    CHK (nidaq. DAQmxCreateAIVoltageChan (taskHandle, channels,"", DAQmx_Val_Cfg_Default, float64(-10.0), float64 (10.0), DAQmx_Val_Volts, None "))

    CHK (nidaq. DAQmxCfgSampClkTiming (taskHandle,"", float64 (sampling_rate_hz), DAQmx_Val_Rising, DAQmx_Val_ContSamps, uInt64 (buffer_size) "))

    CHK (nidaq. DAQmxRegisterEveryNSamplesEvent (taskHandle, DAQmx_Val_Acquired_Into_Buffer, uInt32 (1000), uInt32 (0), EveryNCallback_func, None))

    CHK (nidaq. DAQmxRegisterDoneEvent (taskHandle, uInt32 (0), DoneCallback_func, None))

    the callback function #and

    def py_EveryNCallback_func (self, taskHandle, event_type, nSamples):
    data = numpy.zeros ((self.channel_amount,buffer_size,), dtype = numpy.float64)
    read = int32()
    CHK (nidaq. DAQmxReadAnalogF64 (taskHandle, buffer_size, float64 (10.0), DAQmx_Val_GroupByScanNumber, data.ctypes.data, buffer_size * number_of_channels, ctypes.byref (read), None))

    With only one channel, everything's fine, and tension diagram looks like this:

    buffer_size = 2000, sampling_rate_hz = 20000

    But if I use two channels, voltage diagram looks like this

    buffer_size = 2000, sampling_rate_hz = 20000

    It looks like the sampling rate is higher or there are fewer values?, but with two channels with the results table is 2000 * 2 long and with a single result is 2000 * 1 long is not smaller

    most of the settings important (?) in my code:

    DAQmxCfgSampClkTiming "float64 rate": 20000 (sampling_rate_hz)
    'UInt64 sampsPerChanToAcquire' DAQmxCfgSampClkTiming: 2000 (buffer_size)
    DAQmxRegisterEveryNSamplesEvent "uInt32 nSamples": 1000 (?)
    'Int32 numSampsPerChan' DAQmxReadAnalogF64: 2000 (buffer_size)
    DAQmxReadAnalogF64 "float64 [] readArray": [[buffer_size] * number_of_channels]
    'UInt32 arraySizeInSamps' DAQmxReadAnalogF64: buffer_size * number_of_channels

    as you can see nSamples is a big question mark, but the problem still exists if I set variable buffer_size y (2000)

    Hi Dazzler,

    It is not a multi-channel example that ships with the driver, but after a quick look at the code that you use in your third post, everything seems to be configured correctly. The only thing I was thing I got a question about your plots. Looks like you draw each time the same number of points. If you draw just the table of data directly from the playback feature, you need to draw (buffer_size * number_of_channels) number of channels since the data returned is as an interlaced array. You can also choose to deinterleave samples. More information about this lie in the NOR-DAQmx C reference help, which is installed with the NOR-DAQmx driver.

    Kind regards

    Kent

    Technical sales engineer

  • DAQmx showing not readings to multiple channels

    Hello

    I am trying to acquire values of temperature of 3 consecutive using a task DAQmx channel as shown in the attached photo.

    I have a loop of producer-consumer for fast reading and writing samples in a file.

    To specify the channels, I typed in the box connected to a terminal of "physical channel" (not shown in picture) as follows:-SC1Mod2 / ai2:4.  This is to acquire a reading of analog channels 2, 3 and 4. The program must then write a file reading on channel 3.

    The code works perfectly if I purchase samples of 1 channel only.

    When I try to acquire multiple channels, I don't see readings on one of the task of acquiring Wired Digital indicators.

    I would appreciate your input on what might be wrong with the code.

    Thank you.

    kumv10 wrote:

    The broken wire seen in the photo is the result of adding more channels to the task of acquiring.  I managed to get around this by specifying a different, but even with an intact wire data type, the program is not displayed readings since the 2 remaining channels.

    Instead of use for dynamic data Type, then the channels Split, just use an array of Index to get your three values.

  • Change the sample DAQmx and Terminal configuration mode

    Hello

    I'm studying 'Timing and synchronization features of NOR-DAQmx' from the following link,.

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

    Could someone tell me how to Figure 2, Terminal configuration entry in the part "DAQmx virtual channel creat? Shoud I double-click on the icon to change it? Or there is some way that I can show it in the block as the sample mode diagram in the DAQmx part?

    How can another question, in the DAQmx calendar part, I put "Continous Samples" here? It comes from the function palette? Thank you.

    Hi Oly,
    To make the configuration of senior year to enter the channel 'DAQmx create' you will need to create a constant or control over this VI either.  When you hover over a VI, as the VI "DAQmx Create Channel", you will notice that the dots appear around the edge of the square.  "" When you roll your mouse over these points, you mouse pointer will appear a coil of cable/wire how you can right click your mouse and select 'Create' constant ' or 'create' control '.  If you create a control, you have a user control in your front, where as if you create a constant, you will have a drop-down list in your block diagram.
     
    It goes the same for continuous samples, simply hover over the VI, right-click on the corresponding 'point' and select this option to create a constant.
     
    In case my instructions are unclear, that I have attached pictures of how to go about doing this, the first is to show 'points' I speak around the VI and the second picture shows the possibility to choose after you right-click on the point.
     
    Good programming!
    aNIta B
    Technical sales engineer
    National Instruments

  • How can I set a channel IEPE DAQmx and the other not?

    Hi, guys!  I am a first year student in labview. I meet a problem and need your help.

    In my DAQmx data acquisition system, I must acquire the data of two channels at the same time. And a channel IEPE, another does not need. You can open the example in the following location: C:\Program NIUninstaller Instruments\LabVIEW 2014\vi.lib\addons\Sound and Vibration\Example Support\DAQ\DAQmx\Frequency Analysis\Dual channel Analysis\Baseband FRF (DAQmx AI and AO) .vi. In the example, you must configure both of them to stage IEPE or not. There is no more information that I can find. And I have no idea to solve this problem.

    Thanks in advance
    concerning

    What you have tried after the update.

    -You can list down all channels using the as shown in http://digital.ni.com/public.nsf/allkb/CC501982F91AFA548625735D00547AC2

    -You may find the information and links in this forum: http://forums.ni.com/t5/LabVIEW/Setting-up-IEPE-settings-DAQ-MX-task-for-multiple-channels/td-p/1728...

  • Select multiple channels for a single task - control and shift keys do not work

    Hello

    Following the advice of several other positions, I try to choose several physical channels in the drop-down list so that I can then use the function "unflatten channel channel" later. It seems that if I hold this key is pressed or cntrl, I should be able to select multiple channels in the list, however, this does not work for me. I tried to go in the "navigation key" property for the control channel to task, but there not all listed associations. Someone else has encountered this and found a solution?  I previously around that by declaring several channels by a colon (for example, ai1:3), but it does not work for the unflatten function.

    Thank you

    Claire.

    If I understand correctly, I think that you need to do is use a task property DAQmx. Try to use the channels property to get an array of strings.

  • TDMS multiple channels, frequencies of different sampling

    I'm developing an application c ++ under Windows 7, which must record the sensor data acquired on the disc. The data consists of approximately 1 500 channels sampled at rates that vary between 100 samples/s and 1 sample/s with data types which could include the floating, whole, decimal point fixed and boolean. We need log on without interruption for hours at a time. In the past, my company has used LabWindows/CVI to write TDMS files for this kind of application, but the number of channels has always been much lower and all channels, we sampled at the same rate. I was instructed to use the LabWindows/CVI/PDM solution for this new effort, but I have concerns about the way in which it will occur in the conditions I described above. My questions:

    * It OR application notes dealing with best practices for recording several channels of data sampled at different rates for TDMS with LabWindows/CVI files?

    * Are there performance indicators which show the capablities and the limitations of LabWindows/CVI/PDM in conditions similar to those I describe?

    * Someone here any experience – positive or negative – with TDMS in a similar application which they can share?

    TIA

    Hugh

    I had an Exchange offline with Technical Support OR on this subject and received the following guidelines, which I consider the Gospel:

    You should be able to connect to TDMS in CVI for your strings from 1500 to different rhythms without problem provided that your computer has enough memory.  You can set up groups and with 1500 channels you should probably, in the interest of the Organization, but it is not necessary to create groups to limit the number of different sampling frequencies.  Alternatively, you can generate different files to separate data, which are also recommended, but not necssary, based on your preference for the organization rather than the need for the maintenance of sampling together in the same file.  TDMS supports asynchronous writing, so you should be able to connect different channels at different rates for the same file without errors in access to the files or something like that.   One thing, you might encounter is slowing a lot of simultaneous writing.  I found this example of community which shows how to write data to disk faster using the advanced TDMS API.  Please visit the following link: LabWindows/CVI Tip: write data to the disk faster with TDMS Advanced API https://decibel.ni.com/content/docs/DOC-33401

  • What is continuous and Dangling channel mode in VPN mode?

    What is continuous and Dangling channel mode in VPN mode? With Differece?

    Please help me understand this concept...

    Can you please tell me from the issue? In general, it is very in depth knowledge IKE not very useful for all those outside developers and support for the seller.

    Simplified way.

    Continuous channel - we will keep IKE SA as long as there is an IPsec security association to the top.

    Dangling mode - we leave associations security IPsec "swing" without the support of his IKE.

    Marcin

  • Question about the Acquisition continues through NOR-DAQmx

    I'm a bit new to NIDAQmx methodology and I was wondering if someone could could give me some advice on accelerating certain measures of tension that I do with a case of DAQ NI USB-6363.

    I have a python script that controls and takes measurements with a few pieces of equipment of laboratory by GPIB and also takes measurements in the area of DAQ OR DAQmx via (I use a library wrapper called pylibdaqmx that interfaces with the libraries C native).  As I do with the data acquisition unit is 32 k samples at 2 MHz with a differential pair to AI0.  An example of code that performs this operation is:

    from nidaqmx import AnalogInputTask
    
    # set up task & input channeltask = AnalogInputTask()
    task.create_voltage_channel(phys_channel='Dev1/ai0', terminal='diff',       min_val=0., max_val=5.)
    task.configure_timing_sample_clock(rate=2e6, sample_mode='finite',
          samples_per_channel=32000)
    
    for i in range(number_of_loops):  < ... set up/adjust instruments ... >  task.start()  # returns an array of 32k float64 samples  # (same as DAQmxReadAnalogF64 in the C API)  data = task.read(32000)  task.stop()  < ... process data ... >
    
    # clear task, release resourcestask.clear()del task< ... etc ... >
    

    The code works fine and I can all the 32 k spot samples, but if I want to repeat this step several times in a loop, I start and stop the job every time, which takes some time and is really slow down my overall measure.

    I thought that maybe there is a way to speed up by configuring the task for continuous sample mode and just read from the channel when I want the data, but when I configure the sample for the continuous mode clock and you issue the command of reading, NOR-DAQmx gives me an error saying that the samples are no longer available , and I need to slow the rate of acquisition or increase the size of the buffer.  (I'm guessing the API wants to shoot the first 32 k samples in the buffer zone, but they have already been replaced at the time wherever I can playback control).

    What I wonder is: How can I configure the task to make the box DAQ acquire samples continuously, but give me only the last 32 samples buffer on demand k?  Looks like I'm missing something basic here, maybe some kind of trigger that I need to put in place before reading?  It doesn't seem like it should be hard to do, but as I said, I'm kinda a newbie to this.

    I understand the implementation of python that I use is not something that is supported by NEITHER, but if someone could give me some examples of how to perform a measure like this in LabView or C (or any other ideas you have to accelerate such action), I can test in these environments and to implement on my own with python.

    Thanks in advance!

    Toki

    This is something I do a bit, but I can only describe how I would do it in LabVIEW - I'm no help on the details of the C function prototypes or the python wrapper.

    In LabVIEW, there are accessed via the 'DAQmx Read property node' properties that help to implement.  One is the Mode "crush" which I'm sure must be set before performing the operation.  The other pair is known as "RelativeTo" and "Offset" and they allow you to specify what part of the CQI data buffer to read data from.   If you the config to "RelativeTo" = 'most recent sample' and 'Offset' =-32000, then whenever you read 32000 samples, they are the very latest 32000 which are already available in the buffer of data acq.  Between the readings, the task is free to overwrite the old data indefinitely.

    Note that you will need to do this continuous sampling mode and that you can explicitly set a buffer size smaller than the default which will choose DAQmx based on your fast sampling rate.

    An excerpt from LV 2010:

    -Kevin P

  • Continuous signal creation (using the PFI channels?)

    Hello

    I am new to the use of OR and its interfaces. I use the USB-6221, with its C API.

    I need to create multiple channels of continuous digital output with the cycle of the frequency and the duty.

    I used DAQmxCreateCOPulseChanFreq for the crt0 and crt1 channels and it works fine, but I need a few lines.

    Can I use the channels of the PFI (PFI0-4 for example) for this purpose?

    With the help of the DAQmxCreateDOChan I can set the PFI desired channels as DO, but how can I create the signal desired on these channels?

    Best regards

    Danny.

    Howdy Danny!

    If you try to build a train of digital pulses with a frequency cycle and specified duty then using counters shipped from the USB-6221 is certainly the way to go.  Unfortunately, as you have discovered there are only two meters of material available on the USB-6221 (Ctr0 and Ctr1).

    Fortunately, you can also use the digital output lines to efficiently create a train of pulses with a frequency cycle and specified duty.  You will need create a table of examples which, when released at the specified sampling rate, looks like a period of your waveform.  For example, if my sampling rate is 1 MHz and I want to create a square wave of 100 kHz and a cycle of operation of 20% low high/80% I would generate the following examples:

    {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

    Please let me know if this description is clear or if there is anything I need to explain more in detail.

    Kind regards

  • Generation of series in multiple channels

    Hi forum, I need to ask a few questions. Any help is appreciated.

    (1) I need help with the generation dynamic series in several channels. Here, we can see how the dynamic data set generated by a single channel. But I can't find anywhere, how to generate several series signals in multiple channels.

    (2) what is the limit for this generation series? I think it depends on the material, but I don't know, what is the limit. My hardware is SMU-6544.

    (3) it is possible to generate different signals in different channels using scripts? and to start the production in these channels at the same time? the example given in the script generation labview is unfortunately only for the generation of a channel.

    Thanks in advance,

    Kind regards

    Yan.

    Hi Yan,

    Produce on several channels with multiple data is difficult without a tool to view the data, or series of each channel bitstream concatenated into a software ADE and transposed before be downloaded into memory.  To make Visual things here, I'll assume that you want to generate a pattern of 3 bits on sample of channels 0, 1 and 2 is 8 wide.  Assume the following models of the series bit for each channel:

    ch 0: 0101 1010

    CH 1: 0000 1111

    CH 2:0100 1101

    So the question now is, how do you load this in the SMU-6544(or any other HSDIO hardware)?  Of the two options, you can use Digital Waveform Editor (NEWS) to create visually and save to a file type HWS then load a DJ using the API HSDIO.  It is the easiest in my opinion.

    The second way is construction examples of data based on a basic example.  I want to say is you take it all binary streams and built a 2D table so that it looks like:

    01011010

    00001111

    01001101

    An array of 3 x 8 and then transpose the table that turns into:

    000

    101

    000

    100

    111

    011

    110

    011

    Here you can see we have 8 lines, each line is a sample, and in the form of U32 read in decimal, you get 0, 5, 0, 4, 7, 3, 6, 3.  That's what you can load into our niHSDIO U32 function write a waveform.  I hope you can see how this translation occurs and how it looks like in terms of load on the jury.  Each sample usually contains data for all channels, where each bit in the U32 is one of the 32 channels available on your device.  So if you want to write a '1' on Channel 5, you would load a value of 0000 0000 0000 0000 0000 0000 0010 0000 in the form of sample, where the 5th bit is 1 and all the other bits 0.  In decimal, you would write '32' value.

    With regard to the limitation of the size of series, if your flow rate is slow enough you can disseminate and make an almost endless stream, but assuming that you are running at the maximum rate, your series of waveform size is limited by the size of your on-board memory.  Since each sample generation is 32-bit, which is 4 bytes for example, if a memory size of 32 MB will correspond to 8MS bitstream series max.

    For any questions or comments are welcome.  Thank you.

  • How do switch you between multiple channels to indicate which channel to acquire the data from?

    I'm trying to builld a VI where I can have an option to enable or DISABLE multiple channels depending on the modules plugged into the chassis and then acquires the data of the channels which are turned on and where other acquisition parameters do not change. Is there any specific/switch where can I do this? Please answer as soon as possible. Its quite urgent. Thank you

    You use DAQmx?  To change the assignment of the data acquisition channels, you must close the currently open session and then create a new session with the new channel definition.  So the order of execution:

    Create task or virtual channel - read - clear task of triggering and synchronization of the configuration - set new channel list and to create a task - read - clear task, etc...

  • Dedicated for each channel from multiple channels in a single task task disadvantage

    Hello

    My current acquisition software (C + c++ / GCC) encapsulates the methods rather clumsy niDAQmx C to interface with the data acquisition equipment in a class that represents a task of acquisition. This way I can create several instances, for example counter input, analog input, analog output, their terminals and the class supports all work low level as ensuring input analog fake internal is started if there are only counter entries such as the sample clock starts, or configure reminders N-sample, etc.

    It seems to work very well, and also the time seems to be good, because first of all the tasks on multiple instances of my wrapper. For triggered early, that I use

    DAQmxCfgDigEdgeStartTrig(mTask,mTriggerTerminal.toAscii().constData(),DAQmx_Val_Rising)

    in-house.

    Now my real question: what is the advantage of multiple channels, when everything seems to work fine with multiple tasks and only one channel per task? I don't see the disadvantage, it would first classify necessary acquisitions in types (I, ao,...) because several strings in a single task must be of the same type. With my approach I need not care because each channel still gets its own task.

    I don't know I'm missing something here. Maybe someone can explain it to me, maybe some limitation of multi-tasking, I have not yet read.

    Hey!

    Unless you specified for managing the it (simultaneous sampling) or modular instruments and hardware devices (see link )

    You cannot perform two tasks at the same time that access to the analog inputs, for example, because the

    ADC is a shared resource that is connected to a multiplexer, and that only one task can work in it at a time given. (see here )

    Similar restrictions often apply to other types of operations.

    I'm not aware of any performance issues, perhaps a little more memory could be used.

    So as long as your hardware supports what you are doing, you should be ok, I think,

    and it is only a question of clarity and intelligibility, ease of use and structure.

    As you use classes, I'm sure you've heard about encapsulation - so it is a

    question of how you want to design your application.

    In addition, when you work in LabVIEW, tasks feel more natural to the principle of data flow, because you have a thread for your data acquisition,

    and it works very well with our modes of standard design.

    So, if it is better for you (and works with the hardware), you can give all the channels its own task.

    Hopefully this might clarify some things,

    Kind regards

    Rome

    OR Germany

Maybe you are looking for