Max of each channel enter a new channel

I'm doing a script in 11 tiara which takes the maximum value of the first 50 channels and puts these 50 values in a new channel.

I first tried the ChnPeakFind command, but it is creating too many new channels.

So I resorted to the ChnPropValGet (Group/channel, "Maximum") command.

For I = 1 to 50

MyChannel = "[1]" / "+ I"
CurrentMax = ChnPropValGet (MyChannel, "Maximum")

Missing order here to add "CurrentMax" to a channel

' MsgBox (CurrentMax)
Next

I encounter two obstacles here:

1. education MyChannel = "[1]" / "+ I does not work, because I don't flatten automatically"

2. I can't understand how to add value to an existing channel

Normally the files help quickly make me go, but not this time.

I look forward to your suggestions!

Thanks in advance,

AART-Jan

Aart-Jan Hello!

Try this code:

Option Explicit

I have
MyChannel
CurrentMax
nChnMax

ChnAlloc("Max",50,1,DataTypeFloat64)
nChnMax = CNo("Max")

50
MyChannel = "[1] / [" & I & "'"] ' "

CHD (i, nChnMax) = ChnPropValGet (MyChannel, "Maximum")

Next

ChnCharacter (nChnMax)

Matthias

Tags: NI Software

Similar Questions

  • What is the best way to change this program and to read 1 sample of each channel?

    The initial program was conducted with NOR-traditional DAQ. I change it to DAQmx the best I could. The program, he is already the application of voltage to generate code (Daqmx Write.vi). But I have problems with the acquisition of tensions, give me readings rare (Daqmx Read.vi) I don't know if I have to make a (Daqmx start Task.vi) for each channel in the program or if I can make it work with a single. Notice I have no significant changes a lot because this program is already running in another lab, and they send us the program so we had no problems so much but rather than get the BNC-2090, they got the BNC-2090 is who uses DAQmx instead of the traditional. If anyone can help?

    A BNC-2090 is just a connection block.  It has no effect on the question of whether you should use traditional DAQ or DAQmx.  Which is determined by the DAQ card that you are connected to the terminal block too.

    You can refer to this document, differences between the BNC-2090 and connector BNC-2090 blocks has, but it's just saying to change the label of the Terminal Board to reflect the new DAQ cards.

    What problems are you having with the new VI you just posted?  You get an erro rmessage?  I don't know what mean "rare readings.

    You really shoud look at some cases DAQmx in the finder of the example.  Some problems that you are experiencing, is that your blocks of data acquisition are all kinds of disconnected.  Generally, you should connect the purple wire from your work function of creation, through the beginning, reading or writing, then the narrow task.  Many of your data acquisition functions are sitting there on the small islands now.  You should also connect to your son for the error.

    With DAQmx, you should be combining all your analogue channels in a single task.  It should resemble Dev0/AI0... AI7.  Then use a sample of channel 1 N DAQmx read to get an array of the readings, you can then use array of index to break.

    Other things you need to do is to replace the structures sequence stacked with flat sequence structures.  Turn on automatic growth for some of your structures such as loops.  At the end of the day, you might find, you can eliminate some of the structures of the sequence.

  • How to structure the DMA buffer for SMU 6341 DAQ card for analog output with different frequencies on each channel

    I use the outgoing/incoming analog DDK with the DAQ 6341 SMU map.

    The examples, for example aoex5, show a single timer (method outTimerHelper::loadUI), but the example shows the DMA loaded with same size of vector data.

    There is a comment in the outTimerHelper:call rogramUpdateCount, which implies that memory sizes different pad per channel can be used.

    (the comment is: switching between the sizes of the various buffers is not used)

    Nobody knows what should be the format the DMA buffer for data from multiple channels with different frequencies?

    For example, we want a0 with a sinusoid at 1 kHz and a1 with a sine wave of 1.5 Khz.  What looks like the DMA buffer?

    With the same frequency for each channel, the data are interleaved, for example (ao0 #0, ao1 #0; ao0 ao1 #1, #1,...), but when the frequencies for each channel is different, what the stamp looks like?

    Hello Kenstern,

    Data are always intertwined since each card has only a single timing for each subsystem engine.

    To AO, you must specify the number of samples that will be released to the AO. You also specify the number of channels. Because he didn't is that a single engine timing for AO, each AO will be channel will be updated at the same time to update clock tick. Data will be interlaced exactly as shown in the example because each channel AO needs output at each tick of the clock to update. The data itself can change depending on the frequency you want to copy.

    kenstern wrote:

    For example, we want a0 with a sinusoid at 1 kHz and a1 with a sine wave of 1.5 Khz.  What looks like the DMA buffer?

    With the same frequency for each channel, the data are interleaved, for example (ao0 #0, ao1 #0; ao0 ao1 #1, #1,...), but when the frequencies for each channel is different, what the stamp looks like?

    In your example, you must come with an update rate that works for the two waveforms (sine waves of 1 and 1.5 KHz). To get a good representation of a sine wave, you need to update more than 10 x faster than your fastest frequency... I would recommend x 100 if possible.

    Update frequency: 150 KHz

    Channels: 2

    Then create you stamps that include complete cycles of each wave you want to produce based on the frequency of update. These buffers must also be of the same size.

    Buffer 1: Contains data for the sine wave of 1 KHz, 300 points 2 cycles of sine wave

    Buffer 2: Contains data for the sine wave of 1.5 KHz, 300 points, 3 cycles of sine wave

    You can Interleave them as before. When the data are performed through the ADC, they are out different sine waves, even if the AO channels are updated at the same speed.

  • Definition of various mitigating factors for each channel on the virtual bench MSO

    I'm trying to measure two very different signals, using both channels of the 8012 virtual bench programmed in LabView. The signals are very different amplitudes, which means that the definition of the vertical range for the largest signal is not truncated causes the smallest signal to become very agitated that the resolution today is very low. The only way I know to use two channels simultaneously is to index the waveforms with channel number when the measurement is complete. This means that both channels of parameters are defined at the same time by the same command sequence. Is it possible to set separate settings for each channel during intialize?

    I enclose my referral program that there is much more than just this part. If someone need clarifications just ask!

    Thanks in advance!

    Kai

    I thought about it. If anyone runs into this problem let me know and I can show you how I did it

  • 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

  • How to control each channel of the signals emitted by the generator of digital waveforms?

    Generator has digital waveforms of 8 channels. I need to generate two different signals for HSDIO. How to change and control two different ways? In addition, how to translate pinout of the PXI-6541 to channels? I need pin 1,3,29 and 31 control signal individually.

    Thank you!!

    You need to combine your personal data in a table.  The digital waveforms is simply a numeric representation of the binary table.  It always boils down to bit 0 of each element of the array will channel 0 (or the first string that you specify in creating dynamic channels).  The next bit goes to the next channel.  My last post is very clear.  To display the table in binary, right-click on a table element, then select the display Format, then select binary.  You can also right click on the element, select Visible, then select Radix Show to display the small b before the number.  One last thing, in the display Format window, uncheck the box next to the minimum field width to use.  Then set the digital just below zone 8.  Then select Pad with zeros to the left in the box below.

    You should not use waveforms up to what learn you more about how the HSDIO operates on the input data.  It is not difficult to combine waveforms, but it is not as clear as it is using an array of U8, U16 or U32.

    Trying to explain further.  The first number to be written to the HSDIO will have this effect: Bit 0 (LSB) of the number is written to the first HSDIO string you specify.  Bit 7 is on channel 8, you specify.  If you specify no 8 channels, the bits download ignored.  If wiring in a certain number will produce only a single bit on each channel.  In other words, the number has already combines the bits of all channels that you specify.  Combine you do nothing yourself.  Return to my photo on my last post.  By wiring in a table, you cause a binary model must be generated.

    I hope that is more clear.

  • Need to enter the new (correct) key for Win7

    My hard drive failed and I had to reinstall Win7.  No problem, right?  Well, we have 4 pcs in our House, each with its own copy of Win7.  Apparently when I restored it, I used the wrong key and now get me the message that my copy is not valid - where can I go to re - enter the correct key?  I really don't want to erase this disc and start over, I spent more than a week he rebuild it as it is.

    Press Windows key + R

    Type: slui.exe 3

    Press enter

    Enter the new key, and then click next to activate via the Internet.

    OR

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

  • Can I print each table on a new page?

    When you use numbers, I often have several tables in a given sheet. Like this:

    When I print the worksheet, this often causes tables to be spread over several pages. Like this:

    It is very painful position each table in the exact spot so it will show on the next page, like this:

    Is there a setting somewhere in the sense of ' print each table on a new page.

    If not, is there another book autour which does not imply boredom of lowering it the exact amount of each table so it will show on the next page?

    Thank you!

    A work-around may be copy and paste each table into Pages where you CAN insert page breaks. (You may need to force the paintings to stay up-to-date).

  • Once I have opened/used a url in a new tab, I can't clesr the address bar to enter the new URL - address bar seems frozen

    whenever I open several tabs, I can't clear the address bar to enter a new URL address... I'm using the latest beta version of FF

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

    It works if you open a new window?

    See also:

  • Since the download of Firefox 4, I have problems of archiving of conversations from my gmail Inbox view. Also, when I go to enter a new event in google calendar, I have to now click the cursor in the box type of the event (it used to let me just start typ

    Since the download of Firefox 4, I have problems of archiving gmail conversations since my Inbox view (one or more conversations) as it says 'No. Conversations selected' when I selected one or more. Also, when I go to enter a new event in google calendar, I have to click the cursor in the field type of the event (it used to let me just start typing) or else he bends and begins to jump to the day view or another month. Does anyone know how to fix one of these?

    I had this problem; But while trying to solve another problem, I reset my preferences for Firefox and it fixed this problem as well. To reset the preferences, follow this link: http://support.mozilla.com/en-US/kb/Resetting%20preferences

  • How to enter a new value not contained in a dynamic LOV?

    Hello

    I have a tabular layout with a report. This report is used to update a table. I defined a column of the report as a list of selection (called LOVE). It diaplays a dynamic LOVE to let the user choose a value in the LOVE, as a suggestion, but I want to make it possible to the user enters a value that is not in dynamic LOVE. I tried with "Display additional value" in the section "List of values", but this option displays an 'empty' value, but does not offer the possibility to enter a new value.

    You have an idea?

    Thank you very much for your help!

    Christian

    Hi Christian,

    Sorry - my suggestion was for the normal items.

    -J' tried it myself with a tabular form and it market in my env with Popup LOV (named LOV). I have a LOV named for it and then enter
    additional values directly in the text field.

    Best regards

    Carsten-

  • How to display the max value of channel report repel?

    Hi all

    I have 2 text boxes start and ready target on my report. I need my minimum value of the layer and the other value to automatically display in the start menu and to target channels max case respectively.

    How can I go about it?

    Rsh

    Hello, RSH,.

    Now, how can I limit the decimal points to 2 digits, say, for example, we use d.dd. How can I use it here?

    You can simply convert the string variables and the format of this string using the str function in DIAdem.

    Here is an example for your specific application:

    Maximum: @@str (CMax("[1]/Speed"), "d.dd").

    I hope this helps.

    Otmar

  • How to capture audio only then separate each channel to use.

    Hi all, I spent time trying to find the answer before posting - but without success. Here's my work:

    My project is 1.5 hours long.  Inside the project, I have a clip of audio / 2 minute video that has music, I need. I want to export only the audio. After I do that, I want to take the second channel and use it for another project.

    I found the 'export' function and created an Aif file, but - instead of just the clip that I selected, it gave me audio of the entire timeline (huge).

    I tried also to the clip, simply select copy, then tried to 'stick' on my backup window, but it wouldn't let me.  I have to go to the source media to extract this clip again? is not supposed.

    advice on how to proceed? Thank you all!

    NAVE

    Alrighty nefl777, here's another way to do almost the same thing. This method is more faster/easier, if you do not need to use the clip exported in another project.

    http://screenr.com/qfI

  • Extend each line to the new lines by "N".

    Oracle 11.2.0.1

    Here's a simple query that develops each line given in "N" new lines with a sequence counts 1 to "N", where "N" is given as the column 'cnt '.

    It works and gives the expected results, as shown below; but I wonder if there is a more effective or more elegant way to do this. I really don't like the cross all lines of the largest sequence in the data join.

    with smpl_data as
      ( select  'item-1' val, 3 cnt  from dual union all
        select  'item-2'    , 4      from dual union all
        select  'item-3'    , 1      from dual union all
        select  'item-4'    , 0      from dual union all
        select  'item-5'    , 2      from dual 
      )
    select  a.val, b.n
      from  smpl_data  a
            cross join
            ( select  level as n 
                from  dual 
              connect by level <= (select max(cnt) from smpl_data) 
            )  b   
     where  b.n <= a.cnt
     order  by  a.val, b.n ;
    
    Results:
    
        VAL         CNT
        ------  ---
        item-1  1
        item-1  2
        item-1  3
        item-2  1
        item-2  2
        item-2  3
        item-2  4
        item-3  1
        item-5  1
        item-5  2
    Thank you.

    Since you're on 11g the WITH recursive clause is better (and should be faster too).

    Here's how you can use it.

    with smpl_data (val, cnt) as
      ( select  'item-1', 3 from dual union all
        select  'item-2', 4      from dual union all
        select  'item-3', 1      from dual union all
        select  'item-4', 0      from dual union all
        select  'item-5', 2      from dual
      )
     ,data_expand (val, cnt)
       as (select d1.val, d1.cnt from smpl_data d1
           where d1.cnt > 0
           UNION ALL
           select d2.val, d2.cnt-1 from data_expand d2
           where d2.cnt > 1
           )
    select * from data_expand
    order by val, cnt
    ;
    
    val   cnt
    ----------
    item-1     1
    item-1     2
    item-1     3
    item-2     1
    item-2     2
    item-2     3
    item-2     4
    item-3     1
    item-5     1
    item-5     2
    

    Published by: Sven w. on 12 July 2012 16:30
    -changed: output 0 rows are excluded

  • Update my credit card for iCloud: it wouldn't let me enter any new info card.

    I received this info by e-mail:

    "

    Dear Margaret Swanson,
    24/04/2016, we tried to charge you for your iCloud 200 GB storage plan, but there is a problem with your payment information.
    Your account will be be downgraded to the free 5 GB storage plan if successfully, we are unable to renew your subscription.
    Follow the instructions below to update your billing information:
    1. Go to settings and press iCloud.
    2. Type your name.
    3. Press payment and follow the prompts.
    You can also update your information for billing on an Mac or PC.
    The iCloud team

    When I got to the 'PAYMENT' tab it I cannot enter new card information. How can I update my payment Info?

    Follow the instructions described here > iCloud and downgrades - Apple Support storage upgrades.  If you're still having trouble, reaching out to Apple Support.

Maybe you are looking for

  • False positive spam: TOTALLY UNTOLERABLE

    Posted this 10 days yet and no help? So tired of good emails end up in the junk e-mail folder. No matter how many times I transfer to e-mail boxes right to try to teach the Mail which are good emails, it seems that Mail never learns. Even created spe

  • multicolumn listbox header

    Hello! I have a question about multicolumn list boxes. Is it possible to organize the header string vertically in the multicolumn ListBox? Thank you very much for your help! Ákos

  • Dell Precision 690 memory risers

    Original title: Dell PRECISION 690 MEMORY RISERS Help...Ive a precision 690 workstation, WITH 4 GB = (2 X 2 GB) WITH MEMORY installed now and Ive mounted a 1kw power. I JUST GOT A PR OF MATCHING RISERS (EG) 1,2 & 3.4... BUT THAT IS WHERE THE PROBLEM

  • Laptop mouse problems

    My laptop seems to have mouse problems lately.  It is to select things too fast for me.  It highlights all, or choose something just because I'm pointing at it, even if I click on the object.  Is there a way to fix this?  I looked threw the help, and

  • BlackBerry App to connect to a drive does not

    Hi all I can't currently access the OneDrive Blackberry application with the connection. I use an official passport of BB with the OS 10.3.0. I am able to log in successfully, then it asks me to allow the permissions (I have agree / agree), but he th