-
Posts
4,936 -
Joined
-
Days Won
304
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by ShaunR
-
Filling a cluster with strings and arrays dynamically
ShaunR replied to jbone's topic in Calling External Code
Xnodes don't quite work like that (you would think it was similar to an Xcontrol...But it isn't) They are basically pre-packaged script nodes that are programmed to generate code when executed. So the xnode in question has lots of script to create a CLN and all the function parameters to interface to the DLL. The result is that at some point (not sure exactly when, maybe after compilation, or when you press the run button) the xnode runs, then creates the code and it is this generated code which runs in the place of the xnode - In this case a CLN in the UI thread. It's a lot of [script] code to generate a relatively small amount of real code that could have been created as you described and wrapped in a polymorphic VI for the adapt-to-type (no need for the intermediary DLL then and it wouldn't have to execute in the UI thread). -
Filling a cluster with strings and arrays dynamically
ShaunR replied to jbone's topic in Calling External Code
Xnodes don't quite work like that (you would think it was similar to an Xcontrol...But it isn't) They are basically pre-packaged script nodes that are programmed to generate code when executed. So the xnode in question has lots of script to create a CLN and all the function parameters to interface to the DLL. The result is that at some point (not sure exactly when, maybe after compilation, or when you press the run button) the xnode runs, then creates the code and it is this generated code which runs in the place of the xnode - In this case a CLN in the UI thread. It's a lot of [script] code to generate a relatively small amount of real code that could have been created as you described and wrapped in a polymorphic VI for the adapt-to-type (no need for the intermediary DLL then and it wouldn't have to execute in the UI thread). -
Depends on which way you are looking at it......... Set it up once in MAX (make sure it all works). Export an nce file. Add it you your project. and set it in the installer. Once you build your installer you will only need to put it on a CD or USB stick or whatever and install it on any machine So effectively you use MAX to create your hardware "template" and then roll that out with the installer which will take care of configuring the target machines hardware. Your software will always use the same taks/channels regardless of which machine it is on and, as long as you put the C ID and DEV ID somewhere (file name is good if you just want to see at a glance in xplorer without opening files), you'll be able to track the results to the hardware. I would suggest also adding the date to the file name (e.g 2001-01-21) in that order then when you view the results you can sort them in explorer. Additionally, you can set the file date as a directory name and store your results by date making it easy to identify what was tested on which days. But it's just personal preference (one directory with lots of files or a few directories with a few files)
-
Use the same name (in the tasks/channel/hardware configuration) or all the DAQ devices (say cDAQ). In your results file also save the DAQ devices serial number (you can read this using a property node shown below) and the computers ID (anything that identifies a unique computer - computer name, network card, IP address, HD serial etc). This way the executable will run on any suitcase, with any PC/DAQ (as long as they are all the same) but will save data that is traceable to a particular suitcase PC and/or a particular cDAQ.
-
Strings are arrays of bytes.
-
A normal non re-entrant VI is a singleton
-
Set the vi to subroutine (assuming you are using a sub-vi vi in a for loop) and you'll probably halve those times
-
Nothing in comparison to dynamic dispatch.
-
Filling a cluster with strings and arrays dynamically
ShaunR replied to jbone's topic in Calling External Code
Well. I thought I'd get my hands dirty and take the xnode apart. You are right. It doesn't just call moveblock. In fact, it doesn't call it at all!. It calls "GetValueByPointer" in "lvimptsl.dll" (that might call moveblock). But, more importantly (as you surmised), it does this in the UI thread (presumably because the dll isn't thread-safe). So. You're on a roll , That's the reason it's so slow (and totally unusable for 99% of my apps). But your suggestion works a treat -
....done that...bought the tee-shirt.....
-
Thats ok. Just write a quick proxy filter to modify it on the fly (if your not using firefox). Make sure you add to the version info field "IT ARE ANALLY RETENTIVE NUMB-NUTS " (in capitals so it's easy to spot in their logs) Oh the joys of local admin privileges
-
The point is. Under windows. No dialogue based password system is 100% secure whether it's from NI or not (although I bet NI wouldn't have to spend as long as me circumventing VI passwords ) Password protection is like a key to your front door - it only keeps out law-abiding citizens Of course. I'm a law abiding citizen, so I would never consider circumventing NIs protection .
-
Well. I think that's a bit extreme. That's like saying it's not programming unless it's POOP . Whilst a network interface can be used to achieve decoupling. I don't think it's a requirement - just an implementation method,
-
How to know the available function's parameter list?
ShaunR replied to Breakpoint's topic in Calling External Code
I thought exactly the same until I had my 4th cup of coffee -
The open vi reference will supply valid reference (ignoring projects for now). But the "compile" property will fail with 1040. (See attached) Nothing is password protected with time and soft-ice It just depends on how badly you want it (in most cases for me....not badly enough...lol)
-
How to know the available function's parameter list?
ShaunR replied to Breakpoint's topic in Calling External Code
Well. It's open source is it not? You only need to download the source and look at the function prototypes. It will also give you all the header files that you will need for passing structures. -
I'll make a note and update the indicators- if/when I revisit them. As I say in the description, they were written in 1998 (many years before x64) and you are getting them "warts-'an-all". If you collapse the directory structure you will see that the windows DLLs are in the Root.. They are automagically added to the dependency tree by the project manager.
-
Probably the IT virus . Speak to your IT dept and ask hem if thy have done a restore recently.
-
Turning off "Loose fit" and "autoscale" not working for you? (since you are specifying the scale)
-
The for loop will execute the number of times of the elements in the smallest indexing array regardless of what you wire to the N terminal. The N terminal is only of consequence if you have no array indexing or if the value you wire is less than the smallest indexing array.. I expect one of your data arrays is only 1 element in length. This, for example, will only execute 3 times because the shortest indexing array is 3 elements long.
-
Naaah. 4 LDR's (2 per axis) driving the motors in proportion to the difference in intensity. Doesn't get simpler (or cheaper) than that and is self calibrating for lighting levels (ok. I'll give you the night , but the device will be pointing at the ground since its tracking the sun ) But the OP wants to use a camera with a pencil stuck through a piece of paper. So I would suggest a concentric rake which will give you the position (quadrant) and length in 1 measurement.
-
Don't tell me. Let me guess. You can only use their search if you have a paid subscription
-
Making customers pay for bug fixes is indefensible. Making a bug fix release that trashes your installation because you haven't paid is just plain boorish.
-
Also crashes on LV2009 SP1 x64 but not on LV2009 SP1 x32. (both Win 7 x64)