Jump to content

ShaunR

Members
  • Posts

    4,856
  • Joined

  • Days Won

    293

Posts posted by ShaunR

  1. That would be enough to make me nervous. I consider it best practice to leave all DLL calls in the UI thread unless the call you're making has explicit documentation stating it is "thread safe". Otherwise, correct me if I'm wrong, nothing is stopping LabVIEW from making parallel calls to the DLL which might stomp on some static memory. Maybe that's just a legacy of my C days and I'm being a curmudgeon, but my understanding is that's why the UI thread is the default for CLFN nodes? Now I do trust Shaun quite a bit, but he's not NI so I doubt he knows exactly what's going on under the hood of that call...

    It's a good point. I have never seen it defined explicitly that "all LabVIEW.exe calls are thread-safe" (perhaps someone from NI could clarify). Or indeed (by extension) a definition of those that were or were not. However, thread safety is usually defined on a per dll (or in this case per exe) basis. So if the LabVIEW.exe wasn't thread-safe. I think we would all be in trouble. Anecdotally, I have never run into any problems assuming it is. Thats not to say that NI have not ensured all calls are indeed thread-safe on the assumption that no-one outside of NI without the internal knowledge as to what call is and isn't thread-safe. But I would be very, very surprised if they were mixed and matched within the exe.

    Saying that. Calls to the labVIEW.exe that involve the user interface I do not make re-entrant on the assumption that it is a call within the UI thread. So if any were going to be an exception, it would probably be those.

  2. What I did with PassaMak was that the engine would exclude any controls where the caption wasn't visible (it too used the label as a tag). The user then just showed the label instead of the caption for that "ignored" control/indicator. But as Yair said, it isn't common and it doesn't really make any difference if you do add all controls since who expects a control on a preferences dialogue not to remember what you put in it?

  3. Yes, as per the VIPM info screen in the OP there are some dependent packages.

    Thats a pity since I don't use VIPM or the tools:(

    Not sure what you are referring to here - can you go into detail? Thx.

    Nevermind. I think I got the wrong end of the stick. I thought it was adding a page to the LabVIEW preferences (from the LabVIEW toolbar).

    Still sweet though.

  4. The This VI reference is probably also redundant - you can get it inside the subVI.

    Ditto with the get config file.

    This is sweet. Huge improvement on the original. Nice work.

    One question. Does it need the openG tools intalled on the users machine? (i.e what about distribution of the developers toolkit that these settings apply too)

  5. 1. if i go for 64 bit compatible LabVIEW software, is this good than 32 Bit? How and why?

    Install both anyway, then if you run into problems with the 64bit (tookit not supported etc), you can just recompile and continue in the 32 bit version.

    Q. If I own a copy of LabVIEW 32-bit, do I need to purchase a separate license for LabVIEW 64-bit?

    A. Every customer who purchases LabVIEW 2009 or LabVIEW 2010 has a license for the 64-bit version.

    Source

  6. Yes, the VIs that ship with LabVIEW do support determining if a variant contains an LVClass instance.

    post-17-0-12963200-1318192122.png

    I'm fine using this where needed, but I'd love to have a native implementation in the OpenG LabVIEW Data Tools Library.

    Native implementation, to me, means that it uses primitives other than a Call Library Function or Code Interface Node (unless it's to call to LabVIEW.exe and the code is guaranteed to work at Run Time in both desktop and real-time).

    I guess I don't really trust stuff that's inside password protected VIs and that's not in the palette. It could get removed or put into an LVLIB and scoped as private ;)

    Me neither.

  7. for a generic deveopment system this is the sort of thing I look for:

    • As many slots as your desk can handle (14 is typical - mixed, PCI, PCIe of varying 1x, 8x etc)
    • AGP graphics card and slot (don't use up your precious PCI, PCIe slots)
    • at least 1x9-way Dtype serial port (most have two).
    • a parallel port (always handy for quick DIO).
    • As many USB as you can find (typically they come with 2-4 but there is usually support for more on the motherboard via a breakout to the rear-buy the breakout with the PC because they are hard to source separately).
    • At least 2x GB ethernet ports (make sure one is a "Intel Pro 1000" so that vision can use the NI high performance driver)
    • at least 1x RS485 port (make sure it supports 4 wire although usually you can get away with one that only support 2-wire for most things).
    • Fastest, meanest processor that the person who owns the purse strings will let you have.

    Wordsworth are a safe bet in terms of support and product longevity for out of the box solutions (but expensive).

    Protech are where all industrial PC manufacturers get their SBCs and backplanes from if you want to build your own.

  8. Well. In that case you have two options.

    1. Use a look-up table (which you have already said you don't like)

    2. Ascertain the baud characterisitc and calculate it.

    Baud rate generators are a function of the processor clock. So if you find one here that closely matches your ring control, you should be able to work out a function for calculating it for that device [i.e that devices clock - most use 18.432 MHz if they have any sense, e.g. UBRR = (18432000 / (16 x Baud rate)) - 1].

  9. Using a web-server in the past has fixed my XSS issues (among other things).

    I am interested to try out the switch you have posted i.e. does it allow cookies to work in chrome?

    No-eyed-deer. This is purely a mismatch in the URI which chrome resricts by default (firefox, Safari and explorer don't exhibit this behaviour). I have only had this problem with websockets since I have never had the need to send cookies from labview. So I guess if your cookie issue works in the other browsers but not in chrome, then maybe it will solve it- you tell me ;)

  10. I noticed that you had this in your JS

    top.wpSend = wpSend; //for sending webpanel msg from HTML if SVG is embedded. Firefox 4 only (no Chrome)

    I'm guessing this comment is because you get a x-server script error when using chrome to access a "file://" URI (i.e a local file rather than an "http://" URI). You can override this limitation by launching chrome with the command-line switch "-allow-file-access-from-files". You should then be able to connect after opening an html file on the local file system without an error.

    • Like 1
  11. This is a simple example of the sort of thing I do with initilising/launching sub processes.

    The top example is fully synchronous and will launch the vi and wait until it gets the feedback from that VI before proceding to the next.

    The bottom one is the sort of thing I do mostly since it launches and initialises all the vis and then just waits until it gets the responses back. You can make it as complicated as you wish (check the responses rather than just waiting for a set number as I have shown or "gathering" them in a while loop instead of a for loop) however I think you can see the pattern.

    You will notice I am not talking about a "controller" here because it depends where you are using this. Generally, the UI will talk to a controller (you may have more than one e.g IO controller or sequence engine) and the controller will use this to launch its sub vis.

  12. A naive British student facing ten years in chains and how our half-witted politicians play poodle to America

    Read more: http://www.dailymail...l#ixzz1jpz2P0eW

    He won't be extradited...watch this space ;) They are still trying (unsuccessfully so far) to get McKinnon and he actually hacked the pentagon.

    So, you're saying that the good and benevolent leaders of the US would never put presure on other countries to do what they want?

    http://arstechnica.c...-censorship.ars

    Br, Mike

    I quite like the first comment from the link that Phillip posted

    I quite like the Yanks as a whole but I'd rather deal with them from a little less up their backsides, if possible.

  13. NeoCons? SOPA and PIPA support and legislation funding is coming straight from Hollyweird and the music industry. Not exactly right wing. It's the left that consistently wants to obfuscate the truth and choke the free flow of information. Where do you think the now-defunct "Fairness Doctrine" came from? And who wants to bring it back? The left. My $0.02

    "Fairness Doctrine"? Never heard of it (can't look it up on Wikipedia either :D )

  14. The "even those in the U.S." is important, because one of the main arguments for the legislation is to prevent foreign "rogue" sites that are up to no good, at least as has been reported in plenty of the media I've seen. I have not read the bills, but apparently there is no actual distinction between domestic/foreign even though it is one of the very arguments used to support the bill, so the powers granted could be applied on domestic terms.

    That is a misnomer (and a common one) since foreign sites are not bound by US laws. The only thing realistically that can be achieved (as they do in Thailand) is restrict access to those sites from US governed territories. Good luck with extradition on SOPA grounds too.

    For example. In the UK they have introduced a law that any business web site must provide a notice that you will be setting cookies on a users machine and only do so with their consent (opt-in). Does it apply to NI sites in the US? Nope. Does the US care? Nope.

    I get really tired of the "Axis of Evil" arguments to stir up nationalism (not directed at you, just it's always the justification for anything unpopular both here in the UK and in the US). Politicians can no longer promise us dreams, so they promise protection from nightmares. It's the cold war mentality that really belongs in the 20th century and has done nothing for a safer world. Rather, it has ridden rough-shot over civil rights because we have believed it.

  15. I find it a bit bizarre that the link you posted keeps saying "even those in the U.S". It is a proposed U.S. law, is it not? Therefore it is "Only in the U.S".

    But this is just the tip of the iceberg IMHO. It's not about IP or copyright. It is about control over the information to the masses and the excuse is IP/copyright. The quicker the US and Europe gets rid of it's NeoCons. The happier everyone will be.

    • Like 1
  16. Usually, each "module" will have it's own command queue and they will all use a common "status" queue rather than separate queues to feedback to the master.

    The thing to bear in mind is the topology. Queues are "Many-to-one". So for the commands, you can have many modules/controllers/whatever placing commands on that one modules queue. In reverse, you also have a "many-to-one", but now it is many modules placing status info on the controllers queue.

    Another way is to use a single "Control" notifier (a notifier is a "One-to Many") for the modules and each module filters the command sent. This has the advantage that you can "broadcast" to all modules things like Start, Stop, Pause etc which are global to all modules, but still enable defined commands for single modules which the module responds to. It has the downside that you can only have 1 command in the pipe at any-one time so for sequencing you have to arrange for some other mechanism. But the difference in this case is responsibility. The module is responsible for actioning the messages (shutting down, starting up etc) and the "Controller" just becomes the orchestrator. This is what I term "Autonomous Modules" and greatly simplifies the upper hierarchy at the expense of more complicated modules.

    You can also use a combination of both. for example, I may have a command "Queue" but broadcast back information via a notifier (great for UI stuff)

  17. Disclaimer: I have 5 years of LV experience. I don't have any certifications (except CLAD) because my company values experience over certificates.

    My disclaimer is that I currently have no LV certifications because my company is basically me, I don't need to present qualifications re: my programming to others for vetting (because I don't consult on LV). But I have been using LV since 98. So I've seen a lot of versions....

    I haven't had any certifications for about 10 years now. There's plenty of code and entire applications I've written out there if people wish to judge my abilities (or not as the case may be). CVs and certs are no substitute for "been there, done that, look at the code". However, in the absence of such, they are the only measure.

  18. To me it kinda makes sense. It is a symptom of having no way to destroy an object. The by-val way of creating a pseudo-destroy method is as you describe in No3 since you can clear the array which is a surrogate for destroying the objects. You then pray to the great god MemMan and hope that the garbage collection will get rid of allocations (or at the very least, reused). The by-ref is a way of achieving the same pseudo-destroy, since you can destroy a ref (and just ignore what it returns).

    The difference in the destroying is that the owner is responsible for destroying the objects, rather than a function of whatever object you want to get rid of. In LV it's not a biggie because you have no control over de-allocations anyway, but in other languages you may have several different de-allocation procedures to satisfy that the owner may not be aware of.

  19. Shaun, I think LAVA would be in the clear under the safe harbor provisions of DMCA. Now, if SOPA passes, LAVA would be screwed, so everyone call your reps and senators and tell them to stop that trainwreck. But assuming sanity prevails, it would only be the LAVA users who download the code and use it that would be open to lawsuit threat.

    Well. I'm no expert on US law (nor care much about it) but to qualify for safe harbour policies in most countries, they require some sort of condemnation and clear statements that it will not be tolerated (this is what the T&Cs are for).

    If I create an original work and post it to the NI forums I own the copyright and grant a perpetual license to NI that allows them to do what they like with my copyrighted work.

    Nope. They can't do what they like with it. Their T&Cs only allow them to admonish distribution. You are not granting any license, that requires a document.

  20. Thanks for the link Ton. I'm definitely going to spend a bit of time looking over those.

    I think 2009 was the latest version I've tried scripting with. The traverse vi shown in Jim's post wasn't available as far as I know, but boy it sure makes scripting easier. I still have to create a scratch vi to figure out the name of the object I'm looking for, but the whole process is much easier than it used to be. Now I just need to spend some time figuring out the available documentation tools and seeing if I can simplify my process.

    It is available in 2009. It just isn't in any of the palettes (it's in vi.lib/utility/traverseref.llb).

    • Like 2
×
×
  • Create New...

Important Information

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