LVOOP

Hello, I started re writing a parallel of my current project. This time using lvoop (new to me) something that is not clear for the sake of the moment communication interface: I have several devices with rs232, gpib or nothing. I have to considerate as one class of another com interface which is a component of class interface or com peripheral is a specialization of the device and must be created possibility child ex: 3458 rs232, 3458 gpib, rs232 of 5500 5500 has gpib. Any idea on how to see the communication interface? Best regards tinnitus

Hey tinnitus.

I think that is a better decision by you.  First of all, I would like to ask what are the common characteristics of the various data acquisition tasks.  I've developed a library that I use for the e/s series.  I took the decision to have all objects inherit from a common object of e/s series - there are some commonalities that were shared between all the routines that could be accomplished using the base class (sending commands and receive data, initialization of communication, opening a port, close communication, aimed at preventing clashes of communication) etc.) While the details of what data to send, and how the data were extracted was left to children.  To get data, more generic command and I returned a "data object" which has been implemented based on the object that was trying to get the data.  I'll post the end this here with more details, so join the Group and check it out.

Cheers, Matt

Tags: NI Hardware

Similar Questions

  • A Question of legacy LVOOP

    Hello to all you LVOOP guys and girls,

    I have a question that seems like it should be relatively simple, but it is obvious that I don't understand what is actually happening behind the scenes of LVOOP.  What I have is two classes that inherit from the same superclass.  The super class provides basic functionality I want to maintain between the various bodies and functions cannot be overridden by children.  Now, the problem in my application where I want two classes operate in parallel - at the same time, these classes appear to be contaminating each other and producing odd results that are not ideal.  For example, I have a function that inserts an error generated by the child in an error queue (the reference to which is held by the parent company) which is then sent to an error handler, owned by the parent company.  What I find is that the error is then handled by the instance of the parent class of evil!

    This behavior is normal?  Do not forget that I am using data flow programming, and all access to the two classes are on the same thread where the class is first instantiated.  If the behavior is expected, is anyway I can get around this?

    Since this could be a little incomprehensible, here are some shots of what I'm talking about:

    The image above is a snapshot of the two different classes child running in parallel using the same class of parent.

    And here's the example I gave - a VI simple to put errors in a queue for access and manipulation by the child class:

    Any thoughts would be appreciated.

    Peace, Matt

    Your description and images are not enough, then it will be only general, but here are a few relevant points:

    1. How do you get the Ref of the queue? If get you it by name, then both references point to the same queue, then this would be my first guess for what is your problem.

    2. You seem not understand the terminology of OBJECT-oriented programming. There is 'no instance of the parent class' - in your case you have probably two instances on your diagram, which each also inherits its behavior of the parent class (I say probably because there are any number of operations that can create instances, like a wire connection). To simplify terminology, I'd use 'object' instead of 'instance', so you have two objects.

    3. In order to better clarify this point - in this case you seem to use "instance" to refer to an object that has a specific reference to the queue (for example you want basically a behavior by reference), while LVOOP is inherently by val and it means that the memory has been allocated to an object, but that object can be quite identical to another object instance.

    4. I don't know how LVOOP you studied, but there should be some info autour (which many in the forum of LAVA OOP), as well as some courses of OR that might help (not taking them, I don't know what their level).

    If this does not help, need more details, the real code preferably.

  • Ability to set the legacy of LVOOP class programmatically?

    I want to schedule a class generator:

    The user selects an existing class of LVOOP and the generator produced a LabVIEW that contains a new class is a class of children of the selected class previously.

    Is it possible to set the parent of a LVOOP class programmatically class?

    Attached, there is a VI (main.vi), which creates a new project and add two classes (Parent.lvclass and Child.lvclass). How can I change the VI, such that it makes the class Child.lvclass is a child of Parent.lvclass?

    Thank you very much in advance for any help!

    You use the ActiveX interface. Is there a reason for this? If you stop using the ActiveX interface and directly use the LV, LV classes have a complete set of methods/properties available.

    As long as you use the ActiveX interface, I have no solution for you. Nothing about the libraries (which inherit classes LV) has already been exported to the ActiveX interface.

    Using VI Server types, your code translated as indicated:

  • Messed up because of the LVOOP project

    It began in the construction of an executable file with 3 error (could not load front), I uncheck 'remove FP', but I get error 2208. Now I changed the paths of certain controls and live in some classes due to name conflicts. And get a lot of errors "VI is locked by the owner. In two days I should make acceptance of the factory to test my project, and I think that I will be lost my job, because this grand and expencive project will not work.

    Sorry, I would say that LVOOP has the bigs, then don't use it.


  • LVOOP DataGridView crash when a specific property defined in certain order

    I am writing an API in LVOOP for the DataGridView control .net, especially because I like / want combobox in the functionality of the listbox. Everything is fine, but I ran into a strange thing sort of. In the attached code "test.vi", if I set the property to allow the user to add true lines once I added a combobox column, things work fine. But if I set it to false, I get a crash.

    Now, if I set the same property to true or false BEFORE I add this column, I get no crash. I can't seem to reproduce outside LVOOP so I wonder if that is the question. Could someone let me know if they can reproduce this? I put all possible cases in diagram disable structures, so you just turn on and off properly.

    Note: I hope that you are familiar with context-sensitive help, as I have not created icons for my screw (yet)

    I see the same thing on 2012, even if it is not acutally that an accident - just LV gets stuck in the unresponsive State.

    If you make the control more, this stops happening, probably because the cell or the last row is now visible, so I suspect that there is an unhandled exception or something similar somewhere that LV is waiting, similar to what is described here - http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/00437163-e197-4ba1-9e95-a3a24...

  • Make items within a cluster (in) visible by a Subvi (from LVOOP?)

    Hello

    I would like to know how it is possible to make elements inside an invisible cluster, using a Subvi from LVOOP.

    The description is in the main program, the internal operation is explained in the Subvi.

    Her to give a larger program a better overview. But I don't know how to do it.

    Create a reference instead of a property node.

    Pass this reference to your Subvi and use nodes of property to the rear on the reference that the sub - VI was adopted by the high level VI.

    You can review the images that I have in my "GUI_Controller" Albumn found here. If you click any of these images, it will take you to a page with an image more large and which includes a link to the thread where I spoke at the origin of these images under the model of design GUI_Controller (a form of Action Engine).

    It is apreview of what you will find in this Albumn.

    If you post stuff a few photos more (thanks!), so we can take a pic.

    Ben

  • Object LVOOP read/write using the API TestStand

    Is it possible to read/write a LVOOP object to a variable TestStand from LabVIEW using the API of TestStand?

    SetPropertyObject() takes a green wire reference, which is incompatible with an LVOOP object.  SetValVariant(), SetValIDispatch(), and SetValInterface() seems to just write a value null of type variant.  I don't know if I use the wrong API function or if it's just not possible.

    Hi jsiegel,

    That's right, it is not quite possible to what I believe, it is your intention. As mentioned, TestStand cannot create the object of LabVIEW. To make and use references of LabVIEW with TestStand, you need LabVIEW out this reference, which may then store it TestStand as an object reference. For VI requiring the obeject LabVIEW as an input, the registered object reference can be passed in. To make calls to LabVIEW classes using the class member call with a step of the VI Action instead of the call to VI for the Type.

    Of course, you need both LabVIEW and TestStand 2012 or newer in order to use these functions.

    Kind regards

  • Distribution of LVOOP/FPGA-based application on several possible projects?

    SITUATION: I develop a large enough project that relies heavily on LVOOP: I encapsulated material-interaction and functionality in the classes of LV that are loaded at run time. I have different types of plug-ins that are interacting with each other in the first level VI. These types of plug-ins are made in more generic classes defining their interfaces that are used by the top-level VI. Plug-ins actual instantiated at runtime classes are child-classes of matching the more generic classes (dynamic distribution).

    PROBLEM: The Labview project file is now big enough and takes forever to load/save. Also, I regularly get crashes or other very odd behavior of Labview himself. For example, Labview stalls when loading the project file, except when it is loaded through the list 'recentlly open project' in the start menu in Labview.

    POSSIBLE SOLUTION: I would like to make an individual Labview project file for each plugin real. This would have the additional advantage that they could be indivually developed by different developers without cause version conflicts.

    The PROBLEM WITH THIS SOLUTION: First tests show that it would work in effect plug-ins that do not target FPGA use. However, many of my plug-ins use the FPGA screws, which are still features some plug-ins (i.e., some plug-ins can use an FPGA VI, while others use it an another VI FPGA: a single FPGA VI will run both, however). For this reason, I would like to put these FPGA VIs in Labview for the plug-in project only, but not in the top-level Labview project. Because otherwise, I would have to update the project level higher every time that someone has written/edited a plug-in that uses an FPGA VI.

    Unfortunately, Labview generates an error when executing in the first level VI a method of a class of plug-in that uses an FPGA VI: "1498 error in Get LV class by default Value.vi. Possible reasons: LabVIEW: library has errors. Correct the errors before performing this operation. "Complete the call chain: get LV class default Value.vi top_level_vi.vi.

    In fact, it not even help to add to the project LV level the target FPGA including the FPGA VI which will be called: the error message remains the same.

    QUESTIONS RELATING TO THE:

    -Is it possible to distribute the LV classes on various projects with some of these projects with their own VI FPGA/resources dedicated.

    - Or is there a completely different solution to avoid a huge project file LV with problems?

    Thanks in advance for any help!

    I discovered that you can access an FPGA VI without adding all resources FPGA (for example the FIFOs, i/o etc.) for the respective project by obtaining the FPGA VI reference via bitfile VI (unlike obtaining by the path of the VI). Exactly what I needed. I now have a project containing the FPGA resources and live FPGA. And in all the other projects that I can make use of the FPGA screws without adding resources FPGA, just by opening the bitfile FPGA VI related references.

    The idea of encapsulating the FPGA VI in own LabVIEW class is also very useful. In combination with obtaining the FPGA VI reference via the bitfile it allows me to charge flexibly different screw FPGA running (according to the settings in the configuration files), again without having to add any combination of FPGA resources to the project.

    Problem solved. Thank you!

  • Problems of LabVIEW with Test Unit under lvoop

    Hello

    I try now provided with LV2012 with a LVOOP code Unit Test infrastructure but seem to be a few problems.

    I have built a unit test for a base class in the attached draft who is the source of class (it is another class in the project as it is an example of a method for recovering, but it is not used in the unit test). My problem is that I get results that fail for one of my tests, when I think they have to work.

    Basically, the unit test is configured as follows

    Case 1) test the VI without installation VI and ensure proper operation default values

    Case 2) test VI by setting specific values in the test in VI of disassembly and also check the single release of "Source Method.vi" configuration VI

    Case 3) Test of the VI with the VI of installation using the default values and confirm them through the VI of disassembly

    When running case 2 fails and indicates that disassembly of the VI return values by default not those fed to the installation VI. I don't see why.

    As per

    Any suggestions?

    All the best

    David

    Hi David,

    The behavior you describe is planned. When you first call the 'Source_Method.vi' by using the 'SourceAccess Unit Test Manual.vi", the"Unit Test Manual.vi SourceAccess' creates and instance of the "Source_Method.vi". In this specific case of the VI it will boot with the default values but will then retain the values passed by the "Unit Test Manual.vi SourceAccess' until the project we closed, or specifically tell you to reset defaults. Whenever she is called by 'SourceAccess Unit Test Manual.vi' it will access this instance of it. If another instance of the "Source_Method.vi" was created by another parent it would be initialized with their default values, until crushed by the top-level VI calling. Then would he behave exactly as the instance created by the "Unit Test Manual.vi SourceAccess". Whatever your type typedef and its configuration, as long as everything is connected correctly, this should be the expected behavior when you configure things through object-oriented programming in LabVIEW.

    I hope this information is useful to your application. If you want to see a LabVIEW example that demonstrates this behavior, you should consider referring to parts of the ReferenceObject.lvproj. It is found by searching in the example finder LabVIEW object-oriented. This is accessible via

    Help > find examples.

  • Ability to create a 'substitution VI' programmatically for a LVOOP class?

    I'm now quite a bit further with my class LV generator VI I mentioned previously (see here). However, I'm stuck again: I want my VI generator to automatically create a new 'alternative VI' (i.e., overrides a method of the parent class) for the newly created class.

    In VI server interface, I have not found an invoke node to create a new "VI to ignore." Is it possible to do, maybe with a VI wrapper like the one that I was provided to programmatically set the superclass of a class LVOOP?

    Thanks in advance for any help!

    It works more or less as you suggested, but it requires two additional steps: since the VI script that replaces the front panel control loads the original control at run time, the old class must be copied as well (and deleted again subsequently). The complete procedure (tested and functional!) is:

    1. Copy the VI to a new location.
    2. Copy the original VI class to the new location (just temporarily necessary)
    3. Add the new VI to the new class
    4. Change the input to the new class terminals using VI scripts
    5. Remove the original class to the new location of the VI

    Thank you much for the help!

  • LVOOP: Common accessor for the child classes?

    I am reletively new to LVOOP and OBJECT oriented programming in general. I used very simple classes as a replacement for clusters several times, and now I have an architecture intended to convert most of my code into classes, dynamic distribution screw and similar.

    However, I run in to an issue, which basically boils down to laziness: I really don't want to do a lot of the same dynamic send screws I want to have a VI parent to be able to write a piece of data common to all children. Preference gives an error if the child does not have this data element.

    I guess it's quite similar to dynamic distribution, but without having to write a DD VI for each class.

    Is it possible to have the VI parent to access the data of the child? If so, how?

    Here is an example of my hierarchy:

    Test.lvclass (parent)

    DC_test.lvlcass (data: test number, 2D, time stampresults)

    Transfer_Curve_test.lvlcass (data: results of tests settings, 1 d, timestamp)

    Breakdown_test.lvlcass (data: test number, 3D, timestampresults)

    ... 28 another test

    As you can see, the data type only common between them is the timestamp. I want to be able to use a VI in the parent class to write data in the child class.

    You have it backwards autour.

    The data that is common belongs to the parent class, not the class of the child.

    Data that are not common may not be processed by the parent class and must be transformed by the child class.

    You don't need to CREATE truly dynamic shipping screws for a common data type.  If you just don't set the VI at all, it will be called the parent instance.

    Shane.

  • (Question LVOOP) How one access the data of another class in another class?

    Hello-

    Ass title suggests, how do I access another class (or is it class?) data from another (different) class?  I will attach a picture showing where my problem is...

    I was told this:

    http://zone.NI.com/reference/en-XX/help/371361H-01/lvhowto/setting_scope_classes/

    May contain some helful info, but I can still understand how to unbundle Renault of classes inside the component class data (as seen in the attached photo).

    I think there could be something simple I'm missing here when it comes LVOOP or OBJECT-oriented programming in general... If any of you are willing to help me, it would be much appreciated!

    Thank you!

    -pat

    Personal data are always private, you can never set public. Unbundle cluster function can be used only on the thread of class when he is in the class. If you need to access private data, you must create accessors.

    It of simple, just the class right click and select new, VI for access data members. He invites you to a dialog box to fill you with what you want to create, elements of data and if you want them available through property nodes (recommended). Once completed, this will generate the Afterward screw., you can use in any other VI. The nice thing about making them nodes of property is that you can plop down a property node and it thread class, and all the created accessor functions will appear in the list.

  • using LVOOP with several instrument drivers

    I created 3 classes SigGen.lvclass, HP8657B.lvclass and HP8648B.lvclass. The second 2 classes inherit from SigGen is simply the address of the instrument and virtual functions. I created a VI that initializes a class according to the configuration in a file. This VI emits a SigGen.lvclass. This seems to work fairly well with dynamic distribution. So, I created another set of classes for power meters. However, in the VI which initializes one of objects and the fate as a base class, I get a constraint point while on the SigGen I get none. I am new to LVOOP so I don't know that I'm doing this correctly. Can someone take a look?

    LabVIEW 8.5 Professional

    Nothing to worry about. This is because the cast can't until it hits the indicator so you don't have to only one type of power to the output meter. With the SigGens casting goes to the Terminal output of the case structure (which does not show a point constraint).

    LabVIEW should probably be more dynamically in the question about if it shows a constraint when dot LVOOP ascending cast objects.

  • Why the parent class does not report data for child in LVOOP class?

    Attached is a practical program that I wrote to learn about the legacy with LVOOP.

    I have the impression of OOP is a Parent class describes the type of object.  Then the children inherent description of the parent.  The child may also have additional qualities, but it still contains the description of the parent.  If a child does not have a VI bearing the same name as the parent and the parent VI will be loaded and executed.

    My questions:

    (1) why does the Parent.lvclass:Read.vi not report 'Child' in the channel indicator when the child write VI has been sent?

    2) matches the data of the child, do not at all seen by the parent company even when it has the same definition (that's the String)?  I understand that the Parent do not know anything about the unique child elements, but I think we should know about the common themes which inherited the child.

    Here is my sample code:

    These are two different sets of data. The parent class has a data set containing the string, the class of the child also has a data set containing the string, but both of these channels are separated.

    This can be made apparent, by changing the names of the channels based on their respective categories:

    What you want is for your children, class VI write to access the data of the parent class. You can do this with a simple data VI member access in VI of the child:

  • Mechanism for Parent LVOOP VI to prevent child Override VI execution

    I am working with LVOOP and I my 'controller' represented as an object.  The parent class contains the data private to State "under tension" and with a 'process' VI.  The 'Process' VI can be replaced by the child object and is required to call the implementation of the parent.  So what I would do is check the status "under tension" in the implementation of the 'Process' parent and if the controller is not powered, do not continue execution of implementation of the child.

    I want to do in the implementation of the parent so that I do not need to re - write this feature in each child object 'process '.

    So, is there a mechanism to dynamically prevent implementation of the child of the 'process' to run without code required on the child of "process"?

    The two approaches that come to mind are:

    (1) define an error in the parent VI and make sure that the child is not running if there is an error on the wire in error.

    (2) that the parent call another dynamic dispatch method that does the actual work, if the power is on. If you do this, there is probably no reason for the external VI (the one who performs the audit power) for dynamic distribution. So you must always only one child VI, it should just be called from a different place. Unfortunately I do not know how you would ensure that it is only called in the parent.

    There is no way for the parent to say "immediately returned without executing the following code" - which is essentially what you ask for.

Maybe you are looking for