Display sink and source of wire on block diagram

A colleague is trying to decipher some LV code we received from a third party, and if ever a block diagram illustrated the term "spaghetti-code" this does. I showed him how the wiring tool will display the name of the source of a wire in the help window, when you hover the tool over the wire in question. He asked if there was a way to display both the source and the sink (yes the code really is that bad). Any ideas?
Oh, I should mention that he really doesn't want to rewrite or modify the code in any way, just understand it.
Thanks.

Hmm.  If you can I dont know of one.  I'm a cheap engineer though and dont like extra window clutter if I can avoid it.  When I am (usually) faced with spaghetti-code and need to trace things I just tripple click on wires to highlight the whole thing and scroll the window around to find the starting and ending points...
Attachments:
Spaghetti.jpg ‏22 KB

Similar Messages

  • NI Sinks and Sources library in Simulink

    Hi!
    I need the 'NI Sinks and Sources' library in Simulink, but I don´t know how obtain it.
    I have 'NI SIT Block' library but I don´t have 'NI Sinks and Sources' library.
    How I can get it?
    Thanks for all!
    Igor García

    Did you ever figure out how to solve this?  I am having the same issue.  Put the block in simulink for xpc with a scope, but no signal is showing.  I tested the D/A functionality of the card, and it is fine.  I am also using the 6052E.

  • Sink and source error

    in the vibration analysis.vi example(lv 8.2)... how can i take the power density output so that i can compare it with a threshold using a boolean compare operator? wen i tried it, i got an error saying the source and sink don't match.
    thnx
    DiPS  

    Hello DiPS. 
    Thank you for posting to the NI Discussion Forums. 
    The error that you are getting seems to indicate that incompatible data types are being wired to each other.  For example, if you wire a string to an input that expects a number or a boolean value, you will get this error.  The output of the power density, as I understand it, is a 1D array of doubles.  So, as long as you are comparing it to a compatible data type (an integer, double, some type of number), you should be just fine.  In fact, if you were to wire a 1D array of doubles to one input on a 'Greater?' VI and a single numeric to the other input on the 'Greater?' VI, LabVIEW will automatically coerce the single numeric to be a 1D array of numerics of equal length to the first input. 
    Thus, I think I need more information about the error that you are seeing.  After the error saying the source and sink don't match, it should describe the type of the sinc and the type of the source.  Can you please post this information?  Also, a screenshot of the code that you are trying to execute would be very helpful.  Let us know because we would love to help you.
    Have a great day!
    Brian F
    Applications Engineer
    National Instruments

  • Cut and paste from one block diagram to another?

    Is it possible to cut objects from the block diagram of one vi and paste them into the block diagram of another vi?
    Also, is it possible to "comment out" parts of a block diagram like you can in a text based program? That is, can you disable "code" on a block diagram without removing it from the diagram entirely?

    querty999 wrote: 
    As for training, I've got diploma's in Core 1 and Core 2 LabVIEW. I've worked numerous examples independently and read large part of several books. I'm living proof that LabVIEW ain't for dummies."Pictures and wires" programming doesn't click for me. Too many details to memorize.
    CVI is much easier to me than LabVIEW, maybe since I've been programming extensively in C for 20 years. But boss says we gotta use LabVIEW. It's the politically correct thing to do.
    Lots of LabVIEW advocates in management here. Few have done anything of significance with it. Some use Signal Express and call it LabVIEW. I guess they're technically correct. SE says LabVIEW on the splash page.
    You may be interested in this discussion: http://forums.ni.com/t5/BreakPoint/LabView-vs-LabWindows-CVI/td-p/400121

  • Is it possible to build exe with vis that have striped block diagrams?

    We can tell that an entity has stolen our code and are using them in their .exe file.  
    We used to distribute our program as a light exe layer that dynamically loads some source code distribution vis (block diagram striped) off disk and runs them.
    What we don't know is whether they actually got our in house source code, or if they are somehow taking the distributed vi's and compiling them into their exe.  
    So the question is: Is it possible to take vis compiled for a 'source distribution' with the block diagrams removed (but front panels not removed) and compile them into an executable?

    It's actually quite possible to use a source distribution VI for a new app. You need to select the "Do not disconnect type definitions or remove unreferenced
    members" option in the "Additional Exclusions" page.
    I've attached an example on how this can be done. Untitled Project 1 would be your project, which has a build target of your app, along with the source distribution for a VI with the block diagram stripped. Untitled Project 2 would be your competitor's project, which is a VI that uses your subVI directly and builds a separate application. As you can see, I can successfully build an application using your code.
    Attachments:
    source dist ex.zip ‏76 KB

  • Cannot open block diagram

    I opened a VI I recently created and when I try to open the block diagram its greyed out. doing Ctrl I and selecting Protection shows file as Locked(no password) and all options to unlock are greyed out. Any ideas how I can sort this out?

    You appear to have done everything right.  I doubt that being on the network would be a culprit. 
    You've probably mapped the drive, right?
    Did you even save it with the Locked property?  
    I am wondering if someone else had access to one of your PC's and played a trick on you.
    I tried a test VI and I can open the block diagram.  See image below (composite of 2 images)
    Message Edited by Ray.R on 11-20-2009 10:31 AM
    Attachments:
    locked.PNG ‏37 KB

  • Automatic resizing of controls on block diagram

    Hi,
    I have control as strict type def and many instances (on block diagram) of this control in several VIs. When I add new element in this control all instances resizes to maximum size and that corrupt layout on block diagram because all structures resizes with that instances. Is there a way to avoid that?
    Thanks, andrej

    Place it on the front panel of a subVI as an output. Then call that subVI whenever you want the typedef.
    You can find more on using typedefs here.
    Try to take over the world!

  • Block Diagram Changes from one computer to another.

    When programming in LabVIEW, I generally try to make my block diagrams as neat and orderly as possible. This gives the code a more professional look, as well as making it easier for someone else to quickly understand the program. However, I recently have started doing programming on more than one computer, and have found that my block diagram does not look the same from one computer to another (due to different monitor resolutions). Because of this, the nice, orderly block diagram that I made on one computer looks a bit jumbled on another. Is there any way to fix this, short of standardizing the monitor resolutions on every computer?

    One problem you might encounter is how the application font is rendered on different machines. All text-based diagram nodes (labels, property nodes, globals, locals,...) are affected (grow/shrink) if the font is not the same.
    LabVIEW, C'est LabVIEW

  • Why does my block diagram change when I copy my code to another system?

    I am doing development work on a laptop on Win XP and using LabVIEW 2009 with service pack 1. When I copy the code to the target system, my block diagrams are changed and no longer fit the screen. Much of the code is spread out, mainly down. The target system is running Windows 7 and also has LabVIEW 2009, SP 1.
    I notice that any constants that are clusters are expanded when copying the code to the other system. I've gone in and turned off the autosizing for these clusters but they are still expanded. I like to shrink them to a small size for saving space.
    I've gone through and manually re-adjusted the block diagram on the target system, but when I copy it back to my development laptop, the same thing happens again. This is not an acceptable way to develop code and it has caused a real problem to proceed. I'm contracting this work and must develop this code offsite. Can anyone please help me with this? I can't keep restructuring my block diagrams every time I copy the code from one system to the other.

    Windows XP used Tahoma size 8 as its basic system font.  When MS came up with Vista, they changed it to Segoe size 9.  I'm not sure what Win 7 is, but I think it is the same as Vista.  That font change, and certainly font size change seems to be the underlying cause for block diagrams changing their appearance.  (And for front panel controls and labels as well.)
    LV seems to use the Windows system font as its default font.  Interestingly, it seems like the font sizes in LV are something like size 12, 13, 14, 15.  I think a size 9 is equivalent to a size 15, but I'm not sure about the comparisons.  (Check out this thread.)
    There are a few things you can do to try to make one system look more like the other.
    1.  Go into the Windows screen settings. In Vista, right click desktop, Personalize.  Window color and appearance.  Open classic appearance properties.  Try changing the color scheme from Windows Aero, to something like Windows Classic or Windows standard.  They both use Tahoma 8.
    2.  Or same as Step 1, but go further into Advanced button.  Pick on any option that uses font such as Menu, Message Box, Active or Inactive Title Bar and change the font there.  I'm not sure which of the items that has a font setting is the key one.
    3.  LV uses 3 fonts called Application, System, and Dialog.  I think each of those map to one of those Windows options, but I'm not sure which goes to which.
    4.  In LV, Tools/Options/Environment has a subsection called Fonts.   Those 3 basic LV fonts are selectable there.  There is also a checkbox for me which is checked and says to use default.  If you uncheck that checkbox, a Font Style button becomes enabled.  You go in there and you can choose fonts and sizes.  And the Application, System, and Dialog fonts as well as all the usual fonts names (Arial, MS Sans Serif, Greek, ....) are selectable along with fonts sizes.  Play around in there.  The whole section is very confusing, and I have no idea how it works.  I recommend going to this idea A better way to specify (default) fonts and putting in a vote.   Also this idea, Fix font behavior between windows versions, platforms & executables, deserves some love.
    5. Some of these settings can also show up in your LabVIEW.ini file.
    FPFont = "0" 15
    BDFont = "0" 13  (I think the "0" means app font, "1" means system font, and "2" means dialog font)
    Also,
    appFont="Tahoma" 13
    systemFont="Tahoma" 13
    dialogFont="Tahoma" 13
    (And if necessary, put these in your built application's .ini file)
    As you can see, there are a lot of different things going on and they also seem to conflict with each other.  I starting stumbling on the block diagram issue between working on my app on XP at work and on my Vista machine at home about 6 months ago.  I think my problem actually started with the front panel when I was trying to align labels, and use some arrow head decals on boolean buttons.  I think I did the customization of buttons in a couple different ways (because I did some, came back later to do others, and couldn't remember exactly how I did it.)  As a result some decals looked different than others when I changed machines.  And I swear going from XP to Vista, or Vista to XP the problem got both worse ways rather than let's say larger one way, and smaller the other way.
    Replying to your message is about as much to me trying to combine all the pieces of knowledge I've stumbled across over the past months and year as it is for trying to help you.  Hopefully, this information gives you some places you can look at and play with.  (I bet #1, would be a quick, easy way to solve your immediate problem, but I haven't really tried it myself to be sure.)
    I hope someone from NI who has a better understanding than me about these font issues could jump in and correct any mistakes I made, or add anything I might have left out.  What we really need is some sort of "nugget" or National Instruments white paper that really explains all of this in ways we can use rather than us stumbling around in the dark doing things trial and error to figure it out.  Generally, any changes to the .ini files require you to shutdown LV and restart it to take effect which can take a couple minutes.  And considering all the various combinations of things that can be done above, your talking about dozens of possible restarts, and sending .vi's between two different PC's with two different operating systems, before figuring these things out.

  • Need to know how to print in one page a big block diagram from labview

    Hi!
    I wanted to know how i can print a program i made on labview. The problem is that the program is quite big and i need to print it in one page. Just the block diagram.
    Thanks!
    Meli

    Hello Meli,
    I know, normaly your VI should not be bigger as the window screnn.
    Anyway, you can use the "Print VI documentation" as explain in the following link and and choose the option "Scale block diagram to fit"
    link:
    Printing Documentation for VIs, Templates, and Objects
    Best regards,
    Nick_CH

  • Type defs changes not reflected in block-diagram constants?

    I'm struggling with strict type-defs today.
    If I create a strict type-def, say of a cluster with an enum in it, and save it. Then create a block-diagram constant from the strict type-def in a blank vi. Then make changes to the strict type-def (say, add another item to the enum), the block-diagram constant ghosts out , as it should. If I then select "Apply changes" from the strict type-def menu, the ghosted block-diagram constant becomes un-ghosted, as it should. BUT, it hasn't update!? If I look for the new item in the enum, it isn't there!? I'm sure it should be, right?
    No changes that I'm making to my type-defs or strict type-defs are being reflected in my block-diagram constants (which are definitely still linked to the controls with "Auto-update from type-def" checked on). It does work for front panel controls and indicators though - just not block diagram constants.
    I'm using LabVIEW 8.5.1, Win XP Pro. Any ideas anyone?
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

    Solved. I think.
    I tried a range of type-defined controls, including an enum, a ring list, a cluster with an enum inside it, and a cluster with a ring list inside it.
    Changes to the enum items were reflected in all vi controls and block diagram constants.
    Changes to the ring list items were not reflected in the controls or block diagram constants.
    This snapshot shows the the last item available in each ring and enum list. Clearly the rings were not updated when the custom controls were. (Yes, I applied changes and saved too).
    Switching to strict type-defs only impacted  the front panel controls, as Ben highlighted, because this is GUI related. You can see from this second snapshot where all type-defs are now strict type-defs that all enums and rings updated to reflect all three items, but the block diagram rings are still out of date
    I expect somebody will tell me now that this is normal behaviour??? 
    Message Edited by Thoric on 09-10-2008 02:31 PM
    Thoric (CLA, CLED, CTD and LabVIEW Champion)
    Attachments:
    custom_control_test.jpg ‏53 KB
    custom_control_test_stricttd.jpg ‏54 KB

  • I created boolean references in my main vi block diagram and copied them to my sub vi front panel. when wire my reference in my main vi to one the input node of the sub vi the wire is broken. the error says its a class conflict why?

    i created boolean references in my main vi block diagram and copied them to my sub vi front panel. when wire my reference in my main vi to one the input node of the sub vi the wire is broken. the error says its a class conflict why?

    Expanding and clarifying what BJD said;
    After you create the temporary sub-VI that BJD mentioned, open its front panel and copy the reference control that LV created when it created the sub-VI.
    This reference control will be correct class etc that you need. Use the control to replace the original control that you were attempting to wire up.
    The technique of "create sub-VI...copy" always works for me.
    There is one more thing that you should watch out for.
    The mechanical action of the boolean can not be set for latch action when attempting to read the value using a value property node.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Need a mini display port and audio to HDMI adapter for mid 2009 13" macbookpro

    Can some body recomend an adapter cable that plugs into the audio (mid 2009 MacBookPro 13") and mini display port and outputs to HDMI with audio and video all together for a TV?  I would rather not run a separate audio cable in addition to the HDMI cable.

    http://www.kanexlive.com/iadapt51 - 5.1-channel surround sound from sources that provide such a signal
    http://www.kanexlive.com/iadapt20 - 2-channel stereo sound

  • How to display records into a non table base block..

    Hi,
    Can anybody help me how to display records into a non table base block....
    Find below is my coding but it only display the last record in the first line
    in the block.
    PROCEDURE CREATE_CARTON_QUESTION IS
    CURSOR car_c IS
    select /*+ rule */ question_id, question_description
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
    v_found VARCHAR2(10);
    v_status boolean;
    v_error      varchar2(150);
    v_count number;
    car_r car_c%rowtype;
    begin
    begin
    select count(*) into v_count
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
         exception
         when no_data_found then
         v_count := 0;
    end;
    if v_count > 0 then
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id     := car_r.question_id;
    :la_carton.carton_question_answer     := 'N';
    :la_carton.carton_error_details     := null;
    :la_carton.attribute2          := car_r.question_description;
    end loop;
    end if;
    end;
    Thanks in advance.
    Regards,
    Jun

    Hi SNatapov,
    Thanks for you reply but still I get this error...
    FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
    Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
    Find below is the code....
    begin
    go_block('la_carton');
    first_record;
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id := car_r.question_id;
    :la_carton.carton_question_answer := 'N';
    :la_carton.carton_error_details := null;
    :la_carton.attribute2 := car_r.question_description;
    next_record;
    end loop;
    end;
    Hoping you can help me this problem...
    Thanks in advance.
    Regards,
    Jun

  • In block diagram connecting wire getting blur while saving the VI in LabVIEW 2009

    Hello,
    I am using Labview 2009, And while I am saving  a simple VI connecting wires are getting blurry. What could be the problem?? Is it affect my program while running?
    Solved!
    Go to Solution.

    Go into Tools>>Options, select the Block Diagram page and find the section called Constant Folding. If the CF for wires check box is checked, then this is most likely the reason. You can uncheck the check box and it won't affect the way your code runs.
    If this isn't the case, you should upload an image of what it looks like.
    Try to take over the world!

Maybe you are looking for