Has anyone found any properties or methods associated with malleable VIs? Specifically, I was hoping to find a way to invoke the "Convert Instance VI to Standard VI" function after confirming that a selected VI was indeed malleable. LabVIEW reports the class type of a selected malleable VI on the block diagram as a standard Sub VI, and I didn't see any properties/methods under the VI class.
I'm exploring what it would look like to make a utility to convert a malleable VI into a polymorphic VI for the purpose of backwards compatibility. I'd like to have a reference library that uses malleable VIs but create a version that is still accessible to someone using older versions of LabVIEW that don't officially support malleables.
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,
For those who have been playing with malleable VIs, the Type Specialization Structure has probably become a common sight and much abused tool.
The basic use of it is that if the action it performs is meaningless given one of the inputs, the included code will break and the next case will be tried.
This is great, but sometimes, it can be difficult to think of all possible variants of an action, and in particular, if the action needs to be different for two or more types, but two or more types are compatible with different codes, how to make sure which code will be executed with what type?
Enters the Types Must Match function:
I found this little gem in... Hidden Gems, within an odd-looking VI which I felt compelled to check out, Debug Write.vim
Open its diagram and light will shine, opening grandiose vistas and parallel universes remaining to be explored.
Of course, as the comment on the diagram says:
"This structure and the type-testing primitive functions it contains are not public LabVIEW features. They are experimental and should not be edited, copied, or used in other VIs without conducting extensive testing. See Context Help for details."
Here is the context help for Types Must Match:
My apologies if this all well-known among expert users, but I couldn't find it mentioned otherwise on the site...
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
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