Determine which vi is executing at runtime and read its block diagram

I have a time-critical loop.  Within this loop, one of a set of
known VI's is chosen in a case statement.  Within each of those
VI's, data is decoded in a specific way.  I cannot modify these
VI's to make the information I need available, because it would
increase the amount of execution time of the tight loop.
What I need to do is write a new VI which will "read" the components of
the block diagram, so I can determine dynamically what code is being
run.  For example, if there are three blocks in the running VI
that extract an array element, I need to be able to determine the index
of the array elements being extracted.
I could re-encode all of this information in a new VI, but that would
generate a maintenance headache, because the decoding algorithms would
have to be kept identical for every incremental change.
Is it possible to "read" the contents of a VI from another VI without reverse-engineering the VI file binary format?

Actually, no.  I'm probably not being very clear.  I'm not
interested in looking at the values within the VI, I want to be able to
see what the VI is doing.  I don't want to see the result of
ExtractDataFromArray() (which I know is not a real function -- it was
just an example), that is, I DON'T want to see the values on a "wire"
during execution.
Rather, I want to know how many instances of a certain kind of sub-VI
are in a VI, I want to know how many instances of constants there are,
and which sub-VI's they are wired to.
I want to be able to find this information, essentially:
    In FOO.VI:
       bar.vi is called seven times, each time, the INPUT1 is wired to terminal 1,
        and for the 7 various instances, the values "1," "3," "12," "17," "23," "35," and "71" are wired to terminal 2.
In C-speak, I don't want to know the result of the calls to the imaginary function ExtractDataFromArray(),
rather, I want to know that it was called seven times, with the
arguments (&input1, 1), (&input1, 3), (&input1, 12), ...
And I don't care what was in &input1 when it was called, just THAT it was called.
Essentially, I want to be able to have one VI analyze another and determine what it does.

Similar Messages

  • How to execute some code in command line, and read its output?

    I'v found here http://www.sap-advisor.com/abap-coding/how-to-execute-operating-system-commands-from-within-sap/ that I can execute commands from the windows command line for example inside SAP.
    But I want to take it one step further and read its output. is it possible?

    Hi RagnaRock,
    one possible approach can be outputting the results of the command into a text file (i.e. "command >result.txt"), and then read this file from SAP/ABAP.
    I hope this helps. Kind regards,
    Alvaro

  • How do i delete my cell # from my daughters ipod touch?  I have changed the #'s in my apple id but it is still using the other cell # in their ipod touch for imessage which allows them to send recieve and read texts to that #.

    how do i delete my cell # from my daughters ipod touch?  I have changed the #'s in my apple id but it is still using the other cell # in their ipod touch for imessage which allows them to send recieve and read texts to that #.

    You can only uncheck the cell phone number. The only way to delete it is to use for FaceTime and Messages an Apple ID not associated with the iPhone.

  • How can I open a vi and show the block diagram?

    Hi,
    I am opening an vi using "Open VI Reference" and "Invoke Methodpen FP", but I want to open the vi and show the block diagram, but I haven´t found any method (Invoke Method) to do that and any property.
    Any idea?
    Thanks!
    Gracinda

    OK, I can come up with a reason.  I have written a program that will search the entire VI Hierarchy of a program and update all of the descriptions for all VIs with the top level program part #, the name of the top level program that the VI is used in, the company copyright info, the ITAR notice, company address, the name of the engineer performing the update, along with the date and time.  This will also place as a background image on all the VIs, a watermark of the company name, legality stuff and the copyright. It works very slick in that if there are thousands of sub-vis, such as what I'm working on now, it goes through all of them, makes sure the data is there as per company policy without having to open every one of them look at them and update or not whichever the case may be. The one portion that is tough is that the program will detect if there is a description written about what funtion the VI performs and if there is not a description, then it pops up a dialog requesting the user to write a description. The problem is that without looking at the block diagram for the VI, it can be nearly impossible to write a description for the functionality of the VI. So is there a way to programmatically open a VI, show its block diagram (this would only be in the case of a missing description) and then upon completion of the updates, close the block diagram? (I already open and close the VI programmatically in order to read the VI DESC and update as needed, but that is in the background and of course you can't see the block diagram).
    Thanks,
    Dan

  • LabVIEW MilliSecs support manager function and Tick Count block diagram object

    Is the output of the support manager function MilliSecs (used in a CIN) directly comparable with the time returned by the Tick Count (ms) block diagram object? i.e. if they have the same value then it is the 'same' time allowing for OS specific time resolution

    > Is the output of the support manager function MilliSecs (used in a
    > CIN) directly comparable with the time returned by the Tick Count (ms)
    > block diagram object? i.e. if they have the same value then it is the
    > 'same' time allowing for OS specific time resolution
    The LV diagram node is built upon the MilliSecs() function, which is
    built upon various OS specific functions. It is safe to treat them as
    though they are the same function and represent the same clock.
    Greg McKaskle

  • Accessing a file and reading its contents.

    Hi all,
    I created a Portal Application to access a file and display its contents in an iView .
    But it showing the exception like "File Not Found".
    In simple java application i could able to get the result. In portal application i couldn't .
    I have given the full path of the file location.
    I need a help regarding this?
    Regards,
    Eben

    IS the file on the portal server? It must be visible to the service user that runs the Java engine...

  • Print Problem : Print descriptio​n and tips from structures​, nodes and loops from block diagram

    Hello,
    I've just completed the entire documentation of my VI and I did describe some Case structures and Formula Nodes. Now I want to print the VI with the VI printer and when I select ''Description'' in the custom printer manager, it doesn't select the description from most functions in the block diagram such as Formula Node, Case Structure,etc. 
    Is there a way to get these descriptions in the printed version VI ?
    Thanks a lot !
    Solved!
    Go to Solution.

    Hi Weepet,
    After some investigation, it turns out that this behavior is expected behavior.  Please see the following help topic
    http://zone.ni.com/reference/en-XX/help/371361G-01​/lvhowto/creating_vi_and_object_de/
    Essentially, Context Help will only display the description for controls, indicators, and constants.  At the same time, the descriptions will only print if that description is available in context help.  LabVIEW primitives will always use the description from the documentation, and will not display your custom "Description and Tips".  So, for primitives like case structures and formula nodes, we cannot get that information to print. The behavior that you're seeing is expected.
    Perhaps you can just use comments to document these functions?  You can double click on a blank area of the block diagram and provide comments.
    Regards,
    Che T.
    Applications Engineer
    National Instruments

  • Client-side Memory leak while executing PL/SQL and reading from a view

    Iam noticing memory leaks in OCCI while performing the following:
    Sample function()
    1. Obtain a connection
    2. Create a statement to execute a PL/SQL procedure
    3 Execute the statement created in step #2
    4. Terminate the statement created in step #2
    5. Create a statement to read from a view which was populated
    by executing stored procedure in step #3
    6. Execute the statement created in step #5
    7. Terminate the statement created in step #5
    8. Release the connection
    The PL/SQL populates a view with fixed 65,000 records for every execution. PL/SQL opens a cursor, loads 65000 records and populates the target view and closes the cursor at the end. If i invoke the above function it results in memory leak of 4M for every call. I tried several variants such as:
    1. Disabling statement caching
    2. Using setSQL instead of newly creating second SQL statement
    3. Obtaining two separate connections for these two activities (PL/SQL exec and View read)
    4. Breaking the sample function into two, one for each of these activities (PL/SQL exec and View read).
    All the combinations results in the same behaviour of 4M memory leak.
    Iam using Oracle 10g Client/Server 10.2.0.1.0.
    Is there any known limitations in this area?

    Yes. Iam closing the result set and terminating the statement.
    My program contains layers of inhouse wrapper classes, which will take some time for
    me to present it in pure OCCI calls, to be posted here for your understanding.
    After some more debugging, i found that if the connection level statement caching is set to
    0, the memory leak is much lower than before.
    Thanks.
    Message was edited by:
    user498920

  • Runing an exec from class Runtime and redirecting its output ...?..?

    Hello!
    I am trying to run a C exec by using th eRuntime class.
    This works well ...
    But, I want to redirect its output to my transcript.
    This also works with small output (some lines !) ...
    But the out put is up to 3000 lines, my program does
    not continue. It is suspended in a waiting state.
    I suspected that the buffer is filled, but there is still some lines to be written ...?
    Anyone knows this problem and the solution ..?
    Thanks by advance
    Yaz

    You could try something like thisjava.util.List al = new ArrayList();
    try {
         Process p = Runtime.getRuntime().exec("cmd.exe /c dir");
         BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
         String s = "";
         while ((s=br.readLine()) != null) {
              al.add(s);
         ListIterator li = al.listIterator();
         while (li.hasNext()) {
              System.out.println(li.next());
    catch (IOException ioe) {}Mark

  • Execute linux command and  getting its output in java

    i want to run a simple command from java: telnet localhost 8649 > report.txt
    how can I do this.

    See java.lang.ProcessBuilder

  • SharePoint Databases - How to determine which ones are being used and which ones aren't

    I am not sure where to exactly post this question.  On the SQL Server side or on a SharePoint side.
    I am a SQL Server Database Administrator who is monitoring some SharePoint databases.  On a daily basis it seems that they are creating new databases but don't delete the databases that they are no longer using.  For example, they might be testing
    on a development server and if things aren't working properly instead of asking that the databases be deleted they just go ahead and create new databases to do what ever they need to do.  Is there a way on the SQL Server side to determine which SharePoint
    databases are being used and which ones aren't being used?  Or does one determine this information through the SharePoint Central Administration console?
    lcerni

    Hello,
    The following query gives you the databases now in use.
    SELECT
    DISTINCT d.name
    FROM
    sys.dm_tran_locks
    tl INNER
    JOIN sys.databases
    d
    ON
    tl.resource_database_id
    = d.database_id
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • What determines which NLS_LANG registry key is used?

    I have a vb application that uses the MSDAORA.1 OLEDB provider. I have the app and the Oracle 8i (8.1.7) driver client installed on two PC's. One PC the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG (AMERICA_AMERICA.WE8ISO8859P1) key is used and the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG key is ignored. I know because if I change the value to "NA" or something else the app chokes with error ORA-12705 (invalid or unknown NLS parameter . . .). On the second PC the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG key is used, and the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG is ignored. The Oracle client was installed a little differently on the two PC's one from the CD, and another from an MSI package that contains the Oracle client install. Both PC's only have one home which is HOME0. Both PC's have the same directory names and structures for the Oracle client. I compared the registry settings between the two PC's are they are essentially identical. Where is it determined which NLS_LANG key is used? And what is the purpose of the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG key as opposed to the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG key? Thanks, Brian Grear

    see if this helps: http://www.uwgb.edu/compserv/ehelp/macos/Excel_Shortcuts_Mac.pdf

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • Is there any Way to find Which case is Executing in LabVIEW VI programmat​ically and Display it..

    Is there any Way to find Which case is Executing in LabVIEW VI programmatically and Display it..
    Solved!
    Go to Solution.

    I wrote this a few years ago: http://lavag.org/files/file/199-state-machine-foll​ower/
    This JKI RCF Plugin sets the Visible Frame property of a Case Structure while the owning VI is running. Use it to follow the execution through the cases in your string-based State Machine/Sequencer when Execution Highlighting isn't fast enough (and, it's never fast enough).
    The use-case I wrote this to improve is setting a Breakpoint on the Error wire coming out of the main Case Structure and probing the Case Selector terminal so I can float-probe wires during execution. The problem with this is that I had to manually select the current frame every time. This is boring, so I developed this plugin to automatically set the Visible Frame to the case most recently executed.
    You might be able to adapt it to your needs.  The basic idea is that a custom probe on the wire to the Case structure's selection terminal sends a notification to a VI that displays the appropriate case.
    We might be able to help you develop something easier if you'll give us more information.  Is it OK if the code to display the case is in the same VI?
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • "We want to use any one of a variety of digitizers: NI5102, NI5112, NI5122 and have the application determine which one is installed.

    "We want to use any one of a variety of digitizers: NI5102, NI5112, NI5122 and have the application determine which one is installed. Similar to the LabVIEW "niScope Init", using what Measurement Studio .NET call can one ascertain the model name of the digitizer using C# in .NET?

    Sorry, meant to post to "high speed digitizers".

Maybe you are looking for