-
Posts
4,937 -
Joined
-
Days Won
305
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by ShaunR
-
-
Cool. I have done stuff where the Main App sends Status Messages to the Splash Screen. Can you go into detail about how the hierarchy works here?
Does the Splash Screen load the modules, then open the Main App so th modules stay in memory, then the Splash Screen goes out of memory etc... ??
Cheers
-JG
Pretty simple really.
The two main points are that the main VI's FP is hidden and it sends a message to the splash to tell it it's loaded.. You can either allow it to load in the background, or load it sequentially (I prefer the latter in case hardware checks fail).
The splash screen itself just loads a config file (usually a section in the main app coinfig), iterates through the file list, dynamically loading (but not closing the ref) on each iteration. You can wait til finished or not depending if you want it sequential or background loading. When it gets to the last one in the list it shows it's panel if the "ready message was received (queues work best for that) As each module is loaded, it remains in memory so you get incremental loading of sub-vis and when the splash closes, any that are only used by the start-up modules will be disposed of and any that are used by the main app will remain (that's why I don't like namespacing and generally prefer llbs or directories over lvlibs).
The key really is dynamic loading which means the splash is very quick to show regardless of the number or size of modules it needs to start up. Comms from the modules can be anything you like, queues, events even pass a string ref via thier front panels when you launch them. I tend to use named queues though (see my Non OOP version of the .Message queue and replace the A,B with the vi name or Dispatcher for my most used architecture which revolves around 1 VI).
-
Pretty basic I know, but it works.
I have other apps where the Splash Screen can create a log of the session, checks for driver version (DAQmx, dotNET) etc...
I would like to add more features into the reusable code that I have in these other applications when I have the time.
Good idea about using a VI tree!
I do something pretty similar (without the vi tree). Only I also have a "config" file that tells the loader what to load (I usually have modules that need to check 3rd party hardware as well as DAQ etc, and feed that back to the splash so you see "Loading....[module name]") - they change from project to project)
-
Nice! I leave town for a few days and this is what happens...
10 points for trying, but my wife beat you to this about 6 months ago
I bet she gave you a better dress-sense than I, too.
-
An for all the heathens out there. Here is the NON-LVOOP version (just changed the VIs)
.
Even I was shocked at 1.13MB for the classes implementation
(the nonlvoop is only 108K)
-
You can write to the description of all (or one) of the vi's in the llb when you build (run a separate VI or link in with the builder). It's a shame the VI revision number or history isn't as flexible......., then it might actually have a use.
-
Or you could just use a string (SCPI format works well) and save yourself 3 weeks work.
-
; or maybe it was "launch ALL the missiles".
I want one of those VIs! I can use it when my "mute manager" vi fails.
But I know what you mean. I find it a bit "irksome" (not only in labview but in other languages too) that it is assumed you have 3rd party dependencies installed.
-
You are correct, i am trying to generate pulses to rotate my stepper motor as a first step, my final task is a bit more complicated (sadly) . I will give the "Cont Write Dig Port-Int Clk.vi" a try and I will be back with feedback, thanks a lot.
My final target is to:
a) send a pulse to rotate my stepper motor
b)after the rotation is complete i want to send another pulse to an MCA device ( multichannel analyzer) to "tell" it to start counting -the voltage coming out of a PMT tube-
c)after the counting is done, the MCA will send another TTL pulse to inform my program that it has finished and
d)it will also send a varying signal in the order of ~mV which i want to collect and graph in my front panel at LabVIEW.
e) This procedure will repeat in the speed and step of my choice.
The controlling of the MCA device is easily done by an other program called Maestro so adjusting the time that the MCA will count and sending of the TTL signal to LabVIEW is rather easy.
I want to ask whether this is possible by modding the "Cont Write Dig Port-Int Clk.vi" or i will have to use a handshaking vi (?).
AGAIN sorry for the super lengthy post but i believe the better you ask the question, the more likely is to get the answer you seek.
Thank you
It's always good to give a background on what you are trying to achieve. I means you will get a more focused answer.
So. You just need single pulses (an event generator) rather than a pulse train.
There are quite a few ways you can do this in labview. But I've modified the example to just give one pulse as you are familiar with the vi. It's fairly straight forward. Set the OP high. Wait a bit. Then set it low.
For ryou incoming pulse. Take a look at DAQ events. (There is an example). You can then wire the digital out to the digital in and check to see that you can create and detect the pulses.
-
I don't think the example is wrong either, I m probably using it the wrong way, here it is:
That example is to demonstrate manually toggling single lines. I think you are trying to generate pulses. Yes?
Look at the "Cont Write Dig Port-Int Clk.vi" in the examples. Change the "Pattern" to 0 and 128 and then run the vi.
-
<br /><br /><br />
I was just about to say that!
Seriously though, I'm seeing a 2-3x speed improvement on my laptop (IE8) and about a 5x speed improvement on my smartphone (Opera 9). Anyone else getting a different experience when compared to the previous host?
Surprising! Set up the "mod_expires" then it'll be really humming along.
-
Here's the link to NI's web site for VDM / LabVIEW compatibility :
And here's the one for IMAQ
-
Antoine -
Shaun -
Will this work only with Labview 2010, or will it work with my 2009 version?
Thanks for the help
Yes. It supports 2009 x32 & x64
-
Interesting. I'll look into it further. I hope LV2010 doesn't have a bug.
George
That means it has only been assigned a generic class. If you right click on a control (for example) and "select IVI class" then it will return that class you choose.
-
There's a couple of property nodes TypeClass and SubTypeClass which will give you the class names. Is that what you are after?
-
I went on the NI website, and I can only find the file for IMAQ 3.1.3, not 4.5. SEE LINK:
It's bundled as part if the Vision Acquisition Software
-
I'm not sure if it is that easy. I am pretty sure the web page must be hosted as a static document in the web service. Most modern browsers (Firefox, Chrome, and maybe IE) prevent cross-server requests, which have the potential to be dangerous. I would start by making a hello world HTML document then staticly adding it by following these directions http://zone.ni.com/r...tatic_content/.
Then you can use ShaunR's information. If you really want to do an AJAX call simply I would look over jquery library. That is how I learned basic web page development.
Website is back so, so read the page. From what I could see, the OP must have already done that as it is working.
I'm ot not really sure if x-domain is relevant to that anyway. All the XMLHTTPRequest would be doing is sending a "GET" to the server on the same domain as the page was served (just as if the page was refreshed....but without refreshing it). It's not as if it would be opening an 3rd party site in an IFRAME (which is where you get problems).
I'd be interested to learn what problems you encountered and (probably more importantly) what you did to get round it.
-
I'll yield that you know best.
Probably not..lol.
I don't have much experience with streaming from the NI webserver (for example). I prefer other methods like TCPIP or websockets for that - they don't have such issues and (IMHO) offer better performance. But for normal HTTP requests (on the server side) it can be as simple as a PHP script on the corporate server that uses cURL to resend the request to the NI server and relay it back to the browser (easier than trying to get proxies and stuff authorised and set up by IT). As such, the corporate server is indistinguishable from a browser as far as the NI web server is concerned (and if you want , you can do caching and stuff too). It keeps IT happy since their portal is still the entry point and secure behind their firewalls and security policies, It obviously has an impact on performance - but it's not much for get/post methods through an Intranet, It also makes aggregation of multiple LabVIEW machines a breeze. It's one of the few scenarios where IT are actually useful
-
I'm not sure if it is that easy. I am pretty sure the web page must be hosted as a static document in the web service. Most modern browsers (Firefox, Chrome, and maybe IE) prevent cross-server requests, which have the potential to be dangerous. I would start by making a hello world HTML document then staticly adding it by following these directions http://zone.ni.com/r...tatic_content/.
Then you can use ShaunR's information. If you really want to do an AJAX call simply I would look over jquery library. That is how I learned basic web page development.
I cannot read that document at the moment - NI down again (might have read it in the past though). But from experience, most uses of the NI web server are to make VIs available internally within a company (managers and engineers looking at production etc - Intranet). therefore x-server really isn't an issue. When/if external access is required, usually IT insist that any requests are routed through their main servers anyway, so the browser requests it from a page on the corporate site and the request to the NI web server is sent from the corporate site. So the content seem to come from the same (corporate site) domain as far as the web browser is concerned..
-
+1 on can't upload.
Couldn't upload a VI (64K) and a snippet. Just said "the upload failed". (Tried in Chrome, IE and firefox-no dice).
-
To add another layer of complexity, we usually use the registry for product application settings
Making excellent use of LabVIEWs x-platform capabilities then
-
2
-
-
I have written an app for a client and included a couple web services to pull some data. Works great.
I was wondering how difficult it is to design a simple web page that can take advantage of the web services; Specifically, how hard is it to have the user click a form button, have that call the web service and then pull data out of a specific XML field and update the page? I know this could get pretty involved, but basically I was hoping to write a simple web page with a table and update values in the table from the web service; I was hoping NOT to have to do this down at the labview level- although that might be what I have to do.
-jed
Just attach the updateData to a button Onclick event.
-
Windmill and kick is my favourite
-
1
-
-
An interesting API was recently discussed with me. Apparently you can use the ActiveX/.NET register event node to register standard LabVIEW UI events (through UI refnum). Why might this be interesting you might ask? Well for a long time I have thought that the deviation between queues/event structure was unneeded. This suspicion was reinforced when the topic came up in the CLA summit. The queue and the event structure have a lot of overlap. The question is should the two implementations be merged?
I've talked with some who think that the event structure is more data flow oriented, but I am not entirely convinced.
Just so you can test it, here is some example code I posted to benchmark the callback API (ActiveX/.NET) and the dynamic event mechanism
It depends on what you mean by "merged". I use named queues rather than a named types which means that (amongst other things) I can send a string across the network and dynamically create a queue with that name at the other end.. I can't think of a way (off the top of my head) that I could easily do that with events. But generally. I think queues are easier to use since you just grab a reference by the name from any module without having to run wires or store the ref in a globally accessible storage. But apart from that. Yup. they are pretty similar (maybe because events use a queue?).
Interesting to note that there is about 20% a difference in performance though (although I haven't looked closely at the test method)..
-
NEWS: JGCode's got Rythem
in LAVA Lounge
Posted
OK. you get a point for being a smart arse