Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jgcode

  1. QUOTE (Eugen Graf @ Jun 13 2008, 05:29 AM) For parallel loop I use what NI label advanced producer consumer (events) a lot. If the VI is a GUI then normally I run an event loop, main loop and a gui loop at a minimum. If I have DAQ then I might have another control loop and sometimes a process loop if I want to pipeline my processes. I use queues with an enum (state) and variant (data) as the datatype. If I use anything less (e.g. notifier, single datatype, single loop event state machine), the program always grows and I have to upgrade it to this so most of the time. So I start with this template even if it is overkill to begin with. I also like to create FGV wrappers to manage the queues in which the refnum persists, so its neater, easier to manage all the queues and I can call them from anywhere. Each queue has its own manager so its not a large shared resource. I use User Events to communicate back to the Event structure if I need it e.g. on error or when I want a force closed etc... If I ever want to create a resource that sits in the background (no UI) then its the above with the event stucture and the gui loop. I like having muliple loops as it loosely couples everything (logging, DAQ, control, processing, GUI updates, plugins) etc.. this allows me to reuse code alot. Using a templates its not much work tho to set it up. So if it was a small app and I could do stuff in one loop, I can, as quickly, build up the same thing with templates and I have a more scalable piece of code if required for the future.
  2. QUOTE (crelf @ Jun 12 2008, 09:43 PM) Can't I just put on an Indian accent?
  3. QUOTE (SciWare @ Jun 12 2008, 07:24 PM) Well, I have explicitly not put it on my laptop as I want to discover the problem (but I am sure if I do it will work). Funny thing is after I ran your code a few times, my refs that didn't work - worked! :headbang: My code was exactly like yours. <edit> I have seen weirder things. I am going with bug? Have just ran 8.5.1 in VMWare - works fine no problems. Looks like I will upgrade methinks. Now I can finally play with Active that works!! :beer: dude </edit>
  4. Thanks Kurt - bloody ripper. Due to an error I couldn't get past the Automation Open VI when I linked the _Application ref. I thought I was doing something wrong i.e. maybe due to the object I was linking to! But your ref is the same and I ran your code and it worked fine! I have seen this before - I copied an Active X example and their ref worked, I tried to generate one in the same VI and it wouldn't work. Funnily enough - I can now create a ref that works! But my lappy still has the same problem! I am coding in 8.5, but I just ran a VMWare 8.2 copy and it has the same problem. 1) Has anyone else seen this? 2) Am i doing something wrong? 3) Is there anything I have to do (refresh type library)? Cheers JG
  5. Just like you can open MS Word/Access etc.. with ActiveX can a Labview executable open the LV development environment using ActiveX Can anyone post an example? Is this the type library to call?
  6. QUOTE (menghuihantang @ Jun 12 2008, 12:56 AM) This may help? QUOTE (NI) You must create a callback VI to handle events from Active X controls when the controls generate the registered event. The callback VI runs when the event occurs. To create the callback VI, right click the VI Ref input of the Register Event Callback function and select Create Callback VI form the shortcut menu. LabVIEW creates a reentrant VI. Open the VI end edit the BD to handle the event.
  7. QUOTE (neB @ Jun 11 2008, 10:04 PM) This is one of my answered questions... keen to here veteran advice....
  8. We use Norton Ghost. But interested to see if anyone recommends other products and what there experiences are...
  9. QUOTE (Aristos Queue @ Jun 9 2008, 07:45 AM) Thanks heaps AQ! :beer:
  10. Hi I want to open a ref to a VI, make changes to the front panel, launch the VI in a subpanel, then close the VI and do not need to save changes. I want to open a weakly typed reference to make the FP changes (for reuseable subVIs) and I need a strictly typed to use the call by reference node. My questions are: 1) Can I coerce between the weakly typed and strictly typed refs? 2) Is there any problems with having two refs open at the same time as I launch the plugin - should I clean up my refs a different way? (NB: I have to keep the VI in memory to keep the changes or I will lose them). For Q1 I thought maybe something like this may work? But not. Cheers JG
  11. Definately can be done in DAQmx using the DAQmx APIs. Can't confirm NI-DAQ. Which drivers are you using?
  12. QUOTE (hakannn @ Jun 6 2008, 07:37 PM) Making a 2D array is a solution for a waveform GRAPH Another solution is to use the waveform CHART like you have done and let the chart handle buffering (which is statically set). You may find handling your own buffer is more flexible, but if you are after a quick solution the chart is actually probably the easiest. If you need to save your scale and offset and the values do not change per collection then convert them to a string and write them to disk as a header in your collection file is an option.Do this before you enter the loop. If the values do not change there is no point continually polling the FP panel every time you do a read.
  13. QUOTE (hakannn @ Jun 6 2008, 02:27 PM) Hi Hakan It is collecting 5 signals and returning 5 pts of data and writing them to disk - which is fine. But for display you are taking that 1D array putting it into another 1D array (the waveform graph). What you will get is a large 1D array with all the channels interleaved (mixed up). You need to build up a 2D array. Examples of different ways to do it: 1) The picture shows one way but it is bad as it causes repeated memory allocations - but it illustrates the point. 2) Have a search on initialising arrays and using replace array subset. You will have to declare you array size before you enter the loop for this. 3) Build a circular buffer, you initialise this buffer, then when the display buffer is full, instead of overflowing, you overwrite the old data and your program can run for ever. 4) You may wish to use a second parallel loop to handle your display (depending on cohesion needs, aquisition speeds, time) etc... http://lavag.org/old_files/monthly_06_2008/post-10325-1212741824.png' target="_blank">
  14. Hi crelf I came across the same thing when I wanted to design polymorhpic "tool" VIs and distribrute them in .lvlib but keep the internals private as the point was to encapsulate using polymorphism. As it kept breaking my code, which I thought was unintuitive, I haven't gone back for a second try. Maybe there is a reason for it? But if anyone knows a work around - I am keen to know! Especially now NI have starred using lvlib, I bet we see them around more and more in the future. The ability you described would sure be handy for source distribution.
  15. QUOTE (Michael_Aivaliotis @ Jun 5 2008, 04:23 AM) We have to think twice about sending clients/potential clients to the website due to this! But I have to give them a pat on the back, their internal data gathering/management system is a well oiled fighting machine. The world is so horizontal now, and they have taken advantage of it. Can't fight it...just have to find ways to exploit it for our business, without occuring any negative effects.
  16. QUOTE (crelf @ Jun 5 2008, 05:37 AM) Haha...my boos started coding in like LV 1 or 2..sucker QUOTE (neB @ Jun 5 2008, 12:58 AM) Hi JG, I started before LV 5 so my list is much shorter than yours. The two things I miss are; 1) Re-size grab points were at the corners and not in the middle (I often sit and stare wondering when the grab point will show up) 2) Re-size objects dialog. Hi Ben Good call! Add 1) to the list - that annoys me so much I forgot to add it Haven't ancountered 2) ...yet...
  17. I would thought I would share a little insight into my head :ninja: Unfortunately there are parts of your work day that suck. I love programming in LabVIEW. I started in LabVIEW 8 and have never looked back - until recently that is. I can understand clients that prefer not to have code regularly maintained due to cost. But working on 8 year old code is a joke. Now I don't mind using LabVIEW 7 (even though there is no project) because you can do cool stuff like this or this. But I have had to use LabVIEW 5 a bit recently and it is enough to make a grown man cry (yes I have been known to cry over this) Here is a current list of things off the top of my head that annoy me (some might be attributed to options but I am not annoyed to look): :headbang: No project (I cannot live without my project) Unbundle/bundle must be statically set Cannot use auto-select tool (I cannot live without my autoselect tool) No autogrow on structures – code gets easily hidden Missing latest VI and structures that I am used to Different icons for common VIs (results in high usage of context help) Tunnels – what's with that! Is it auto indexed? Or is it not? No browse button on FP folder control Cannot delete from BD Cannot double click on BD terminal and go to FP control Cannot right click and select Open Type Def Its' slower I guess design patterns were being invented around then because I am yet to see one! It seems spaghetti is in and globals rule!! I have to work in a VM (which isn't that bad but I can't get VMWare to work with USB devices but that is another post...) And lastly it's just plain ugly So instead of turning this into a gripe about LabVIEW 5 I want to say thank you to everyone that has helped make LabVIEW into what it is today. People complain all the time, but right now every time I open up 8.5 I am in love again! I guess you can take stuff for granted, but even as a somewhat noob to LabVIEW coming in at LabVIEW 8, I realise I am very lucky to have all the features I have today that make me enjoy my job! Software is about the user experience and this user is satisfied! - so thankyou LabVIEW team (NI and LabVIEW Community). :beer: Word.
  18. QUOTE (Pollux @ Jun 4 2008, 10:09 PM) Sorry, yes any LAVA'ly people on this forum can do it :thumbup: assuming it contains compatiable features.
  19. QUOTE (Pollux @ Jun 4 2008, 10:13 PM) Hi Pollux Give this a go... it contains the Open G VIs as well in case you don't have them - but you should get them !! Download File:post-10325-1212591987.zip Code is in LV8.0
  20. QUOTE (neB @ Jun 4 2008, 07:18 PM) Nice post :thumbup: thanks Ben. Thats the funky algorithm I was talking about!
  21. Hi Pollux It is possible for the attachee to save in a lower required format with limits. For example in 8.5 you can save for previous versions (you can save code to 8.2 or even 8.0). I would suggest posting back in a thread and requesting a lower version.
  22. This should get you started.. Good luck JG Download File:post-10325-1212573974.vi Code is LV8.0
  23. QUOTE (ASTDan @ Jun 4 2008, 03:35 AM) I am a big fan of the NI courses. However, given that information in Intermediate I touches on LabVIEW Component Oreintated Design (LCOD) - or as NI call it Multi Functional VIs (MFVIs) - it is worth a mention to include A Software Engineering Approach to LabVIEW by Jon Conway & Steve Watts. Even though I feel this book is now a little (only a little) out of date in terms of LV8.5, new designs and examples, a lot of the principles are concrete. This book was a large stepping stone for me and it helped me a lot. Still a great read and reference book too! JG
  24. QUOTE (Tudor @ Jun 2 2008, 04:22 PM) Alternative solution? http://lavag.org/old_files/monthly_06_2008/post-10325-1212398470.png' target="_blank">
  25. QUOTE (Jan Klasson @ Jun 2 2008, 03:37 PM) Thanks heaps for the reply Jan - very informative. My questions have been answered! Thanks everyone :beer:
×
×
  • Create New...

Important Information

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