Jump to content

A class questions about my system


Recommended Posts

Hello, everybody.I'm new to the LVOOP and I meet a problem in my wafer auto-test system about the class responsibility.

 

    the wafer auto-test system uses many instruments to measure the wafer parameters such as Vbr, Vf... Firstly, I want build class for every instrument. For example, I have create a app class named WaferTester, and many instrument classes such as Keithy 2600B class, EXFO PM1600 class, etc. The WaferTester class contains these instrument classes. However, I also want to create parameter class such as Vbr class, Vf class. These parameter class have many properties such as test delay time, upper limit, lower limit etc. Most importantly, the parameter class have a method to get parameter measurement result. For example, when calling the measure method of Vbr class, it use instrument to measure the Vbr parameter of the wafer and return it to the caller. My question is about the relationship the instrument class and the parameter class. The method of parameter class will use different instrument classes, so the instrument classes is a part of the parameter class. For example, the Vbr class will contain Keithy 2600B class. However, different parameter class may use the same instrument and I think the instrument is a static part of the test system. I have no idea to achieve a reasonable relationship about the parameter class and the instrument class.

Link to post
Share on other sites

My first piece of advice is to create a UML model of your system.  This will help you and others understand it better.

Second, it's not clear to me what your "parameter classes"  actually are.  It sounds to me like they are actually tests, but also include test configurations.  Perhaps you can clarify.

Link to post
Share on other sites
  • 2 weeks later...
My first piece of advice is to create a UML model of your system.  This will help you and others understand it better.

Second, it's not clear to me what your "parameter classes"  actually are.  It sounds to me like they are actually tests, but also include test configurations.  Perhaps you can clarify.

 

Thanks for your advice!

 

The "Parameter Class" is a abstract class, it has many properties. For example, a parameter class has properties named "upper limit" and "lower limit" to judge the parameter test value is pass or fail. Many child class will inherit from the "Prameter Class", For example, the Vbr class is a child class of the "Parameter Class". The difference between these child parameter classes is the way to get its parameter test value. For example, when call the GetParameterTestValue() mehod of Vbr class(Child class of Parameter Class), it will make Keithley 2635A to output a current and measure a voltage, then return the voltage measure value to the caller. For the Cj class which is also inherit from the "Parameter Class", it will use Agilent E4980A to measure the capacity of the UUT. 

 

My actual question is about the relationship between the "Parameter Class" and the "Instrument Class". In LabVIEW, the class object is a instance, if the Vbr class want to use a instrument, it must contain a Instrument class object instance. For example, if I want to measure three parameters and they use Keithley 2635A both, so every parameter class will contain a Keithley 2635A class instance. However, a test system only have one Keithley 2635A and it should be shared by multi paramter class. If LabVIEW approve for using "class reference" which is similar to the pointer in C language or reference type in Java, the instrument share problem can be solved. But everything in LabVIEW is a "Value" which occupies some memory.

Link to post
Share on other sites
Thanks for your advice!

 

The "Parameter Class" is a abstract class, it has many properties. For example, a parameter class has properties named "upper limit" and "lower limit" to judge the parameter test value is pass or fail. Many child class will inherit from the "Prameter Class", For example, the Vbr class is a child class of the "Parameter Class". The difference between these child parameter classes is the way to get its parameter test value. For example, when call the GetParameterTestValue() mehod of Vbr class(Child class of Parameter Class), it will make Keithley 2635A to output a current and measure a voltage, then return the voltage measure value to the caller. For the Cj class which is also inherit from the "Parameter Class", it will use Agilent E4980A to measure the capacity of the UUT. 

 

My actual question is about the relationship between the "Parameter Class" and the "Instrument Class". In LabVIEW, the class object is a instance, if the Vbr class want to use a instrument, it must contain a Instrument class object instance. For example, if I want to measure three parameters and they use Keithley 2635A both, so every parameter class will contain a Keithley 2635A class instance. However, a test system only have one Keithley 2635A and it should be shared by multi paramter class. If LabVIEW approve for using "class reference" which is similar to the pointer in C language or reference type in Java, the instrument share problem can be solved. But everything in LabVIEW is a "Value" which occupies some memory.

1) LabVIEW does have some sort of native object reference support.  I (somewhat controversially) don't recommend that you use that, however, since a) it is neither clean nor pretty, and b) the better thing to do in most or all cases is to clean up the design.

2) Take a closer look at your design.  I think it would be preferable if the Parameter Class didn't know about the instrument at all, but it is hard to tell that for sure from your description.  (I can actually see why you might have such a relationship, but without knowing more details about the system it is impossible to offer a recommendation here.)  Again, I recommend creating a UML model of your system, both to clarify the issues in your mind, and to facilitate sharing your vision with your interlocutors.  It is essential to understand the relationships between the different classes here.  There may be a more appropriate way to relate these items.

Paul

OK, you wrote that that "different parameter class may use the same instrument and I think the instrument is a static part of the test system."  So, why not make a test system class that has an instrument as one of its attributes, and a collection of parameter classes (that do not have references to the instrument!) as another attribute?  The answer will get slightly more complicated if, as I suspect is the case, multiple instruments may be present within an application.  I don't think this will be difficult to accommodate, though.  (As a first approach, for instance, you can have a an array of clusters, where each cluster contains an Enum indicating the instrument, and a set of measurement parameters.  Or something like that.)  Let's establish what you need, though, first.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Ryan Vallieu
      I have seemingly found an issue with the shipping example code for Nested Malleable VIs.  Another user has verified that he saw the same behavior in 2019.
       
      I am working through the examples and the presentation from NIWeek 2019.  In running the Lesson 2b code (C:\Program Files (x86)\National Instruments\LabVIEW 2019\examples\Malleable VIs\Nested Malleable VIs) I found the Equals.vi in the class was not being leveraged and the search failed.  When I went to my LabVIEW 2018 machine and ran the Lesson 2b.vi the code worked to find the element by correctly leveraging the in-class Equals.vi.
      One difference I see is that in the 2018 example the Equal.vi is in the example folder with the code, and in 2019 the Equal.vi has been moved to VI.lib - otherwise the code looks to be the same.  The Equals.vi code looks identical, and the calling VIM look identical.  I posted on the LabVIEW NI.com forum here: 
      https://forums.ni.com/t5/LabVIEW/LabVIEW-2019-Malleable-VIs-Shipping-Examples-Lesson-2b-Nested/m-p/3966044/highlight/false#M1129678
       
      I am trying to determine what may have broken or changed between the implementation in 2018 and 2019, visually the code looks the same.
    • By Voklaif
      Hello all,
      I am programming with LabVIEW for around 2 years and was recently stumbled upon LVOOP.
      I am required to write a communication protocol to work with a micro-controller, which later will be also used for ATP and debug purposes.
      I want to build the program "correctly" from the beginning so it will be maintainable and flexible to additions and changes.
      My natural way of building a program would have been a queued state machine, with several loops, each loop is in charge of a different module (one for GUI obviously), but as I stated in the beginning, I want to use LVOOP.
      Does anyone have a LVOOP project I can use as reference? I've searched online and found some nice examples, but they are small and teach you the basic stuff.
      For me it's important to see the how to use the project tree wisely, where to place the classes, see the managing loop and to learn as much as possible before I create one of my own.
      Thanks in advance,
      Voklaif
    • By GregFreeman
      I have an array of classes, let's call the object TestPass, of size 1 (but it is an array because it can scale out to multiple test passes). In this class, there is one other nested class which is not too complex, then various numeric and string fields to hold some private data. There is also an array of clusters. In this cluster there is a string, two XY pair clusters, and an integer. Not very confusing.
      This array of clusters gets fairly large, however, upwards of 80-100k elements. What I am finding is when I index the array of pass classes it is crazy slow. On the order of 30 ms. Doesn't seem like much, but we are indexing the array in our method to "Get Current Pass" which is used in various places throughout our code. This is adding potentially hours to our test time over the 80k devices we are testing. 
      So, I started digging. When I flatten the class to a string and get the length, it's 3 mb. But, when I run the function with the profiler is is allocating close to 20 mb of memory!
      My gut feel was that the string is causing the issues. So I removed the string from the cluster and the index time went to 0 ms. 
      Luckily we can normalize a bit and pull the strings out of the cluster since a lot of them are duplicates. But it makes our data model a bit uglier. 
      Has anyone seen these kind of performance issues before? I saw them in 2013 and 2017.
    • By ted Francis
      I am new to LVOOP and have jsut started writing my first LVOOP program which I have attached.
      I would appreciate greatly help with the question I have
      Thank you in advance 
      Ted
      This vi will perform two tasks 
      1.Generating Report data sheet for metrology 
      2. updating the scales in a MAX .nce file
      1. Metrology will input calibration information into the tables on the tabs
      Metrology will then click "Update Tables" then "Create Report ( create report section of code is not yet written
      Update Tables will write all information entered in the tabs to class varaibles and will also delete current Max informatiomn
      2. Metrology will click "Load NCE Scale"
      vi will prompt for nce file to load and then once file is selected, display existing scales for two channels (Current Motor 1 and 
      Current Motor 2)
      Metrology will then click "Update Scales"  the program will replace the existing scales with those entered in Step 5.14 and 5.15
      from the tables on the tab
      Question 1.  Steps 5.14 and 5.15 are needed by both classes ( Table Variable and MAX) - what is the best way to share this information
       
      CAT0000032 Class Version.zip
    • By shoneill
      I was browing through the actor framework discussions on the NI site yesterday and I came across a statement by AQ.
      Never inherit a concrete class from another concrete class
      I had to think about that for a second.  The more I think about it, the more I realise that all of the LVOOP software I have been writing more or less adheres to this idea.  But I had never seen it stated so succinctly before.  Now that may just be down to me being a bit slow and all, but in the muddy and murky world of "correct" in OOP-land, this seems to be a pretty good rult to hold on to.
      Are there others which can help wannabe plebs like me grasp the correct notions a bit better?  How about only ever calling concrete methods from within the owning class, never from without?  I'm learning for a long time now, but somehow, my expectations of LVOOP and the reality always seem a little disconnected.  AQs statement above helped crystallise out some things which, up to that point, had been a bit nebulous in my mind.  Well, I say I'm learning..... I'm certainly using my brain to investigate the subject, whether or not I'm actually LEARNING is a matter for discussion... The older I get, the less sure I am that I've actually properly grasped something.  The old grey cells just seem to get more sceptical with time.  Maybe that in itself is learning...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.