Comment blocks in labview?

is there any way to make a comment block,
i.e. /* comments.... */
in labview?
I suppose you could enclose your code in a case or while loop that never
executes- but what if
you are trying to comment out code that doesn't work?
Seems like this would be handy when you are debugging, and have the luxury
of commenting out
part of your program you don't need to work on-
or during documentation when you need to write some example code that you
don't want to interfere with anything else.

There are a couple answsers to this question...
You can, as you pointed out, simply put a case structure around something and wire a constant to the selector such that the code you don't want executed is in the case that isn't selected.
A more fundamental answer to this problem lies in the way you design your LV code. In the many years I have worked with the language I have seldom needed the ability to comment-out code because, LV code is naturally modular. Hence, if you divide up your task properly you don't have to worry about commenting out portions of a large diagram, you simply execute the subVI(s) making up the functionality you want to test.
With a graphical dataflow programming environment such as LV that lets you interactively execute any
subroutine simply by opening its front panel and clicking the run button, testing and troubleshooting takes a very different form than it has in most text-based languages.
Think of it this way, BASIC had the "goto" statement as a way of implementing branches in the code. Likewise, when C came along it also had a "goto" in it--but it is rarely if ever used. Why? Because C has more sophisticated flow-control structures that make the BASIC way of doing things obsolete.
In the same way, LV has some control structures like those in other languages, but the dataflow orientation of the language means that you can spend less thinking about them--and indeed use less of them. And frankly there are things that are absolutely manditory in other languages that are obsoleted in LV.
The bottom line is that just as C requires a fundamentally different way of thinking about development tasks than did, say BASIC or COBOL; so working in LV requires a different way of thinking about the job of pr
ogramming than any of the earlier languages (with the possible exception of Forth--but thats a different digression).
Hope you got an answer from all this rambling...
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • The comment block in the XML file, can it be removed?

    Hello together,
    Ive created a form to be submitted via email and it all works great.
    In the XML file that is created, there is a huge comment block (from adobe) and I was wondering how I can go about removing it? Or better, how I can edit it.
    Any input on this is greatly appreciated.
    All the best,
    Kevin

    Anybody?

  • Comment blocks in DW CS3

    I'm using a trial of Dreamweaver CS3 and there's one
    nit-picky thing stopping me from purchasing it: PHP comment blocks.
    Most other PHP editors and IDE's I've worked with automatically
    build a comment block depending on how you start the comment. For
    instance, type "/**" and hit Enter, and you'll get:
    Dreamweaver CS3 isn't doing that. Is there a menu option I've
    missed, or a plugin that does so?
    It's a pet peeve of mine -- I want my code to look a certain
    way before it's released, and having to type " * Comment" for each
    additional line of the comments block is actually putting me off
    Dreamweaver. Any suggestions?

    Nut it out. There's no such option in DW.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "nloding" <[email protected]> wrote in
    message
    news:g2rkpc$j4d$[email protected]..
    > I'm using a trial of Dreamweaver CS3 and there's one
    nit-picky thing
    > stopping
    > me from purchasing it: PHP comment blocks. Most other
    PHP editors and
    > IDE's
    > I've worked with automatically build a comment block
    depending on how you
    > start
    > the comment. For instance, type "/**" and hit Enter, and
    you'll get:
    >
    > /**
    > *
    > */
    >
    > Dreamweaver CS3 isn't doing that. Is there a menu option
    I've missed, or
    > a
    > plugin that does so?
    >
    > It's a pet peeve of mine -- I want my code to look a
    certain way before
    > it's
    > released, and having to type " * Comment" for each
    additional line of the
    > comments block is actually putting me off Dreamweaver.
    Any suggestions?
    >

  • There is an unclosed comment block in the SQL statement. Ensure that there are balanced "/*" and "*/" comment markers in the SQL statement.

    I get this error - when I try a Multi-line comment entry - by using the /* and */
    "There is an unclosed comment block in the SQL statement. Ensure that there are balanced "/*" and "*/" comment
    markers in the SQL statement."
    Even though I am entering both the /* and the */.
    I tried it many way - in the same line, in different lines etc..
    like 
    /* Select xxx from xxx */
    or
    Select xxx from xxx
    or 
    /* Select xx from xx
    Please help anyone..! ;=(

    But When I do a Help/About I see that it is 
    the SSMSE's Help About screen says "SQL Server 2005"
    However I downloaded and installed SQL Server 2014 last night and was entering queries..
    Most Select Queries work fine..
    the -- comment line works fine..then I stumbled on the /*  - */ does not work.
    Thanks.
    Well, you have two different version of SQL Server installed on your machine. Please connect again from SSMS to the SQL Server 2014.
    T-SQL Articles
    T-SQL e-book by TechNet Wiki Community
    T-SQL blog

  • Picture in a Comment on the LabVIEW Idea Exchange

    How do you post a picture in a Comment on the LabVIEW Idea Exchange?
    Richard
    Solved!
    Go to Solution.

    altenbach wrote:
    Broken Arrow wrote:
    How do you post a picture in a Comment on the LabVIEW Idea Exchange?
    Submit the comment without picture, the edit it.
    Once you edit the comment, you have the full editor, including the "attach" button.
    Now attach the image and submit the edited comment.
    Now edit it again and embed the attachment (you only see it whe editing).
    Do all this quickly so you don't run out of time.
    Laura,
    Since the last forum update, we can no longer attach anything when editing an idea so these instructions are no longer valid. Can we have the old functionality back? Please?
    Thanks!
    LabVIEW Champion . Do more with less code and in less time .

  • Is it possible to import simulink blocks into labview

    Hi,
    I was wondering if it is possible to import the MATLAB/simulink blocks into labview. 
    thanks,
    Baran.

    Hi Baran,
    There is no way to directly import any of the programing blocks from The MathWorks, Inc. Simulink® software into LabVIEW.
    However if you wanted to use your own code that you programed using The MathWorks, Inc. Simulink® environment in LabVIEW, we do have the NI Simulation Interface Toolkit which you can use.
    <Brian A | Applications Engineering | National Instruments> 

  • Code based on which relay block in labview is coded

    Hi
    Can I get the code with which 'Relay' block in labview has been written? I want to use the code to design a similar block in multisim. 
    Awaiting Reply
    Thanks in advance
    Ganga

    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Problem while commenting block of lines in impl. enhancement

    Hello,
    I am finding a problem when I am commenting block of lines in 1 implicit enhancement. I have to comment it line by line.
    WHich is very tedious.
    Is there any way to do it?
    rgds,
    Rupali

    choose all the lines, and simply comment them. A known problem is with the last line, so comment all the lines except the last one, then comment the last one

  • How can I automatically prepend comment blocks to stored procedures?

    How can I automatically prepend comment blocks to stored procedures?
    In my organization, the standard is to comment all stored procedures with a comment block that looks like this:
    /*-- =============================================
    -- Created by: <Owner>
    -- Created date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- Modifications:
    -- Modified by: <Owner>
    -- Modification date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- =============================================*/Thanks.
    select * from v$version;
    BANNER                                                                        
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production             
    PL/SQL Release 11.2.0.2.0 - Production                                          
    CORE     11.2.0.2.0     Production  Edited by: xDeviates on 01-ago-2012 7:37
    Edited by: xDeviates on 01-ago-2012 8:31

    Hi,
    If I want to write a package called pk_fubar, I copy the following script and call it fubar.sql
    --     ==========  package_name.sql starts here  ==========
    --     Package_Name.sql
    SPOOL     &home_dir\package_name.lst
    PROMPT     .     H   H  EEEE     A    DDDD
    PROMPT     .     H   H  E       A A   D   D
    PROMPT     .     HHHHH  EEE    A   A  D   D
    PROMPT     .     H   H  E      AAAAA  D   D
    PROMPT     .     H   H  EEEEE  A   A  DDDD
    @@package_name_head
    PROMPT     .     BBBB    OOO   DDDD   Y   Y
    PROMPT     .     B   B  O   O  D   D   Y Y
    PROMPT     .     BBBB   O   O  D   D    Y
    PROMPT     .     B   B  O   O  D   D    Y
    PROMPT     .     BBBB    OOO   DDDD     Y
    @@package_name_body
    SPOOL     OFF
    @@package_name_test
    -- EXIT
    --     ==========  package_name_head.sql starts here  ==========
    CREATE OR REPLACE PACKAGE     pk_package_name
    AS
    FUNCTION     sign_in
    (     in_user_name     IN     VARCHAR2
    ,     in_password_txt     IN     VARCHAR2
    RETURN     PLS_INTEGER
    END     pk_package_name;
    SHOW ERRORS;
    GRANT     EXECUTE     ON pk_package_name     TO schema_name_some_role;
    --     ==========  package_name_body.sql starts here  ==========
    CREATE OR REPLACE PACKAGE BODY     pk_package_name
    AS
    --  Procedures related to SCHEMA_NAME ...
    --  2012 July 23 -- Package started with proc_x.  (Frank Kulash)
    --     **   local procedures and variables   **
    --     **   x   **
    --     **   initialization section   **
    --     The following code is executed once per session, when the package is loaded.
    BEGIN
         set_var     ( 'DT_FMT_TXT'
              , 'YYYY-MM-DD HH24:MI:SS'
    END     pk_package_name;
    SHOW ERRORS;
    --     ==========  package_name_test.sql starts here  ==========
    --     PACKAGE_NAME_TEST.SQL -- Test procedures in schema_name.pk_package_name
    SET     DOCUMENT     OFF
    SET     SERVEROUTPUT     ON     SIZE     10000
    ALTER SESSION     SET NLS_DATE_FORMAT = 'DD-Mon-YYYY HH24:MI:SS';
    SPOOL     @@package_name_test.lst
    PROMPT
    PROMPT     ***********************
    PROMPT     **  Testing x  **
    PROMPT     ***********************
    PROMPT
    SPOOL     OFFThen I replace package_name with fubar, and schema_name with the actual schema name. Finally, I cut off parts from the end to create fubar_test.sql, fubar_body.sql and fubar_head.sql. You could easily include a multi-line procedure comment template in this script. Every time you add a procedure or function, ciopy and paste that comment template, and then modify the copy.

  • Decimate and interpolate blocks for labview dsp module

    Somebody have developped decimate and interpolate blocks for labview DSP ( sppedy and DSK6713)? could send me for a teaching laboratory ?

    Hi aif,
    The following link is excellent for using LabVIEW DSP with the NI- SPEEDY or the TI's supported DSP's
    http://cnx.org/content/search?target=&words=labview+dsp&allterms=weakAND&search%3Amethod=Go
    You can choose the lab that is the closest to your application.
    I hope that helped.
    Cheers,
    KostasB
    Applications Engineer
    National Instruments UK

  • Integral blocks from labview 7.1 where is in labview 2010

    Hi I must integrate sampled signal. In labview 7.1 is good checked blocks for it. But where is equivalent in labview 2010?? I cant find it.
    Solved!
    Go to Solution.
    Attachments:
    calkowanie.png ‏2 KB

    http://zone.ni.com/reference/en-XX/help/371361G-01/gmath/integral_xt/
    Did you try the search capability for the functions palette?
    Attachments:
    functions search.png ‏17 KB

  • Comment detecter avec LabView une impulsion sur le port série et traiter l'information?

    Je dois automatiser un banc de test avec LabView 7.0. Pour cela il faut que je récupère une impulsion (1 bit, pas de trame) provenant de la carte à tester. Je dois la récupérer via le port série du PC. Je ne sais comment faire, aidez-moi svp.

    Bonjour,
    Dans LabView, il existe un noeud de propriété visa qui permet de récupérer l'état de certaine line du port serie.
    Pour cela, tu vas dans la palette de fonction Visa>Visa Avancé>Noeud de propriété.
    Une fois le noeud posé sur le diagramme, tu choisis la ligne dont tu veux vérifier l'état.
    Voir lien ci dessous.
    http://digital.ni.com/public.nsf/websearch/022A3C75A1F36DFF86256E6200705996?OpenDocument
    Johan G.
    NIF
    .NIDays2008 {font-family:Arial, Helvetica, sans-serif; font-size:12px; color: #065fa3; font-weight: bold; text-decoration: none; text-align: right;} .NIDays2008 a, a:hover {text-decoration: none;} .NIDays2008 a img {height: 0; width: 0; border-width: 0;} .NIDays2008 a:hover img {position: absolute; height: 90px; width: 728px; margin-left: -728px; margin-top:-12px;}
    >> Avez-vous entendu parler de NI Days ?

  • A general buffer block for Labview?

    Has anybody made a function which stores acquired values and returns the contents when needed. In other words I need a buffer which is as simple and fast as possible and does not waste resources.
    Of course, I can make a VI which has an uninitialized shift register and call it in the loop but it is not efficient enough in some demanding situations. And also, this kind of buffer will slow down the execution of the loop because the buffer increases all the time. (Clearing the buffer is possible by writing the contents to the file but it is a little bit complicated)
    In many of my applications where the acquired data is needed to be plotted I have used waveform chart which has a history for the data. I have noticed th
    at history feature can be effectively used as an buffer, it does not slow the execution like shift registers and you don't need to build any buffers by yourself.
    In some cases I don't need to display the data but I just want to buffer it, therefore it could be very useful to have a general buffer block in the Labview which does not have any kind of appearance in the front panel, just a node in the block diagram.(of course one way is to use the history of the waveform chart and hide the chart)
    I have been programming with LV over two years daily but making of efficient buffers has always been a question to me. I have noticed that other colleagues have same kind of problems.
    Maybe this kind of buffer block could be made by c-language code and called it by the LV, but calling functions from dlls take also some time overhead which can be too much.

    Hi Wirer,
    see attached file.
    Mike
    Wirer wrote:
    > Has anybody made a function which stores acquired values and returns
    > the contents when needed. In other words I need a buffer which is as
    > simple and fast as possible and does not waste resources.
    >
    > Of course, I can make a VI which has an uninitialized shift register
    > and call it in the loop but it is not efficient enough in some
    > demanding situations. And also, this kind of buffer will slow down the
    > execution of the loop because the buffer increases all the time.
    > (Clearing the buffer is possible by writing the contents to the file
    > but it is a little bit complicated)
    >
    > In many of my applications where the acquired data is needed to be
    > plotted I have used waveform chart which has a history for
    the data. I
    > have noticed that history feature can be effectively used as an
    > buffer, it does not slow the execution like shift registers and you
    > don't need to build any buffers by yourself.
    >
    > In some cases I don't need to display the data but I just want to
    > buffer it, therefore it could be very useful to have a general buffer
    > block in the Labview which does not have any kind of appearance in the
    > front panel, just a node in the block diagram.(of course one way is to
    > use the history of the waveform chart and hide the chart)
    >
    > I have been programming with LV over two years daily but making of
    > efficient buffers has always been a question to me. I have noticed
    > that other colleagues have same kind of problems.
    >
    > Maybe this kind of buffer block could be made by c-language code and
    > called it by the LV, but calling functions from dlls take also some
    > time overhead which can be too much.
    Attachments:
    FIFO_WO_LocalVar2_6i.vi ‏48 KB

  • Is there a "signal builder" block in labview

    Hi all,
    I am new to labview and i have the following question. I have build a vehicle model in simulink in which i have applied different types of road inputs. The inputs have been created with the signal builder block, because some of them are really customised potholes and bumps. I am trying to build the same model with labview simulation module. Is there a similar block in order to create my input and if not, do you have any idea how is this possible. I also tried to translate my model into labview but the build the translator was not able to translate the build signal blocks.
    Thanks

    Hi,
    If you are using the Simulation Module, you can actually do the profile easily by combining the Lookup Table block with the Simulation Time. See the VI and picture attached.
    Barp
    LabVIEW R&D - Control Design and Simulation Group - National Instruments
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
    Attachments:
    Special Profile.PNG ‏35 KB
    LUT Problem.vi ‏151 KB

  • Is there an integratio​n block in Labview like Simulink?

    I am interested in modeling differential equations for a mechanical system in Labview. I have used Simulink in the past and there are blocks available for integration and differentiation. How can this be implemented using Labview? Thanks. Frank

    I guess that there is integration x(t) that can do the job.
    However it is not causal since the integrated signal is obtained as y n =
    f (x n-1, x n, x n+1 ) where x n is the singal to integrate.
    Therefore, it is not reentrant like all IIR filters in Labview. I got a
    Labview example making it practically reentrant for my app from
    Jean-Claude Drolet last year. Thanks again Jean-Claude. It cam handy in my
    vibration app.
    Differentiation is a trickier business in practice since this increases HF
    noise tremendously. I would suggest you make your own IIR filters to
    introduce a time constant to get around this classical data processing
    hurdle. Labview provides all tools to do that.
    Gerard
    "Frank P." wrote:
    > I am interested in modeling differential equations for a
    mechanical
    > system in Labview. I have used Simulink in the past and there are
    > blocks available for integration and differentiation. How can this be
    > implemented using Labview? Thanks. Frank
    Regards
    Gerard D'Ans ([email protected])
    Laborelec Rodestraat,125 B-1630 Linkebeek
    tel 32 2 382 0568
    fax 32 2 282 0241
    ULB SMA ([email protected])
    Blvd F D Roosevelt CP165 B-1050 Brussels
    Tel 32 2 650 2515
    http://www.ulb.ac.be/polytech/laborulb/index.htm

Maybe you are looking for

  • IPhoto crashed after uploading photos. Tried restart but crashed again. Message that library is damaged. I don't have a backup. How to restore library?

    I uploaded new photos and put into albums. When I tried to open album, iPhoto shut down. Got error message and clicked on reopen. Tried again and it happened again. When I opened it again it said there was damage and offered a button to restore. I cl

  • Remove save and saveas from file or document of km repository

    HI experts when i assign the permission of read to a file of ms word or other file or document in km repository when i assign km navigation iview to other user.he or she is able to read,saveas  the file which i give to that user in km repository but

  • Using Mapping Templates

    Hi all, I have created a mapping template that I need to apply inside a message mapping some 10 times. However, whenever I select target element and source element and I display the available templates for it, and I choose the mapping template that I

  • Quality in SD

    Hi, For FG sales material i have a inspection type 10.I did quality planning through (QP01).in IMG i assigned inspection type to delivery type & inspection type to delivery category M (sample).now when my sales person is doing PGI system is not allow

  • Oracle Portal master details default value set up.

    Hi All, Using Oracle Portal to create a master details form. I have tried to set up the details table foreign key. I used the master table primary key as a default value for the details table foreign key. Does anyone know what the correct syntax is w