Looking through channels and create a chain of search values

Hello

I am trying to generate a script that allow me to serch throug a channel and compare the values of a number and create another channel with these instances

Let me expand

I have the following test data in a PDM file with a name of group 'Monthly data' and a channel name of "month 2"»

Time value

1 18000

2 45100

3 59800

4 35500

What I want to do is to compare these values to a set of values and record when this value occurred in a channel.

For eample I am looking for all values greater than 36000 and 50000

So I would end up with a new channel that would containm the following text

2 45100

3 59800

I know I need to create a table of values that would take the data comparison

CtrlVals = Array ("", 45000-50000)

and a channel to store the found values and assign a default value

IF GroupIndexGet ("stored value") > 0 THEN

groupIndex = GroupIndexGet ("stored value")

GroupDel (groupIndex)

END IF

Call Autonomecreer ("stored value")

groupIndex = GroupIndexGet ("stored value")

CallGroupDefaultSet (GroupIndex)

And I have to create the channel in that I want to store the data

ChArray = ChnAlloc ("Instances", iMax): ChnLength (ChArray (0)) = iMax: CtrlEdgeChX = ChArray (0)

I guess I'm not sure how to insert data found in the created channel.

I use DIAdem 2011

Hello SmoothDurban,

The variable you are looking for is (it would be for the channel of 'Time' in Group 1...

Data.Root.ChannelGroups (1). Channels ("Time"). Properties ("length"). Value

You can find the name of a property in DIAdem by dragging in the DataPortal script editor.

In the above example I have simple glide the maximum property from the data portal to the Panel SCRIPT, the end resulty is the full name of the property with channel and group of references...

Hope that helps,

Otmar

Tags: NI Software

Similar Questions

  • Help! My files sent for two whole months are missing! I have looked everywhere and looked through the forum topics, without success.

    At the beginning of a new month, Thunderbird normally creates a sent folder for the previous month, as in "Feel-Apr-2014." All my emails in the last two months are - missing files for March and April 2014. I looked through all my records, to see if they went to the wrong place. I also tried searching for individual emails by name, to see if they are elsewhere, but there is a gap of two months with no emails showing up during this time. I checked my master settings, to make sure that nothing is set to automatically delete. This is very serious. I'll have to stop using Thunderbird, I used for four years, if I can't solve this problem, because I can not afford to continue to lose huge chunks of important emails.

    Thank you. Your account appears to be IMAP, that is, all mail is handled on the server.

    Can connect you to your account via webmail and check if the mail is missing on the server?

    At the beginning of a new month, Thunderbird normally creates a sent folder for the previous month, as in "Feel-Apr-2014."

    Is it possible that this is done by the server?

    Of after troubleshooting - profile directory - Open Directory information

    Your profile folder opens in Windows Explorer. Under ImapMail, look for a folder with your domain name in the name of the folder, i.e. something like mail. [sitename] .com. What are records under?

    Maybe you can post a screenshot.

    http://support.Mozilla.org/en-us/KB/how-do-i-create-screenshot-my-problem

  • I was looking through my e-mails and I deleted an email and they're all gone, what happened?

    I was looking through my e-mails and I deleted an email and they're all gone. That's happened? It says my Inbox is empty and I had more than 200 messages in less than a minute. There are a few important emails that I kept in it.

    http://KB.mozillazine.org/Disappearing_mail

  • When we look through the Explorer of windows folders automatically closes and restarts.

    Hello

    a year ago I started having problems with searching through my files because windows Explorer kept crashing whenever I used it to browse my files. It started after I removed some games and other stuffs manually to my computer because they were not on the list of installed programs.

    Since I had this problem, but I've never even bothered to fix, because I don't use my work for school.

    I'm going to College next year and my laptop, it needs to be fully operational ESPECIALY with the navigation and management of my files.

    I was looking through the forum for a while and tried a few suggested corrections.

    Well, I gues now you can say that they did not work.

    In any case, one of the forum administrators suggested to ' sfc/scannow' in the command prompt.

    I did this and found that there are some corrupted files that cannot be repaired.

    I guess the best thing I could do right now is just after the newspaper here and hope someone can help me.

    Seemably, I can't open the CBS.log newspaper... Access denied-I am administrator on my laptop...

    If someone could help me with this so I can post the log here...

    Good reinstall it sure to be a good solution, but it will be a little more work on you because you will have to download and install all your favorite again by Web sites or CD programs, they came.

    But that does not mean it is a bad choice: you will have a fresh new PC that has no persistent problems or stuff it slows down.

    If you want to go this route, you will need to know if your computer is equipped with a factory reset CD disc, or perhaps it was integrated.  Most newer computers have it integrated where you just reboot and press a special key (usually F2 or del but it could be anything) and it will do a factory reset for you.

  • The selected file cannot be linked because there 6 audio channels, and the clip was created with 2

    I tried to link the MTS files to a project that I have edited with AVI files. I got the message "the selected file cannot be bound because it has 6 audio channels and clip was created with channel 2/channel" audio. Does anyone know what I need to do?

    I had this problem and the cause in my case, it was that I changed all my clips in the project are mono audio channels. When I tried to swap the originals with proxies, I did, I had a similar message for the clips that have been affected by the designation of channels. I opened the project and selected all my media items in the project window and changed all the audio back to 'use the file' and that did the trick for me.

  • Find channels and cDAQ modules

    I have looked around the previous messages, but can't seem to find what I'm looking for.

    In most of my experience, I've implemented some DAQ and once the modules and channels are all in place, which is where they stay forever.

    Since I know things will not move, I create tasks in DAQmx.

    I'm working currently on a new installation program, but the problem is that in things cDAQ will not be in the same place every time.

    The application must read a number of strain gauges, which will be connected to the NI 9235 modules.

    It will take place anywhere from 1 to 3 modules attached, and they can be in one of the 8 available cDAQ chassis slots 9172.

    In addition, within a given module, anywhere from 1 to 8 channels will be connected.

    So basically, I guess my questions are running:

    (1) how many modules are connected and where?

    (2) in each module, the number of channels is turned on and how much is empty.

    From there on, I use DAQmx palette to take care of things.

    Thank you!

    So with every new start of the program, you will have a known device (your strain gauge device), but unknown channels. Here's how I attacked only a few years ago...

    • DAQmx create a task to create a job.

    • Make a constant table of all known possible channels. Say that it is 8 cells and compare that to an array of channels USED, making false tracks off the chains 'Unused' and the names of real channel out of used ones. Under certain conditions to check which ones which is used to remove the appropriate channel and add the DAQmx virtual channels properly. The VI snapshot below goes into the details. I brought not only the channels, channels, such as min/max properties and bridge information. My VI also made bridge removal, under certain conditions, depending on sensor that the user wanted to null (that part is not shown.)

    This code isn't super sleek, but I hope this gives you the ideas come from.

  • Is anyway to convert massive amount of PDF files in word document without having to go through each and one of them

    Adobe PDF does wonderful job when it comes to convert the PDF file to Word document. However, I would like to know if there is anyway to convert my many PDF files in Word without having to go through each and of them clicking me and confirming questions for the conversion? For example, there is an option to convert many files in PDF format simply by checking a box to indicate the ones I want to be converted. However, I don't see this option when it comes to convert a PDF to Word format. I need to go through them each and individual verification of various things such as folders to destination. It would really save me some time because I wouldn't need to sit in front of my laptop, manually by clicking more.

    Hi chaconne1003,

    You can do this by creating an action ExportPDF in Acrobat, however, acrobat would encourage it several times in the process, usually for the location of the file that results, the file format resulting, then it really isn't an automated process.

    However, if you have a subscription to the service online pdf export, all you need to do is select all the files at once which are to be converted, set the option of conversion to Microsoft Word and then you can sit back and look at the files being downloaded and automatically converted.

    Once all the file conversion is complete, you will be prompted to download the converted files. However, it can also be tedious process if the size of the file being downloaded pdf is large or you are on a slow network.

    I hope this helps.

    Kind regards

    Rahul

  • Match entries in an array to another array and create a new table.

    I tried for a while to do what should be a simple operation.  I have some of my code work exectpt for this part, which is similar to the post below.

    http://forums.NI.com/T5/LabVIEW/pulling-out-values-from-a-1d-array-based-on-look-up-table/m-p/404524

    However I try to match the first two columns in table 1 to those in table 2 and create table 3.

    Please can someone help?  I'm in a time crunch.  Thanks in advance.

    Same idea, another implementation using variants to perform the search.

  • Excel & ActiveX: Insert arbitrary columns of 2D array and create problems of graph

    Hello

    I want to insert data in a 2D of LabView or 1 d table in Excel and create graphics.

    I used the information in the following example:

    http://www.NI.com/example/28934/en/

    and has managed to create a new Excel file (I use Excel 2010) writes data in a 1 d table to a column in excellent by creating a while loop and using the first element of the array to write in a specific cell. I use the loop counter to write to the next cell when the loop starts again and always remove the first value, I write to the cell of the table until it is empty.

    Now I also want to write a 2D - column in Excel table should be the first column of the matrix and so. Here, I can not use the loop counter directly as Excel there are only 1,2,... for the lines, but uses A, B,... to count columns. Also I do not know in advance the number of columns my 2D array will contain, thus creating a lookup table as (A means 1, 2 B, which means...) is not really an option (except there is really no other way). Is there a possibility to convert numbers into letters or somehow to "explain" to the program that this column 2 of the table means column B in Excel for example, or is it possible to insert new columns?

    I figured out how to add new calculation sheets and as I also need to create a certain number of spreadsheets and I know that the standards 3 sheets are present during the creation of the file, I use the method 'Add' to create new worksheets before the worksheet 3 - I could use the same method to create new columns in Excel , but so far I have not found a method to do. Or is there a way to enter into the 2D table all at once?

    So I want to create a chart (in case 1 d tables draw a bar when using 2D arrays a 3D field) to display the data. I found this example:

    http://www.NI.com/newsletter/51339/en/

    -> that I do not have the tool box I would do it directly using ActiveX, so I tried to make things as shown under the title "ActiveX DIY /.» NET'

    I tried to load the code snippet into a new Excel file but got the error message "microsoft.office.interop.excel.dll" not found and this is why the code does not work. Which confuses me a bit as I guess when this dll is not present I can not access Excel of LabView at all, although my understanding of what I'm doing so far is limited in the calm. ;-)

    Also - as far as I understand the extract - when you create a new graphic object, I should be able methods to create for her, however when I do a right click on the graphic object to a symbol of the spreadsheet ActiveX it no listed.

    To explain my problems better, I added an excerpt showing my two problems: the inside of the two loops while showing how to import a table 1 d. In the outer loop I separate the columns. I know that is not currently as has all the data in the column of the Excel sheet - so I need to convert the external meter number a, B,... or find another solution.

    In addition, on extract, I placed a property ActiveX spreadsheet with the Chart object - I can see that the difference to the graphics object of the example code of the last link above is the color. However I do not know what it means and how to change / fix this.

    And just to make sure - I know that this path that the VI is not running as the graphical object is placed completely false – I just did, so it is included in the extract.

    I would be grateful for any suggestion,

    Thank you!

    Hi all

    for your information in professional 2014 LabVIEW report generation toolkit is included

    Table 2D

    I want to write table 2D in specific columns/rows in excel

    Graph

    Create a graph through ActiveX Labview traced XY scatter on an excel sheet

    also good information about Excel and ActiveX

    Excel Council

    Hope that if aid, if not please let me know.

  • I'm having a problem reinstalling Windows XP. After formatting the disk and create partitions, it will not complete the installation.

    Problem reinstalling Windows XP

    I'm having a problem reinstalling Windows XP.  After formatting the disk and create partitions, it will not complete the installation.  He goes back and reinstall Windows again.  I go through the installation of 39 minutes, the computer restarts to complete and it loops back and start the installation again. Why it does this and what I can do to move beyond this?

    Go into the BIOS and make sure that you your hard drive is not set to off, and that is the first priority boot CD and your second HD.

    Don't push when it restarts anything just to let him do what he does and report back if anything I'm sorry I have no idea.

  • Whenever I go through updates and installation of Windows 10, he returned to start

    * Original title: upgrade

    Whenever I go through updates and installing windows 10... He returned at the beginning...

    Review:

    Retry the upgrade manually:

    Option 1:

    Download the media creation tool

    Click with the right button on the MediaCreationTool.exe file and then click on run as administrator.

    Note: How to check if you are downloaded or installed the update Windows 10 November

    How to create an ISO or USB drive.

    Select upgrade this PC now and then click Next

    Option 2:

    Task of pre-required

    When you make significant changes to your computer for example updated operating system, you must always back up. See the links to resources on the backup by clicking the link for each version of Windows you are using: Windows XP, Windows Vista, Windows 7, Windows 8/8.1

    then

    then

    • Turn off (preferably uninstall) your Antivirus utility before you perform the upgrade.
    • Reboot several times, and then try again.
    • Disable the general USB peripherals (for example - smart card reader).
    • If you are using a SCSI drive, make sure you have the drivers available for your storage on a thumdrive device and it is connected. During the installation of Windows 10, click on the advanced custom Option and use the command load driver to load the driver for the SCSI drive. If this does not work and the installer still fails, consider switching to an IDE based hard drive.
    • Perform a clean boot, restart, and then try again.
    • If you upgrade to the. ISO file, disconnect from the Internet during the installation, if you are connected in LAN (Ethernet) or wireless, disable both, then try to install.
    • If you are updated through Windows Update, when download reaches 100% disconnect from the LAN (Ethernet) Internet or Wi - Fi, then proceed with the installation.
    • If this does not work, try using the. ISO file to upgrade if possible.
    • If you are connected to a domain, go to a local account.
    • If you have an external equipment, attached to the machine, unplug them (example, game controllers, USB sticks, external hard drive, printers, peripherals not essential).
  • I bought the PC Version of Fable III of this year early and installed and created an account with games for windows Live!

    I bought the PC Version of Fable III of this year early and installed and created an account with games for windows Live! About 2 months ago, I formatted my computer and reloaded windows 7! Last night I downloaded Microsoft Flight and used my existing account to play! Today, I installed Fable III and the game won't start as it says that I am not connected to the internet! This is wrong since I write here for you! Why my game will not, organize that I have connected to my account last night with problem now? Please help me?

    Yes, unfortunately GFWL's an imperfect system. Steam has similar problems. I find the best way to avoid
    problems is to play all the games that are related to a system off line.
    I have absolutely no interest in what GFWL can offer online, in any case.
    Many games have a "fix" for GFWL, which are generally easy to find through a search.
    Of course these only help facilitate offside line.

    Try Timeslips Fable 3 GFWL remover - it is well known in the modding community, particularly
    its managers mod for Bethesda games and his job is safe to use.

    http://Timeslip.users.sourceforge.NET/

    .

  • Downloaded a few movies through vuze and KAT, when I play the there is no sound, but I will if I stream movies online.

    movies with no sound? Windows Media Player

    Downloaded a few movies through vuze and KAT, when I play the there is no sound, but if I stream movies online, I hear, all the music that I downloaded works. After the first movie, I thought that maybe there was a separate audio file, but all the movies have no sound.

    Maybe you need an AC3 Filter:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    AC3 Filter
    http://AC3Filter.NET/wiki/projects/AC3Filter/releases
    (do scroll downloads... try - AC3Filter 1.63 full b)

  • Ability lost access administrator account and create files (using Windows 7)

    Running windows 7, administrator account has disappeared and cannot access (it is listed as a user with permissions (mine has changed and he's been a user listed as S-1-5-21-3964978265-1859684145-9075597-1000 and finally managed to remove it (I think)) and the ability to create folders, or by clicking right in applications.)

    Clicked on what I thought, it was a reliable site, the message says that I had to update Flash to enter the site, after a large number of ads downloaded and changed my browser; I just uninstalled from this time, installed backup of the previous day and blocked unwanted applications through my Norton.

    I don't know if there is something else that is affected.  How can I fix it, my level of knowledge is limited on what I should and should not on my system.
    You can probably fix your problem by using the system restore. Here's how it works:
    1. keep tapping F8 during the first phase of startup.
    2. select Repair from the menu.
    3. Select an administrator account, and then enter its password.
    4. When you are prompted, select System Restore.
    5. set Windows to a point before this problem occurred.
    6. plan in advance and create, test and document a spare, even admin account that you have a spare House key.
  • With the help of several classes and create an object of a class and calling its method in a different class.

    Creating a new class, I need to move my main method class SaveDate DynamicTest class. Below I've listed the code of both classes. The goal is to be able to run my class DynamicTest program. I need help to understand the process of moving my main method of a different class and creating an object of a class and calling its method.

    public class {SaveData

    private public static final map < String, Object > myCachedTreeMap = new TreeMap < String, Object > ();

    public static final List < String > getLines (final String resourceParam, final Charset charset) throws IOException {}

    System.out.println ("please:" + resourceParam);

    If {(myCachedTreeMap.containsKey (resourceParam))

    Use the file cached, to avoid a further reading.

    System.out.println ("found in memory:" + resourceParam);

    }

    else {}

    Load the file from the disk

    System.out.println ("found in memory:" + resourceParam);

    }

    Returns a null value.

    }

    Public Shared Sub main (String [] args) throws IOException {}

    String target_dir = "C:\\myfiles\\config\\en";

    Line = "C:\\myfiles\\config\\en\\output.txt";

    File dir = new File (target_dir);

    File files [] = dir.listFiles ();

    If (file == null: files.length < 1) {}

    System.out.println ("file list is empty...");

    return;

    }

    Open the Printwriter

    PrintWriter OutputStream = new PrintWriter (output);

    try {}

    for (textFile file: files) {}

    If (textFile.isFile () & & textFile.getName () .endsWith (".txt")) {}

    readFromDisk (textFile);

    }

    }

    }

    {Finally

    outputStream.close ();

    }

    String fileNameFromCache = "en_synonyms.txt";

    Sheet1 = myCachedTreeMap.get (fileNameFromCache) object;

    System.out.println (fileNameFromCache + ": \n" + "Sheet1");

    }

    @SuppressWarnings ("resource")

    private static Sub readFromDisk(File textFile) throws FileNotFoundException, IOException {}

    BufferedReader InputStream;

    inputStream = null;

    String content = "";

    try {}

    inputStream = new BufferedReader (new FileReader (textFile));

    content = readFile (textFile);

    System.out.println ("bytes read =" + content.length ());

    Save the content

    FileContentsObject Sheet1 = new FileContentsObject (System.currentTimeMillis (),

    textFile.lastModified (), content,

    textFile.getName (),

    getLines (null, null));

    Add to the map

    myCachedTreeMap.put (textFile.getName (), Sheet1);

    }

    {Finally

    If (inputStream! = null) {}

    inputStream.close ();

    }

    }

    }

    private static String readFile(File f) throws FileNotFoundException, IOException, UnsupportedEncodingException {}

    Text of StringBuilder = new StringBuilder (1024);

    read int, N = 1024 * 1024;

    char [] buffer = new char [N];

    BufferedReader br = null;

    try {}

    BR = new BufferedReader)

    (new) InputStreamReader

    (new FileInputStream (f), 'UTF8'));

    While (true) {}

    read = br.read (buffer, 0, N);

    If (read > 0)

    Text.Append (new String (buffer, 0, read));

    if(Read < N) {}

    break;

    }

    }

    }

    {Finally

    If (br! = null)

    Br. Close();

    }

    Return text.toString ();

    }

    private static final class FileContentsObject {}

    private long cachedTime; currentTime

    private long lastModifiedTimestamp;

    private string content

    List < String > lines;

    private String fileName;

    public FileContentsObject (long cachedTime, long lastModifiedTimestamp,

    Content string, String fileName, List < String > lines) {}

    this.cachedTime = cachedTime;

    this.lastModifiedTimestamp = lastModifiedTimestamp;

    This.contents = content;

    this.fileName = filename;

    This.Lines = lines;

    SimpleDateFormat sdf = new SimpleDateFormat ("MM/dd/yy hh: mm :"); ")

    System.out.println ("time & Date:" + sdf.format (cachedTime));

    System.out.println ("' last modification timestamp:" ")

    + sdf.format (lastModifiedTimestamp));

    }

    /**

    *

    * @return the lines of the file

    */

    List < String > getLines() {}

    Return this.lines;

    }

    public String toString() {}

    "return"Sheet1 {}"+" fileName =' ' + filename + '------"+", content = "" "

    + content + "\"+ ", lastModifiedTimestamp ="

    + lastModifiedTimestamp + ', CurrentTime & Date ='

    {+ cachedTime + '}';

    }

    }

    }

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

    public class DynamicTest {}

    Public Shared Sub main (String [] args) {}

    Game characters charset = Charset.forName("UTF-8");

    try {}

    List < String > = CacheData.getLines lines ("en_synonyms", character set);

    If (rows! = null) {}

    System.out.println ("number of rows:" + lines.size ());

    for {(String ligne: lines)}

    System.out.println ("DynamicTest:" + line);

    }

    }

    } catch (IOException e) {}

    e.printStackTrace ();

    }

    try {}

    List < String > = CacheData.getLines lines ("en_stopwords", character set);

    If (rows! = null) {}

    System.out.println ("number of rows:" + lines.size ());

    for {(String ligne: lines)}

    System.out.println ("DynamicTest:" + line);

    }

    }

    } catch (IOException e) {}

    e.printStackTrace ();

    }

    }

    }

    I have read and watched videos about the creation of an object of a class and calling its method in a different class. I'm still confused on how to do it properly. By using the code below if someone can explain how to properly call the method of objects from my hand.

    Huh? You have NOT posted any 'hand' or any 'method of objects '.

    If you need help with the code, you need to view the code.

    The Java tutorials has dozens of trails "Classes and objects": what they are, how to create and how to use them.

    https://docs.Oracle.com/javase/tutorial/Java/javaOO/classes.html

    1. create an instance of a class

    2. call to one or more of the public methods of this class

    If the class has public static methods, you don't need to create an instance first.

    I suggest that you work your way through these tutorials. They include the WORKING example code.

Maybe you are looking for

  • Cannot install iTunes 12.4 (any version)

    I have iTunes installed 12.3.2.35 on my computer (running Windows 7). This computer has all the updates of Windows installed. When I tried to upgrade to iTunes 12.4 (none of the iterations and even after you uninstall iTunes 12.3.2.35), I get the fol

  • Apple TV 4 Siri stops working

    My new Apple TV was working fine until about a month in and all of a sudden I find that my Siri stops responding intermittently. I press and hold down the button and order and I can see it my voice, but not obey or responds that he is just there wait

  • 2430-101 stops at Toshiba-Logo (BIOS Setup/Boot-selection products deadloop)

    Hello. I have a serious problem with my Satellite 2430 101: The system stops at the start after reaching the TOSHIBA Logo. Pressing F2/F12-key appears common waiting messages ("enter in BIOS-Setup" / "entering Boot Device selection Menu) "), but the

  • iPhone is full of photos, but no way to access

    The memory on my iPhone is full, so I try to move my pictures and my videos to my PC. However, the iPhone does display a few pictures - certainly not enough to fill the unit. The PC shows no pictures at all on the iPhone. I tried on several PC. On co

  • I'm being prevented from writing to a file text saved on my desktop. Why?

    I use the administrator account. A day or two before, I tried to save a text file on the desktop. The system says that I don't have the necessary privileges to modify files in this network location. So, I guess it's a network problem. I use the singl