use of OOP and not

Hello, I use LabVIEW for a couple of years now and have met a few references to the OBJECT-oriented programming. I read a little of the help file to this topic and some stuff on the forum. I have a basic question that I would like to get an answer before we get too far into it. Basically, why? What gives OOP programmer that he can not do (or is really hard to do) in ordinary LabVIEW? It seems to me that this is another type of cluster. So I must be missing something.

You are right - in BT, an object is really a cluster.  But there is more to this...

In the interest of full disclosure - I exactly wrote an app using the OBJECT-oriented programming.  It is an application that uses a set of drivers VISA that I wrote for a USB line spectrometers.  Each type of spectrometer was similar, but necessary functions different hex codes to perform the same functions.  In addition, the format of the data returned by each spectrometer differs.

I had exactly the same concern that you do before you start.  I decided to use LVOOP for a reason:

I knew that I would have to expand the drivers in the future.

I created a parent called spectrometer USB class which had subVIs for all common functions.  I created a child class for each of the types of spectrometers.  In children's classes, no matter where the orders differ between spectrometers, I overroad the Subvi parent class.  In the future when I need to add another type of spectrometer, all I have to do is create another class child and substitute the same subVIs.  99% of my code will not need to change at all...

In short - OOP offers capabilities, that you have not already.  In my opinion, it's more like a technique of organization that can be used to help manage the code if you have one day to extend.  In my personal experience, it really made me think about the structure of the app and forced me to write highly modular, tight code.

LVOOP was a bit of a pain to learn (I had to work a bit to understand how to use the dynamic allocation).  But after using once, I expect to use it - I even look forward to it.  However, it is not a cure all... efforts are necessary to implement, so I tend to avoid it for small (and even some middle) scale applications.

Jason

Tags: NI Software

Similar Questions

  • How to read bfile using dbms_lob.read and not raw characters

    Hi all
    Is it possible to read LOB using DBMS_LOB. READ so that the buffer is displayed in ASCII characters not BELIEVED. Suppose I have the following code:
    --create or replace procedure some_proc is
    declare
    note_clob clob;
    note_bfile bfile;
    note_var raw(10000);
    warning int;
    dest_off int:=1;
    src_off int:=1;
    lang_ctx int:=0;
    amount int:=1500;
    
    begin
    dbms_lob.createtemporary(note_clob,true);
    --note.txt is a text file
    note_bfile:=bfilename('TEMP_DIR','note.txt');
    
    dbms_lob.fileopen(note_bfile);
    dbms_lob.read(note_bfile,amount,1,note_var);
    dbms_lob.fileclose(note_bfile);
    dbms_output.put_line(to_char(note_var));
    
    end;
    /
    The DBMS_OUTPUT. Put_line shows the RAW data instead of its ASCII representation:
    53514C3E2073656C65637420696E7374616E63655F6E616D652C7374617475732C686F73745F6E616D652066726F6D207624
    696E7374616E63653B0D0A0D0A494E5354414E43455F4E414D45092053544154555320202020202020484F53545F4E414D45
    0D0A2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D202D2D2D2D2D2D2D2D2D2D2D2D202D2D2D2D2D2D2D2D2D2D0D0A696E61726109
    09204F50454E0920202020202066697265666C790D0A0D0A53514C3E2073656C656374202A2066726F6D2076247665727369
    6F6E3B0D0A0D0A42414E4E45520D0A2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D
    2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0D0A4F7261
    636C652044617461626173652031316720456E74657270726973652045646974696F6E2052656C656173652031312E322E30
    2E312E30202D2036346269742050726F64756374696F6E0D0A504C2F53514C2052656C656173652031312E322E302E312E30
    202D2050726F64756374696F6E0D0A434F52450931312E322E302E312E300950726F64756374696F6E0D0A544E5320666F72
    204C696E75783A2056657273696F6E2031312E322E302E312E30202D2050726F64756374696F6E0D0A4E4C5352544C205665
    7273696F6E2031312E322E302E312E30202D2050726F64756374696F6E0D0A0D0A5B6F7261636C654066697265666C795D24
    206C736E7263746C207374617475730D0A0D0A4C534E5243544C20666F72204C696E75783A2056657273696F6E2031312E32
    2E302E312E30202D2050726F64756374696F6E206F6E2031332D4A554E2D323031312031363A30373A32330D0A0D0A436F70
    7972696768742028632920313939312C20323030392C204F7261636C652E2020416C6C207269676874732072657365727665
    642E0D0A0D0A436F6E6E656374696E6720746F20284445534352495054494F4E3D28414444524553533D2850524F544F434F
    4C3D49504329284B45593D45585450524F43313532312929290D0A535441545553206F6620746865204C495354454E45520D
    0A2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0D0A416C696173202020202020202020202020202020202020
    2020204C495354454E45520D0A56657273696F6E20202020202020202020202020202020202020544E534C534E5220666F72
    204C696E75783A2056657273696F6E2031312E322E302E312E30202D2050726F64756374696F6E0D0A537461727420446174
    652020202020202020202020202020202031332D4A554E2D323031312031313A32393A35300D0A557074696D652020202020
    20202020202020202020202020202030206461797320342068722E203337206D696E2E203333207365630D0A547261636520
    4C6576656C2020202020202020202020202020206F66660D0A53656375726974792020202020202020202020202020202020
    204F4E3A204C6F63616C204F532041757468656E7469636174696F6E0D0A534E4D5020202020202020202020202020202020
    2020202020204F46460D0A4C697374656E657220506172616D657465722046696C652020202F7573722F6C6F63616C2F6F72
    61636C652F70726F647563742F31312E322E302F6462686F6D655F312F6E6574776F726B2F61646D696E2F6C697374656E65
    722E6F72610D0A4C697374656E6572204C6F672046696C652020202020202020202F7573722F6C6F63616C2F6F7261636C65
    2F646961672F746E736C736E722F66697265666C792F6C697374656E65722F616C6572742F6C6F672E786D6C0D0A4C697374
    656E696E6720456E64706F696E74732053756D6D6172792E2E2E0D0A2020284445534352495054494F4E3D28414444524553
    533D2850524F544F434F4C3D69706329284B45593D45585450524F43313532312929290D0A2020284445534352495054494F
    4E3D28414444524553533D2850524F544F434F4C3D7463702928484F53543D3132372E302E302E312928504F52543D313532
    Just curious to know if I can do this to DBMS_LOB. READ directly. Another way that I can do is use DBMS_LOB. LOADCLOBFROMFILE and not the DBMS_LOB. READ.

    Kind regards
    Val

    Hello
    Try this

      utl_raw.cast_to_varchar2(note_var)
    

    Edited by: user6806750 the 07.10.2011 01:59

  • Tricky SQL - is possible using just SQL and not of PL/SQL

    Hi all

    Here's my data

    create table experience (exp_id number (10), exp_name varchar2 (20), root_exp_id number (10));
    insert into a values (642, 'Test', 5172) experience;

    create table experience_node (exp_node_id number (10), exp_node_type_id number (2));
    insert into experience_node values (5172, 1);
    insert into experience_node values (5173, 2);
    insert into experience_node values (5174, 2);

    create table experience_connector (exp_conn_id number (10), exp_conn_type_id number (2), exp_node_id number (10), parent_exp_node number (10));
    insert into experience_connector values (1, 5173, 4287 5172);
    insert into experience_connector values (4288, 2, 5174, 5173);
    insert into experience_connector values (2, 5175, 4289 5174);

    When you run these queries:

    Select parent_experience_node_id
    of experience_connector
    where experience_node_id = 5175;

    Select parent_experience_node_id
    of experience_connector
    where experience_node_id = 5174;

    Select parent_experience_node_id
    of experience_connector
    where experience_node_id = 5173;

    Select parent_experience_node_id
    of experience_connector
    where experience_node_id = 5172;

    gives 5174, 5173 and 5172 and null. exp_node_type_id = 1 and exp_node_conn_type_id = 1 indicates that it is at the root. Hope my explanation is useful. Is what I'm trying to get - to get the big concession to 5175 grandparent who is 5172. Is it possible to do it with SQL?

    Thank you very much for you help.

    Best,
    Lacombe

    user6773 wrote:

    We don't know if the level. There could be any number of levels. Is there any other way around? Thank you once again.

    Well, you say that you need to root, not great great grandparent? If so, use:

    SQL> select  parent_exp_node
      2    from  experience_connector
      3    where connect_by_isleaf = 1
      4    start with exp_node_id = 5175
      5    connect by exp_node_id = prior parent_exp_node
      6  /
    
    PARENT_EXP_NODE
    ---------------
               5172
    
    SQL> 
    

    SY.

  • Can I set up sync on a computer that is used by others and not share my information?

    I use a computer which I share with others. Any one elses action will appear on my sync account. Can I connect if you use Firefox sync on this computer?

    If other users use your logon in the Windows user account, they will have access to your installation of Firefox and have access to your data in sync.

    It is better for each user to have their own user account to logon or have them share a guest account.

    http://www.Microsoft.com/windowsxp/using/Setup/WinXP/accounts.mspx

  • I've set up a Web site using the TNG software for genealogists. It seems fine in Chrome and Safari. It is different and not as good as in Firefox.

    My new site Web search OK on Safari. On Firefox, the fonts look lighter and smaller. Underscore bars now appear thinner. How can I make Firefox display look more, as it should be and not on Safari?

    Thank you
    Bob

    The specified 12px font size seems not to be very large, so maybe this will increase a little in case a small font is used by Firefox.

    font-family: Arial,Helvetica,sans-serif;
    font-size: 12px;

    What the police use Firefox on the page?

    You just right-click and select "Inspect element" to open the Inspector (Firefox/tools > Web Developer) with the selected item.
    You can check the font used for the text selected in the tab fonts in the right pane of the Inspector.

    Just so you can check that you are not the page zoom.
    Reset the zoom of page on pages that are causing problems.

    • View > Zoom > reset (Command + 0 (zero))
  • I don't get an email from a user known to me. It is not in my blocked list and not in the junk e-mail folder. what technique should I use to solve this problem?

    I have a known user that I have been to send/receive email from him for many years. now, I don't get the emails sent to me. If he is using my gmail account, email is sent to thunderbird, and I see the email with gmail address in my Inbox. His e-mails addressed to my sbcglobal address are not in my Inbox, or in my junk e-mail folder. I did not block lists, but I use Spam Assassin. is there a technique to solve this problem? It is the only email address that I don't get.

    Connect to your sbcglobal email by using your browser and see if they are put in a spam folder before Thunderbird never the chance to see it.

  • PayPal said that I have to use Outlook and not Firefox! Help!

    I have windows 7 and not mac. PayPal has worked twice yesterday and then not at all. PayPal said that I have to use outlook express to get the paypal to work constantly! ??? I checked with paypal 3 times and the recipient to see if there were any questions on their end, but there was nothing. My credit cards properly. What's new?

    You can try the following steps in case of problems with web pages:

    Reload Web pages and ignore the cache to refresh potentially stale or corrupt.

    • Hold down the SHIFT key and click the Reload button
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Command + shift + R' (Mac)

    Clear the cache and cookies only from Web sites that are causing problems.

    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > Cookies: "show the Cookies".

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.

    Note that you can find a shield icon to the left of the "Site Identity" (globe/lock) button on the address bar which mixed the active content is blocked.

  • Why can I not use Clipboard, copy and paste? instead of a picture, I get javascript

    I try to use the clip and paste on a document. I select an image and click on copy. It's not going in the clipart.all I get is the word javascript on the document.

    Are copy you the image you are viewing using a right click > copy the Image?

    You copy a Web site to another program (such as Word or paint), or in another page in Firefox? There may be special numbers, stick it in an online editor.

    Web sites can use scripts to change what happens when you right-click. Sometimes it is used for good, as custom menus, but it can also complicate copies images... If you want to try to disable (all) sites to do this, you can make some changes in the subject: configuration preferences editor. I'll look at the details if you are interested.

  • I'm using Firefox Portable and lack the 'Extra' _Menue been updated to Version 11. And "No, I can not add with the toolbar customization."

    I am using Firefox Portable and lack the menu "Extra"since updated to Version 11. And "No, I can not add with the toolbar customization."

    What is this extra menu?

    In some languages of the menu Tools is called Extra, so you can watch in this menu to see if you can find what you are looking for.

  • I just bought an Iphone 6s and not yet am possession of en from the Sim Card. Ook, do you know if I can use the phone including applications via Wifi and put the chip later? Thank you. Renault JL

    I just bought an Iphone 6s and not yet am possession of en from the Sim Card. Ook, do you know if I can use the phone including applications via Wifi and put the chip later? Thank you. Renault JL

    No, because if you bought a new iPhone, then you need a SIM card to activate it before you can use the wifi applications.

    This is a phone after all, you don't need a sim card any to be able to activate it.

  • I used a time capsule in my house.  Now, I have another network put in place and would like to set my time for back ups and NOT as a WiFi capsule

    I used a time capsule in my house.  Now, I have another network put in place and would like to set my time for back ups and NOT as a WiFi capsule

    If it is possible to turn off the WiFi on the Time Capsule, which only leaves you with the option to back up your Mac (s) using a wired Ethernet cable connection between the Mac (s) and the Time Capsule.

    Are you OK with that?

  • After software update today, my password does not work.  My phone is now disabled.  I don't have a backup.  How can I start to use my phone again and not lose all my content?

    After software update today, my password does not work.  My phone is now disabled.  I don't have a backup.  How can I start to use my phone again and not lose all my content?  Help, please.

    You can not

  • How can I clear the attraction of the browser to the bottom of the list, I followed the directions using the options and it will be not only clear

    How can I clear the attraction of the browser to the bottom of the list, I followed the directions using the options and it will be not only clear

    Entries in the location bar drop-down list with a yellow star (blue on Mac) at the right end of the bookmarks.

    You can delete this an item marked with a bookmark that appear in the list, if you open this url in a tab and click on the yellow star in the address bar.

    This will open the "Edit this bookmark" dialog box and you can click on the delete button to delete the bookmark if you want to delete such an entry marked with a bookmark.

  • When I try to install Firefox, I get an error "could not open the output file. I used Firefox before and it doesn't work anymore, so I uninstalled. Cannot re - install now.

    When I try to install Firefox, I get an error "could not open the output file. I used Firefox before and it doesn't work anymore, so I uninstalled. Cannot re - install now.

    This has happened

    Each time Firefox opened

    I tried to download firefox.

    User Agent

    Mozilla/4.0 (compatible; INTERNET EXPLORER 6.0; Windows NT 5.1; SV1; AntivirXP08; GTB6.3; .NET CLR 2.0.50727; MS - RTC LM 8)

    When you click on the download link on GetFirefox.com, you should be asked if you want to run or save the file. If this situation occurs when you try to run the download, try instead to record and put the file on your desktop or in a similar place, where you are certain that you can find.

    When the download is complete, try double-clicking on the downloaded file in the normal Windows Explorer (browse your way to the file from the desktop). This should start the installation.

    If, in the Explorer window, you notice that the file seems to be missing the Firefox icon orange/blue, right click the file and select Properties. The image should look like the attached picture (except that mine is in Danish, but that is irrelevant) if saved correctly - if it don't look like this, would you please describe the content or attach a screenshot of the box. Especially what it says under "File Type" - it must be 'program '. If this isn't the case, will have to focus on what could be the problem here.

    A bit off-topic, your Internet Explorer seems to be quite a bit outdated (IE 6, where the current version is IE 8), so I highly recommend that you try to run Windows Update to get your system up to date. Is it as a society (such as a thin client Terminal Server computer) system, this is not possible, and most likely, your system administrator will have to help you.

  • purchase of my iPhone - how to credit my account Bank and not use credit card

    Help... I would like to make purchases using my phone.  I have a balance of store that I would use to pay for my purchases and not my credit card.  How to do that?

    If your iTunes account shows a credit balance, you are connected with this Apple ID, then it must deduct that balance before the credit card.

Maybe you are looking for