-
Posts
2,397 -
Joined
-
Last visited
-
Days Won
66
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by jgcode
-
QUOTE (normandinf @ May 13 2009, 10:07 AM) Dude I don't even think its out yet. Major release are done at NI WEEK. This is a major release. The only place I have seen its name is on Darren's Blog. Unless I, like you, have been left behind!!
-
Programmatically get Strictly Typed VI Reference
jgcode replied to jon_mcbee's topic in Application Design & Architecture
The CBR node "blocks" the thread its in i.e. the called VI must complete execution before returning its outputs (which obviously makes sense) through the node. With the Run Method you have the option to spawn a new thread. However in the app when a new plugin command is generated, it has to unload the first VI, wait for notification from it that it has completed running (last thing it does before it goes out of memory), then launch the next plugin VI. Otherwise if you don't wait you have potential race conditions. Aside from passing data into out of a plugin VI, the CBR node is handy in the fact that it sequences the code. And you can easily standardize a connector pane; Either Variant In/Out at top and Error In/Out at bottom. This will maintain any new data added to your application. Or you could have simply Error In/Out for each VI and load/read data from a shared resource FGV/GOOP/File etc.. But the cost of the CBR is usually another loop I have to maintain, so I am with others, and 95% of the time I spawn the VI using the Run Method. -
Dynamic Dispatch: Convert To Sibling
jgcode replied to jgcode's topic in Object-Oriented Programming
Thanks everyone. Very much appreciated Will look at all the above, make some changes and let you know -
Red File = Red colored class in picture - is a file format of a KKD File DP & For = Displacement and Force - is a processing method of a file but is not tied to a specific format. Class Hierarchy KKD File as Parent Red File as Child of KDD File DP & For as Child of KDD File Problem I want to select a file format e.g. Red File Load File Method then call a processing method e.g. DP & For Process Method Essentially I have different file types AND I have different processing methods for files. Both operate on KKD File Class (which contains the data) but I want to be able to choose the format AND processing method - not have the processing method tied to the file format or vice versa. I tried to downcast to the parent then upcast to the processing method? The above generates an error (due to dynamic dispatch I guess) but is there a way to do this? Can I jump through the hierarchy like this? Can I code the above somehow? Or can anyone suggest a better class hierarchy? I was trying to avoid a separate independent class as both classes operate on a File so I thought they should inherit from KKD File and be siblings? Any suggestions? Cheers JG
-
sh..are you can?????? Sorry couldn't resist
-
QUOTE (Chris Davis @ May 5 2009, 07:25 PM) Amen to that and to OGPB.
-
Thoughts on large amount of config data
jgcode replied to dblk22vball's topic in Application Design & Architecture
QUOTE (mesmith @ May 5 2009, 08:41 PM) Good summary tho! Also MGI VIs can take any data - it does not have to be cluster. We use XML configs a bit e.g. for RT when the user does not have to see the contents of the file. I.e. like in the cRED. Maybe this toolkit would be good for you to clean your XML so it is human readable? If there is no constraint for the file to be human-readable (which was not mentioned) then you could also use datalog files. But I preferred the auto-conversion features of MGI and OpenG VIs for most apps when the typedef changes. However, another thing I am currently playing with is config/file versioning. I.e. setting data to default is ok sometimes, but other times it might be more appropriate to insert a known value and alert the user that the defaults have changed. The idea being that on an upgrade (i.e. new release to client) these files can be read back in and handled appropriately if the file structure changes to the new version. The old file or section then gets re-written in the new format. Plus old keys are cleaned up. This is used only if it is appropriate for the application. All this happens within a class so its nice and encapsulated. The only thing to do is save out the typedef and version it on Release in my project so that is does not ever change. I kind of set it up like how an XControl reads its Library Version and acts appropriately on running init ability. -
Thoughts on large amount of config data
jgcode replied to dblk22vball's topic in Application Design & Architecture
QUOTE (dblk22vball @ May 5 2009, 08:11 PM) By far the easiest way is MGI or Open G solutions. The hard work is already done for you! When working with classes I currently like to do this (props to MGI). This way makes a lot of sense to me. Both sets of VIs are elegant solutions for any size application - Get VIPM to install both! The only time I do what you have done is on a Windows CE (last time I used it on a TPC config VIs do not work) and when I want to write my own style or format of file. I recommend this book: Oldie but a goodie. There is some interesting ideas on config management. A Software Engineering Approach to LabVIEW (National Instruments Virtual Instrumentation Series) (Paperback) by Jon Conway (Author), Steve Watts (Author) But unless it is a requirement then why bother - use the above VIs! I currently write to multiple files for config data. One thing I am currently looking at is protecting the config file if I want multiple classes to read and write from the same file. Obviously using different section names - but I mean the problem is config files can be opened and manipulated by simultaneous read/writes! I am still playing with this but thought I'd mentioned it and am looking forward to what others say! -
QUOTE (asbo @ Apr 16 2009, 11:11 AM) lol :laugh:
-
Can I make an array with strings and doubles?
jgcode replied to Scooter_X's topic in Application Design & Architecture
QUOTE (JustinThomas @ Apr 8 2009, 12:57 PM) You can sort a 1D cluster array with the native LabVIEW function. -
QUOTE (flarn2006 @ Apr 6 2009, 10:11 AM) I have it in 8.6.1
-
QUOTE (Kal @ Apr 4 2009, 04:17 PM) Thanks Kal. I was told by NI Support that this configuration is correctly setup to use an external timing source - i.e. the clock is supplied by the NI 9237 module. Are you saying this is not an external clock?
-
QUOTE (Kal @ Apr 3 2009, 07:00 PM) Unfortunately both gave the same results. Cheers JG
-
[cross-post to ni.com] Hi I am trying to setup a buffered counter acqusition (correlated) using compact DAQ. Hardware: cDAQ 9172 chassis Slot 1: NI 9237 (AI Bridge used as an external timing source only) Slot 5: NI 9411 (High Speed DI TTL) I have to use the extra module to export it's clock as I am using the internal counters in slot 5. 1) Is this hardware compatiable? 2) If so, any suggestions on how to get this to work as I am having trouble running it. I use the following parameters which works fine for an On-Demand sampling - it reads back the expected value from the sensor. But when I switch to Continuous the I get a timeout error. However, if I use simulated hardware through MAX I don't get an error and the buffer fills on the screen. Any ideas? Regards JG
-
LabVIEW creates broken Data Member Access VI
jgcode replied to Michael Aivaliotis's topic in Object-Oriented Programming
QUOTE (Michael Aivaliotis @ Mar 28 2009, 05:36 AM) I think it works fine unless the control is a type def. Seems LabVIEW can't handle it?? -
QUOTE (Neville D @ Mar 20 2009, 05:25 AM) neBulus and Neville D Maybe this would have helped? Real-Time Target System Replication I haven't used the code personally but I know they exist as I was investigating for a similar thing for a project that went cold last year. Now there is one for FPGA too. FPGA Target System Replication Cheers JG
-
What knowledge other than LV should you know if you are a LV programmer
jgcode replied to GSR's topic in LAVA Lounge
QUOTE (JohnRH @ Mar 16 2009, 08:29 PM) I agree but would like that 4) Should be Oscilloscope + Function Generator, PSU's DMM etc.. and would like to add: 6) Ability to generate Documentation (Specs, Requirement Docs, Tests etc..) 7) Code in Web Technologies e.g. HTML/XHTML/Javascript/Ajax/PHP/MySQL 8) Proficient with Source Code Control 9) Personality (for programmer-client interaction) 10) Knowledge of system integration If everyone who posted gave 5 responses we could get a very good list going! -
QUOTE (RAJKU @ Mar 15 2009, 03:02 PM) Without looking at any code - Make sure you are specifying the correct LabVIEW application instance. In the development environment you may not have a problem but... By leaving the name empty when creating the app reference - the exe will be referring to itself. But in the exe you want the reference to refer to an instance of the LabVIEW dev environment (so LabVIEW dev environment can open the VI/BD via VI server - as the Run Time does not have this functionality). Could this be a source of error for you?
-
QUOTE (Ic3Knight @ Mar 8 2009, 05:44 AM) Hi Paul The FP refnum control/indicator breaks because when you right click the control reference and select create indicator/control it is not linked to the typedef file. It only contains the a snapshot of the current datatype. This will be the case of other datatypes that can change also e.g. clusters, enums (tab)... Check the video below (no audio) to see one way on how to link the FP refnum control/indicator to the typedef file. Regards JG In the video I create a tab typedef control, Then I create a control reference and a FP refnum control/indicator, I then edit the FP refnum control/indicator so that it is associated with the typedef control, I use the run arrow because sometimes it seems the datatype checking is done at run time (so if it appears broken sometimes its not - and vice versa). Sometimes I also make the FP refnum control/indicator a typedef so when I use it in clusters I know it is correctly linked and not a snapshot of data. This can catch me out, no different to when you create a constant off of a Value attribute of a generic property node for an enum/cluster datatype!
-
QUOTE (student11 @ Mar 7 2009, 10:31 AM) Hi Student - check these links for some background info. http://en.wikipedia.org/wiki/Uninitialized_variable Functional_global_variable Regards JG
-
QUOTE (Linx @ Mar 7 2009, 07:50 AM) Hi Linx. Just wire the data output of the DAQ Assistant Express VI into your "data" waveform graph. There is no need to use the lower level drivers with the DAQ Assistant to perform a finite (N samples) acquisition. Regards JG http://lavag.org/old_files/monthly_03_2009/post-10325-1236393850.png' target="_blank">
-
Solution in cross post.
-
I installed LV8.6.1 Dev Suite the other day and on reboot my Taskbar in Vista had changed! On another reboot it went back to normal. Weird!