Jump to content

ShaunR

Members
  • Posts

    4,939
  • Joined

  • Days Won

    306

Posts posted by ShaunR

  1. Wow that guys had alot of time and dedication for that. Here's the site which explains a little about what it is.

    http://www.kshif.com/lv/index.html

    I expected cool scripting or something to get those attributes but when I dug down saw lots of case statements for each attribute, for each control type.

    Yup indeedy.

    There are some optimisations you can do to reduce the cases. All controls have a "label" and "Caption" of type text (single case), U8,U16,I8 I16 et al can have one case etc. But as soon as you get to graphs and the more complex controls, you pretty much end up with a case for each property/type

    That implementation is a lot cleaner than mine though :worshippy: but, in my defense, mine does produce JSON strings (for obvious reasons)

  2. Don't you just love strict typing ;)

    I've got a control scraper and it's counterpart which sets the values. Unfortunately it's part of the websocket API, so can't give it to you.

    Basically you have to use variants to get the control type and use the controls ref with the appropriate value property type to set it (case structure with a frame for almost every type). This means that it runs in the UI thread which is a real downer.

    You can encode the type in your string if you want it to be generic for transmission or you can use coercion to force values to the target controls type (different type of genicity).

    I would also suggest JSON rather than a comma delimited string :rolleyes:

    Alternatively, you can wait for the serialization VIs in the other thread. :D

  3. I'll try to remember to bring CDs with me and if I remember (and have a compliant relative), I might be able to actually test it in the development environment anyway. Any idea if LabVIEW can be as deeply-rooted on OS X as it is on Windows? I don't want to mess up someone else's computer.

    I think I have Snow Leopard VM somewhere. If I find that, I'll let you know.

    No idea about the LV bit.I just clicked on the *dmg and installed it since this is the only reason for me to use the Mac (I'm not even sure I know how to uninstall it :P ).

    PM me an email address and I'll send the API anyway so that if you do get something working; your ready to go.

  4. If you can (or want) to build a test application that I can use with just the run-time, I can test it on another version of OSX this weekend. I'll have to check to be sure what version (I think Snow Leopard), but let me know if that's valuable to you.

    All testing is valuable. I can compile the speed test which will also exercise the AES encryption as well as give a benchmark on your MAC (I'm running in a VM). Let me know which run-time engine you have (2009, 2010 or 2011) and an email address and I'll send it to you (I don't know how big it will be, but knowing LV a few MB-if thats a consideration for your mailbox limits).

    ......a bit later....

    Scrub that. I don't have the app builder for Mac :frusty: . Thanks for the offer though.

  5. Thanks for the link! I see in its code that it just attempts to open clones 1 to N where N defaults to 100. That seems like a real hole in the VI Server API, not to have a method to find all active processes.

    OK, I just read the whole thread, looks like there is awareness of the issue. Too bad there's no solution yet. Thanks again ShaunR for the pointer.

    What issue? Getting clones?

  6. The App.AllVIs property gives a list of VIs in memory. I want to open VI references to all of them, but I need their paths. Is there a way to go from lib:vi name to path to its reference?

    Actually what I want is to find all Vis executing at top level, including clones. Is there another way to get that?

    Why do you need their paths? The open VI reference accepts the VI name (if it is in memory).

  7. Cool video. Too bad it stops just when it was getting interesting.

    That is just the youtube limits. Search youtube for "The Trap" to see the rest (the original was one hour and that was 1 of 6 on youtube).

    I don't quite understand your comment though. Game theory is just a way to predict behavior of beings who behave according to their own self interest. It doesn't cause people to act in their own self interest.

    (And to clarify, by "self interest" I mean whatever gives a person the most utility, satisfaction, etc., not what is in best long term interests.)

    In addition to the video being a part of a longer one . It, itself, was one of three, hour long, programs.The first one (of which you have seen a bit), examines the theories of John Nash and Laing as people being suspicious, self interested beings and the adoption of his theories and models by economists. The others discuss what our Chicago friends did with it, how we reacted to it and (IMO) much of the reason why the world is the way it is today.

    The three parts (if you are interested) are:

    F*ck You Buddy

    The Lonely Robot

    We will force you to be free.

  8. Now, I am not saying that all companies are immoral,

    <mounts soap-box>

    Indeed. They are all amoral (as an entity). There is no conscience. No guilt. No compassion. No moral obligation to "do the right thing" or indeed any sort of social contract toward community outside those imposed by law. Whilst the beings that constitute the corporate entity may have all these;in itself, it has only one objective - to increase it's market share towards a monopoly via the vehicle of profit.

    The Victorians knew this. That is why they made a definitive distinction between corporate and social. The banks were the guardians of corporate. The government, the guardian of the social. The govt kept the banks in line with laws, and the people kept the government in line with votes. What happens when corporate merges with government? Either the corporations MAKE the laws and your/our vote is worth as much as chocolate fire-guard, or we all start calling each other "comrade" and espouse the merits of the mother-land.

    <climbs back off the soap-box>

  9. ShaunR, if you write a calculator with +-*/ that saves the state of X and Y through a pseudo FGV with no action engine around the +-*/ you'll get into race conditions.

    If you try to calculate in parallel both a + operand and the * operand it will depend which action checked the state of X and Y first and if each action's data flow managed to change the state before the other started. I hope I'm not trying to teach grandma to suck eggs.

    I'm not quite with you on this one.The storage would be a part of the calculator AE and there would be no "pesudo FGV". FGV stands for "Functional Global Variable and the functions would be +/- which is why I don't really discriminate between a "Get/Set FGV" and an AE. As long as the functions are atomic, then the +/- FGV would complete its operation (read the value, operate on it, then output) and the other operation could not read the stored value whilst this is happening (as it can with Globals). The race condition that FGVs address is that the value cannot be read in other parts of the code until the current function has completed. So in your example, the result of 2+2-1 (with two VIs in parallel) will always be 3 once both have been executed. With a global it could be 5.

    Your example, however, uses functions which are commutative. So when you lay down your Calc VIs and do an add and subtract in parallel. You cannot guarantee which of the VIs will be executed first by LabVIEW, but, after they both have executed, the answer will be correct. If the order is important (i.e. the operations are not commutative) then you have a different type of race condition that has nothing to do with access timing to the underlying stored value (which is what globals suffer from). However. unlike globals, FGVs have an error terminal, so if it sequence is important, they can be sequenced via the terminals (e.g add then subtract).

  10. Using get/set version of pseudo FGV does not implement the singleton design pattern and has only a little advantage over a simple global variable.

    The singleton pattern is a method to resolve a common problem associated with OOP when a single object is required to be instantiated and referenced rather than a new instance of an object (the default OOP instantiation-Grandma loves sucking eggs). Native LV does the opposite by default (a VI is a singleton - a single object referenced wherever it is placed - system wide). No design pattern is required as it is implicit to the language. If you don't want this behaviour, then it can be set to "re-entrant". This aspect, however is a side-show when talking about FGVs vs Globals.

    Where the differences between FGVs, globals really lie is in "State" not "Data".

    In non-data flow languages state has to be managed and an answer to the icky state management problem was OOP. In the dataflow paradigm, state is implicit in the language. However. Sometimes state managed by the [LabVIEW] language is not sufficient or appropriate. So, when it is advantageous to do so, we specifically design an object to store state (a FGV). The "get/set version of pseudo FGV" [sic] or "Action Engine" is the native labview method of replicating OOP style objects where you encapsulate the state of the data and manipulate it with methods.

    Global variables cannot maintain state (only data). Neither can they be "sequenced" to maintain state via dataflow. This is the advantage of FGV over globals. Singleton behaviour is just the language specific being taken advantage of.

  11. Well. There was a Windows Kernel update just shy of 1 month ago, but no virus scanner update for 2 months. I noticed that windows defender AND the the separate virus scanners real-time scanning is enabled on all of them. So I've turned off "real-time" checking and Defender on the PCs temporarily to see if it goes away. There are various murmurs around the internet on this subject and the usual response is "just live with it" (not acceptable for me!).

  12. What do you mean with "booting into", and how do you disable CTRL+ALT+DEL?

    Nicely explained by Rolf (including the caveats). The way I "protect" myself from getting pushed into the corner is to have a few choice buttons or a keyboard combination that brings up a password protected interface (can either be an "Admin" area or just completely hidden until a certain key combination is pressed). Once in, I usually give the options to return to the windows shell (requires reboot), start an explorer window (only way to look at files) and re-enable CTRL+ALT+DLT (last two don't require rebooting)..

    Just booting into LabVIEW as the shell will usually flummox most operators/users. Disabling CTRL+ALT+DEL means that you can't get to task manager, from which, you can use the run command.

  13. So that means that an operator can simply navigate to the built application and delete the EXE. Now I realize if an operator does this that it would probably be considered malicious behavior. In my opinion giving a user, who likely doesn't fully understand the system, the ability to break a test system so easily is a very big deal. But then again I don't know the type of environment that the system is in, and this may be a fine setup.

    My favourite trick is booting into the LV program as the shell and disabling CTRL+ALT+DEL :ph34r:.

    • Like 1
  14. I hadn't heard of this before, but I'm hazarding a guess that this dialog isn't generated by LabVIEW so much as Windows itself - based on the title bar, verbiage, and button choices. Of the machines which experience the problem, is anything about the hard drive configuration common? Same motherboard chipset, same HD manufacturer, same RAID configuration? Another obvious question is, of course, what changed a month ago?

    Of the times that I've seen a dialog like this, it often pointed to file system corruption, but since the files in question do eventually load, I guess that's not the case. Still it wouldn't hurt to run a Scandisk (maybe checking for bad sectors, if you have time to kill) and checking the SMART stats for your drive(s).

    Completely dissimilar machines. One has an 450GB SSD (laptop), one has a 500GB seagate (desktop), one has a 750GB Western Digital (Desktop) one has a 120GB WesternDigital (laptop). Mixtures of Win7/LabVIEW x32 and x64 and I7, I5 and Dual Core Pentiums (dissimilar hardware).

    I have a suspicion it is a Windows update or maybe virus scanner update (since all LabVIEW installations are over 8 months old)

  15. Recently (I would say in the last month or so) I've been getting this strange error from the IDE when opening projects and vis from the labview "Getting Started" screen (from any drive including C:\). It doesn't happen every time (maybe 1 in 20) and after pressing "retry" it will load the file.

    It happens in all LV versions and on different machines.

    I know there were murmurs a while back about seeing this in LV 2010 (with no resolution from what I could tell) but like I said. One of the machines has a 2 year old copy of LV2009 on it (and that's been rock-solid until now).

    Anyone else experiencing this or knows why this happens?

×
×
  • Create New...

Important Information

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