-
Posts
4,914 -
Joined
-
Days Won
301
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by ShaunR
-
[Ask LAVA] Must Override exists; could Must Implement?
ShaunR replied to JackDunaway's topic in Object-Oriented Programming
Of course. A polymorphic VI has the feature that although you must have identical conpane layouts and directions. You can have different terminal types and numbers of defined terminals. However, the info for selecting the method is by the type wired to it or selection by the developer. In my example, I would just be requiring that class behaves like a polymorphic VI at run-time and method selection is dependent on the object rather than the data type wired to it. (I in fact, see no semantical difference between a polymorphic VI and a DD class except the choice mechanism). -
[Ask LAVA] Must Override exists; could Must Implement?
ShaunR replied to JackDunaway's topic in Object-Oriented Programming
Well. I would argue it does exist. A vi is calling the parent (the sub-vi). You just don't have your hands tied by the syntax of classes.Is a vi not "inheriting" from a sub-vi (Create sub vi menu command)? Can you not "override" the sub-vi behaviour? Are you not "encapsulating" by using a sub-vi?. Can you not "compose" a sub-vis inputs/outputs? I have always argued that the only thing LV classes bring to the table above and beyond classic labview is Dynamic Dispatch and a way of organising that makes sense to OOP mindsets. If you are not using DD, then all you have is a different project style and a few wizards that name sub vis for you.. If you look at your example, then you are simply calling a sub-vi. However. You are restricted in doing so by a peculiarity of the implementation as a class. -
[Ask LAVA] Must Override exists; could Must Implement?
ShaunR replied to JackDunaway's topic in Object-Oriented Programming
I'm still not getting this (emphasis added by me) It is valid syntax if you don't use classes since it is simply calling a common sub-vi. You seem to be (in this example) arguing for classic labview behaviour (which already exists). -
[Ask LAVA] Must Override exists; could Must Implement?
ShaunR replied to JackDunaway's topic in Object-Oriented Programming
Bingo! -
reference (emphasis added)
-
Organizing Actors for a hardware interface
ShaunR replied to Mike Le's topic in Object-Oriented Programming
Indeed. So you are getting the status directly from the device as and when you need it rather than "remembering" state in the software. It doesn't matter what the method of transmission through the software is (actors, events, queues, notifiers or whatever-a good point to again whinge about not being able to hook up VISA refs to the event structure ). -
Organizing Actors for a hardware interface
ShaunR replied to Mike Le's topic in Object-Oriented Programming
Unless your hardware uses push streaming (rare as rocking-horse droppings). The hardware cannot tell the UI since it will be CMD->RESP. -
To paraphrase Hoover............ With a stop button only. If you click the X button on the form (as users have been trained to do). Your panel will disappear (so can't get to the stop button) but your VI will still be running.
-
Google is your friend But looking at the javascript source here should help you out As for ranges. Well. They key is to convert your measured frequency to numbers of semitones from a base frequency. You are not counting in frequency, rather, semitones so round up or down fractions of semitones/crotchets/quavers/lemons/whatever (just be consistent). @Hoover. Glad I don't work for you.lol.
-
Well. The case statement is looking a bit unwieldy. You can take advantage of the fact that an octave is 2^n of the fundamental and a semitone is the 12th root of 2 (or about 1.059)since you are only interested in the fundamental frequency. Then you should be able to calculate directly and represent it as a bit pattern.
-
Organizing Actors for a hardware interface
ShaunR replied to Mike Le's topic in Object-Oriented Programming
Having dealt a lot with hardware systems. There were a few conclusions I cam to quite a few years ago.That is that with hardware settings, you should always rely on the device to tell you what you can and can't do. If you start restricting user input values before sending to the device, you very quickly end up trying to replicate the device logic which can get very complex. With this in mind, it becomes just a case of setting max/min values to the controls. Additionally, most modern devices give readable error responses, so usually you only need to bubble them back to the UI. Similarly. When it comes to device state. You should not try and maintain it in the software, rather, interrogate any state information as and when you need it. Maintaining device state in the software will vastly over complicate your code and lead to hard-to-debug disparities between the actual device state and that of your software. This situation is totally avoidable and means that very simple recovery procedures can be facilitated without complex code and the code can reflect state without logic. If you bear in mind these "rules-of-thumb". You devices will do all the hard-work and greatly simplify your code as well as being far more robust. -
USB Security Dongle for Windows-based LV Application
ShaunR replied to Neville D's topic in LabVIEW General
I've always rolled my own. However. I've heard some good things about this one but from C# programmers rather than labview (they have an eval kit). -
USB Security Dongle for Windows-based LV Application
ShaunR replied to Neville D's topic in LabVIEW General
You looking for "off-the-shelf" or "roll-your-own"? -
Nice to LV being thought about in new technologies.(Bitcoin)
ShaunR replied to ShaunR's topic in LabVIEW General
Well. Leaving aside the economic arguments for now..... The big thing about bitcoin is there is no centralised accountancy, it is almost an instantaneous peer-to-peer transfer. And it is extremely hard to trace (anonymity). A few years ago you might argue that the latter was only a benefit to criminals. With current events (SOPA, Snoopers Charter et. al.) many ordinary folk feel that they need to protect their privacy. Many economies are also being sucked dry by corporate interests and other monetary systems have arisen to combat this so people are looking for alternative strategies. Bitcoins are gaining popularity mainly because of these two points and you could say it's filling a need at the right time. Bitcoins obtain their "value" from scarcity (limited maximum number of 21 x 10^6) and by the energy consumed in generating them (electricity to run a bitcoin miner). There are a couple of bitcoin "exchanges" where you can convert bitcoins to fiat which is probably a more understandable, although flawed, measure of value (as of writing 1 bitcoin~= 14 Euros). ...... But on to the interesting stuff ...... Bitcoins are "mined" (that's the terminology) just as resources (like gold) are. Instead of digging a hole, however, a computationally expensive algorithm (a hash) is used by a Bitcoin Miner. This is synonymous with password "cracking" in computational terms, but the intent is quite different. Whilst in the early days you could mine with a fairly low spec PC. The "difficulty" has progressed to the point where you now need dedicated hardware-usually racks of GPUs in the 10s of Giga-hashes per second. (This has led to an argument that early adopters gain a significant wealth advantage, but let's stick to the interesting stuff ) The design of the bitcoin system is such that there is a maximum of 21 million that can ever be created (currently there are approximately 10M in circulation). A bitcoin itself is just a history of transactions (the block chain) from the "base" bitcoin block and the difficulty in "cracking" the hash changes in relation to the rate at which bitcoins are mined. (I should also point out that bitcoins are not mined singularly, but in batches). The number of coins in the batch (currently 50 at this time) also reduces as more bitcoins are mined meaning that the cost/BC (electricity consumed) increases with more bitcoins in circulation. You can get a more concise overview here. Suffice to say. On the surface it looks fairly straightforward (just money, right?) but the deeper you go, the more you realise just how much thought has gone into the system and how technically elegant it is (and not a banker in sight!). I can see a couple of issues that need to be resolved (bitcoins can be destroyed but not recreated and defence against a party taking over 50% of the network). But it does look very promising and certainly has gained the attention of the authorities. -
Nice to LV being thought about in new technologies.(Bitcoin)
ShaunR replied to ShaunR's topic in LabVIEW General
I thought you would have finished it by now -
How to Retail Wire Values for ENTIRE VI Hierarchy
ShaunR replied to curiouspuya's topic in LabVIEW General
Well. We are so OT.........what the hell:- 33 replies
-
- block diagram
- retain wire values
-
(and 1 more)
Tagged with:
-
Another alternative:
-
Car analogies are disingenuous. You buy a car and ownership is transferred via a document with a signature. With software you buy it but you don't own it! You buy the right to use it.
-
How to Retail Wire Values for ENTIRE VI Hierarchy
ShaunR replied to curiouspuya's topic in LabVIEW General
That's not a "crime". It (the EULA) is a civil offense and last I heard, lying wasn't a crime unless you were in a court under oath. The war that's raging about whether pirating/copying is stealing will not be resolved on forums and, I don't think it will even be resolved in courts (as bizarre as it may sound). The argument on one-side is that an "opportunity" has been denied and needs to be recompensed to the amount that "could" have been obtained. The argument on the other; that an "opportunity" has no value, cannot be proven and cannot be "stealing" since it was never realised or owned. Which side you sit on depends a lot on your world view and whether you prize cooperation over ownership. One is a communal view, while the other is feudal. History tells us that they are generally orthogonal and each rises to be the "norm" at various times. Again. Historically, cooperation has been the most common and invariably when the greatest leaps in human progress occur. Might I suggest we move all these to the "Licencing" thread where they belong?- 33 replies
-
- block diagram
- retain wire values
-
(and 1 more)
Tagged with:
-
Sequencing alternatives to the QSM
ShaunR replied to PHarris's topic in Application Design & Architecture
I'd use normal VI sequencing and dynamically launch it. If you want to stop it just Abort/close the VI. Quite often there will be a "controller" to launch/abort which the rest of the system messages to, effectively making it a module with an API.- 17 replies
-
- qsm
- queued state machine
-
(and 2 more)
Tagged with:
-
I don't think we are being hard. Just providing fair warning. It's not us he needs to worry about Licence 出る杭は打たれる。
-
Nice to LV being thought about in new technologies.(Bitcoin)
ShaunR replied to ShaunR's topic in LabVIEW General
Indeed. So you only have to write a LV implementation of ripemd160, secp256k1 and a base 58 encoder and you can claim some bitcoins -
Well. On a slightly more esoteric point. You say in the OP that that it is like a local variable. Here you are talking about a single VI. I think you need to define the context of what you think a VI represents. For example. you can have multiple methods in other languages and they do not require a single file per property/method.to access the storage In labview you must have a VI (file) per method/properties that you wish to manipulate from the cluster (storage). Taking my previous statement about "static". In other languages I could put a static variable in one of the methods to count the number of times that method/function had been called. This would translate (I think) into a single VI method with local (to that VI) storage outside the purview of the cluster (i.e. only accessable inside the function but could be exposed via a terminal of that VI - the return value in other languages). Is this a similar scenario to what you are describing here? Or am I really out there in my understanding?