Use: How to read a single line of names of channel or units?

Most of the examples of programming to use use channel names in separate lines, as in the following example:

Channel
Name: time
Type: time

Channel
Name: XShift
Type: R64

Channel
Name: YShift
Type: R64

Most of my data sets have channel names and / or units in one line separated by tabs as

"Dehnung" "Standardkraft" "Sensor" "Zyklusnummer" "PWM".

« mm » "N" "V" « » « % »

Is there a more effective way to add channels appointed and equipped with units along these lines to bike through some index variable? Like my channel number, etc. naming vary frequently, I would be looking for a more flexible solution, avoiding fixed table or names hardcoded sizes.

I guess

aMyChannelNames = split (File.GetNextStringValue (eString), vbTab)

aMyChannelUnits = split (File.GetNextStringValue (eString), vbTab)

for i = 0 to UBound (aMyChannelNames)

Adjust the strings = Block.Channels.Add (aMyChannelNames (i), eString)

Channel.Porperties ("Unit") = aMyChannelUnits (i)

next

could do the job - but it's the most effective way?

Thank you for helping.

Michael

Hello Michael,

I don't see the real problem.

You read the header and split it into an array. This is information you have how many channels. Table size ubound depends on the line you have red and is not fix. Everything should be good now.

You read the information and would divide the tables. Then, you use a loop to generate channels and set the properties. I don't think that there is a better way to do it.

Kind regards

Philipp K.

AE | OR Germany

Tags: NI Software

Similar Questions

  • How to set up single-line message headers?

    Previously, in the message display area, I had configured Thunderbird so that a message appears that the subject of the message in the message header section just above the body of the message. But I just upgraded to to 38.1.0 and now I have in reserve, [address], in the header box, although I've seen-> headers-> Normal (Compact) set.

    Please tell us how to get back to the option just to display the subject line. Real estate vertical display is much too precious to not having the capacity of the old view of a single line.

    Thank you
    [email protected]

    Install this add on.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/compactheader/?src=HP-DL-featured

    The normal headers view removes the routing information only. It has nothing to do with what you are trying to accomplish.

  • How to write a single line instead of the entire port?

    Hello

    I followed the example for writing to the digital line as follows

    int taskHandle;

    given int [8];

    char linename [] = "" dev2/port0 / line0:7 ";"

    DAQmxErrChk (DAQmxCreateTask ("", & taskHandle));

    DAQmxErrChk (DAQmxCreateDOChan (taskHandle, linename, "", DAQmx_Val_ChanPerLine));
    DAQmxErrChk (DAQmxStartTask (taskHandle));
    DAQmxErrChk (DAQmxWriteDigitalU8 (taskHandle, 1, 1, 10.0, DAQmx_Val_GroupByChannel, data, NULL, NULL)); Here the data have 8 digits
     
    Error:
    SetWaitCursor (0);
    If (DAQmxFailed (error)) DAQmxGetExtendedErrorInfo (errBuff, 2048);
    If (taskHandle! = 0)
    {
    DAQmxStopTask (taskHandle);
    DAQmxClearTask (taskHandle);
    }
    If (DAQmxFailed (error)) MessagePopup("DAQmx Error", errBuff);

    The example above shows how to write 8 binary to 8 lines, but how to write only one line? I try the following code, but it does not work

    char linename [] = "dev2/port0/line 2;

    ...

    DAQmxErrChk (DAQmxWriteDigitalU8 (taskHandle, 1, 1, 10.0, DAQmx_Val_GroupByChannel, & data [2], NULL, NULL)); Here the data have 8 digits

    The data format for the DAQmxWriteDigitalLines() function will do exactly what you want.

    The data format for the DAQmxWriteDigitalU8() function is a full port (even if you do not have a value of a harbour full of lines in your task).

  • How to divide a single line (all lines) for the use of a few sql

    I have table

    Select * from une_table;

    name_a
    date_a
    name_b

    Date_B

    Sunday01.01.2015Monday02.01.2015
    Tuesday03.01.2015Wednesday04.01.2015

    How to divide this table in all lines after using sql:

    name
    Date
    Sunday01.01.2015
    Monday02.01.2015
    Tuesday03.01.2015
    Wednesday04.01.2015

    Thanks for the replies.

    Trajon,

    You don't have a table. You have a store of garbage. There is a repeating group in your 'table' and column name_a etc is unnecessary, because you can derive the day of the week from your date by a to_char function.

    You can find it in your documentation online.

    Knowing that you can get the ordinal number of a date using to_char, what have you tried to do it yourself?

    Your answer is probably: NOTHING.

    First try to solve it yourself and if you post something here, make sure that this forum is not to throw up, because your code that is terribly bad.

    ------------

    Sybrand Bakker

    Senior Oracle DBA

  • How to make a single line with 6-8 images in css?

    I would like to do a header line with 6-8 icons of different sizes and use them as links.  I can't get them to line up horizontally in a container. How can I do this?

    You can do this by making the area the same size icons. that is, all the images are the same size, it's just the icons in the image control that are different sizes.

    If you don't want to do this then probably a good reason to use a table with cells of 6/8 otherwise, you will need to adjust padding/margin on each icon to align individual, doable but somewhat tedious.

  • How to read a single message in CC & B - XAI integration

    Dear friends,


    In fact I want to receive a message format (of the file format text or xml (as SpotBilling system files)) in CCB. Can someone describe in detail.
    is what I did, I created a folder and I have that mentioned in XMLReceiver and the definition of service of entrants.
    then I tested this xml file according to xai, but it is showing error as

    < faultcode > SOAP - ENV:Server < / faultcode >
    < faultstring > server error < / faultstring >
    < detail >
    < ResponseStatus > F < / ResponseStatus >
    < > 1016 ResponseCode < / ResponseCode >
    < ResponseText > Unexpected error during the processing of the application. java.io.FileNotFoundException: answer: & apos; 401: unauthorized & apos; URL: & apos; http://01HW312177:7001 / spl/XAIApp/classicxai & apos; < / ResponseText >
    < / details >
    < / SOAP - ENV:Fault >

    In addition, pls help where I can find the schema editor, your help will be appreciated.

    Thanks and greetings
    Jean Jacques

    classicxai is for backward compatibility, you should use instead "http://01HW312177:7001 / spl/XAIApp/xaiserver.

    Change URL to execute of XAIURL for the XAI run that you set on the receiver XAI.

    File upload path would be the directory on the Application Server, unless the server itself is mapped to a common path/shared folder accessible to both client and server.

    Schema editor can be downloaded from edelivery.oracle.com

  • How to return a single LINE with Multiple value separated by a colon in a SQL query

    Hello

    I have a SQL, as shown.
    select deptno
      from dept
    I want to mofidfy this query, so that it should return me departments with colon delimeted list in a ROW.
    10:20:30:40.......
    Thank you
    Deepak
  • How to read and scale of multiple analog input channels

    Hello

    I'm reading the data of several types of sensors, with readings of 4-20mA. What I'm trying to do, is have a pressure transducer, a flow meter and a RTD sensor all connected on channels 1, 2 and 3 of my cDAQ using DAQmx. After channels are put on the scale, I need to see all the data in a chart of the wave with the scales on each side, identification of pressure, temperature and flow. Finally, I need to write that data to a text file. TDMS is fine, but for now, I'm working with a CSV file.

    So far, I got my VI to read the data channel and the data on the scale correctly. I'm also writing to the file works properly. However, when I try to change the second channel, nothing happens or I get an error. Can someone help me on this? I have experience to come Monday to it so Im a little short of time. Ive fixed this Ive got so far (Ive got several versions of this VI trying to do this in various ways).

    With respect to the accuracy of the readings for channel 0, Ive been using a deadweight Tester and a manometer calibrated to see readings. So far, these are correct, and I was able to calibrate other gauges with this interface.

    Way easier and more foolproof that I found to do this is to set up several channels using an Express VI (DAQ assistant) and then made a right click on the object of block diagram and 'open the fron Panel '.  Click OK to the warning and you will be pressented with an example of a multi-channel configuration.

    As to the best way to get 90% it when learning DAQ configuration...

  • How to find a word in the name of channels?

    Hello

    I want to search for a word in a channel name

    For example, I have 3 channels:

    1 Re_treffensiemich

    2 Re_treffensiemich_ouipourquoipas

    3 Jaimele_pate

    I already have the first "Re_treffensiemich".

    I want to detect the "Re_treffensiemich_ouipourquoipas", its channel number (2) and also read the '_ouipourquoipas '.

    So I'm looking for something to find a portion of a string

    How can I do that?

    Thanks for help

    Fred

    Hi Fred

    I hope that the following script solves your problem. It compares all strings in all groups with a string.

    Dim oGroups, oOneGroup, oChannels, oOneChannel, sChnName, sSearchText
    sSearchText = "treffensiemich".
    Set oGroups = Data.Root.ChannelGroups
    For each oOneGroup in oGroups
    Set oChannels = oOneGroup.Channels
    For each oOneChannel in oChannels
    sChnName = oOneChannel.Properties ("name"). Value
    If InStr (1, sChnName, sSearchText, vbTextCompare in) > 0 Then
    ' Do something
    Call Msgbox (sChnName)
    End If
    Next
    Next

    Concerning

    Winfried

  • Reading single line of the text file

    I use the following code to read a .txt file

    private String readTextFile (String fName) {}
    String result = null;
    FileConnection fconn = null;
    DataInputStream is = null;
    try {}
    fconn = (FileConnection) Connector.open (fName, Connector.READ);
    is = fconn.openDataInputStream ();
    Byte [] = IOUtilities.streamToBytes (is) data;
    result = new String (data);
    } catch (IOException e) {}
    System.out.println (e.getMessage ());
    } {Finally
    try {}
    If (null! = is)

    is. Close();
    If (null! = fconn)
    fconn. Close();
    } catch (IOException e) {}
    System.out.println (e.getMessage ());
    }
    }
    return the result;
    }

    I want to print a single line instead of the file around so I read that I need to store the contents of the file into an array and then get the index of the line. Problem is that I couldn't find any information on how to do it. Can someone give me a shot. Thanks in advance.

    This isn't a problem with encoding. You just need to do a little extra accounting and adjust start and end indices to remove these characters. To treat the "\r\n" of line termination style, you can maintain a flag (initially false) to indicate that the previous line ended with a \r; If a line begins with \n, it should be treated as the end of a line (empty) if the flag is true (in which case it should be ignored).

    If you want to extract all lines (not just the first), then it may be easier to do this accounting while avoiding a separate function. Something like this (untested):

    // read the file into a byte array 'data'; then:
    Vector lines = new Vector();
    boolean endCR = false;
    int start = 0;
    for (i = start; i < data.length; ++i) {
      if (data[i] = 0xD) {
        lines.addElement(new String(data, start, i - start));
        endCR = true;
        start = i + 1;
      } else if (data[i] = 0xA) {
        if (endCR && i == start) {
          start++;
          endCR = false;
        } else {
          lines.addElement(new String(data, start, i - start));
          start = i + 1;
        }
        endCR = false;
      }
    }
    String[] results = new String[lines.size()];
    lines.copyInto(results);
    
  • How can I get the tabs to go on a single line and a menu of Firefox?

    Firefox allows to have 2 lines above - Firefox menu with tabs and more and another line of the navigation toolbar. during the installation of some programs online, Firefox now have 3 lines at the top, with the Firefox menu on an entire line, the 2nd line of tabs and 3rd line of navigation toolbar. How can I get the tabs to go on a single line and a menu of Firefox?

    With the current versions of Firefox, you can choose to use the menu of Firefox (orange in windows; gray Linux) button at the left end of the Windows title bar or bar menus familiar as in earlier versions. The Firefox button is displayed by default only in Windows Vista and Windows 7, but you can turn on or off or switch between the two or temporarily show the menu bar when the Firefox button is displayed.

    If you chose to use the Firefox button and you use the default tabs on top, the tab bar will move to the title bar with the Firefox button only when you are to maximize window (the ' square' the middle button in the upper right corner of the Windows standard application window). Other selected toolbars will be displayed below that (bar Navigation, Bookmarks Toolbar and the toolbars you add via Add - ons).

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You must update some plug-ins:

  • How to make a vectorized into a single line drawing open way?

    How to make a drawing line converted to outlines in a single open path? I can turn into a vector drawing, but making it a closed path. I ask because I want to control the strokes and the thickness of the line that I made myself. BTW, I know the drawing I posted would be in fact a closed path, but it is just one example. I want to control the race of vectored in general lines.

    Lalina_3.png


    Thanks to you all! The right answer was to use the "line drawing" preset in the 'Trace Image' dialog box.

  • How to change the background color of a single line

    Hi, OTN,.

    I use JDeveloper with ADF faces 11.1.1.2 in the view layer. My question is how to change the background color of a single line in af:table?.

    Hi idir Mitra
    You can use EL to bind column for example inlineStyle (#{row.id == null?' background-color: rgb (255,214,165);':'background-color:red'})})

    Cordially Abhilash.S

  • When you type an e-mail, when I go to the next line, it jumps two lines instead of a single line. How can I fix it?

    I was typing an email and when I would go to the next line, it will skip two lines instead of a single line. How can I fix the problem?

    I'm not sure that you understand the problem. Could include a screenshot of it just after what happens?

    If you need help to create a screenshot, please see How to make a screenshot of my problem?

    Once you have done so, attach the file to screen shot saved to your post on the forum by clicking on the button Browse... under the box to post your reply . This will help us to visualize the problem.

    Thank you!

  • How can I add a spell checker this spelling laurys for a single line?

    I want a spell checker that checks my spelling for just a single line. For example, Ebay feedback is only one line long then how I spell check my typed in response? Thank you.

    You can do this by changing a hidden preference

    1. Type of topic: config in the address bar and press on enter, accept the message of warning that is displayed and you will be taken to a list of preferences
    2. In the upper search box, type out, will you limit the results to a small number of preferences
    3. Double-click the layout.spellcheckDefault preference and change its value to 2, which will allow the spell on simple lines

    See http://kb.mozillazine.org/Layout.spellcheckDefault for more details about this preference

Maybe you are looking for