-
Posts
291 -
Joined
-
Last visited
-
Days Won
10
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Omar Mussa
-
QUOTE (jcarmody @ Oct 31 2008, 11:36 AM) Hi Jim, I reviewed what you did. I have a few comments for various states in your state machine -- a lot of my comments would require re-designing the code so take try to think about them from the perspective of 'design' considerations rather than purely from an implementation perspective: Macro: Initialize -- While it is possible to use the state arguments for things like cycling through stations, and setting the wait times, it is not really a scalable solution. For example, let's say I want to have 100 stations -- I can't see scaling up Macro: Initialize to handle this situation -- so I'd try to redesign the code to handle N cases Sequence: Wait -- You may be doing too many things in this frame -- you are waiting, starting to wait and checking if wait is complete -- maybe more frames would make this easier to follow -- for example: Sequence: Start Wait, Sequence: Wait, Sequence: End Wait -- personally I don't like to have a frame do too many things or it gets hard to manage later because you have to remember what the frame is doing in a given context. You could also add a state variable boolean called 'Waiting' that could make the code easier to use in other cases... Also, generally it is a bad practice to have a state send the state machine to 'Idle' because at that point a user may click a button and your 'sequence' will get interrupted -- its better to do some work, when done, go to Idle case Sequence: Wait for button --This is actually not how the JKI State Machine is intended to check for button presses. You should handle all button presses in the event structure that is in the 'Idle' frame. You should be able to use the Boolean.Value Changed event to know when a button value has changed and the event will return the exact button-- set the boolean to 'Latch when released' to get the same results as what you are doing. There shouldn't be a need to 'find' the button that was pressed. For example , the Exit button (OK) is more appropriately set up. Sequence: Next station -- Really this is a 'Sequence: Increment station' case. Maybe a better solution is to have a 'Sequence: Set Station' case where the station can be an argument. Why limit yourself to incrementing? Good luck and hope this helps with future designs for your applications! Omar
-
Need LV users to help change English language (and possibly other
Omar Mussa replied to Aristos Queue's topic in LAVA Lounge
QUOTE (Aristos Queue @ Oct 22 2008, 04:11 PM) I'm not sure why B, C, F are the 'sourcenders' for node E -- I would have thought from your description that 'B, C, D' are 'sourceneders' and the word I would really use to describe them is 'intermediaries'. I'm confused why you are forced to make up words. I thought you had to be POTUS to do that -
QUOTE (NeilA @ Sep 2 2008, 01:50 AM) The EasyXML licensing terms are 1 license per developer. We do not have any limits on distribution on number of development machines, number of computers, or number of applications or anything that should feel restrictive to the developer. EasyXML is not open source, if you have a technical issue or feature request please use the http://forums.jkisoft.com/index.php?showforum=29' rel='nofollow' target="_blank">JKISoft EasyXML discussion forum and let us know!
-
QUOTE (jlokanis @ Aug 28 2008, 01:04 PM) JKI has a really easy to use toolkit called the JKI EasyXML Toolkit. Its designed such that all you have to do is to define a cluster that matches your XML structure and you're basically good to go. You can find out more on www.jkisoft.com/easyxml. Here are screenshots of how the data would be parsed using our tool, I've also attached the VI that was used in the screenshots. [Front Panel] [block Diagram] In order for the attached VI to run, you'll need to install the evaluation (or professional) copy of EasyXML. You can get it from the jkisoft website here: http://www.jkisoft.com/easyxml/download/ Go to jkisoft.com if you have additional questions on our solution. QUOTE (Omar Mussa @ Aug 28 2008, 03:12 PM) JKI has a really easy to use toolkit called the JKI EasyXML Toolkit. Its designed such that all you have to do is to define a cluster that matches your XML structure and you're basically good to go. You can find out more on www.jkisoft.com/easyxml. Here are screenshots of how the data would be parsed using our tool, I've also attached the VI that was used in the screenshots. [Front Panel] [block Diagram] In order for the attached VI to run, you'll need to install the evaluation (or professional) copy of EasyXML. You can get it from the jkisoft website here: Go to jkisoft.com if you have additional questions on our solution. Apparently Philippe posted at the same time I did, but luckily our solutions are the same
-
How to store pictures in a Oracle database using labview
Omar Mussa replied to ad_dekkers's topic in Database and File IO
QUOTE (Rammer @ Aug 28 2008, 06:26 AM) I worked on a project in the past that used an Oracle database and we found that we couldn't write more than 1000 points either so we basically broke up our data into chunks of 999 points. I didn't like the solution because it made it hard to get the data back (had to join multiple rows from the same results table), but it worked. On a side note, there's another issue that is sort of related that you can sometimes run into - I think there is a limit to how long of an SQL string you can execute using the ADO based toolkit VIs so you might want to be aware of that as well. I don't recall what the string length limit is. -
QUOTE (Gabi1 @ Aug 25 2008, 12:37 PM) As long as it is your hobby/passion than it is worth it as you'll get the joy of a 'do it yourself' experience. If you are thinking it will cost less than going out and buying a 'universal remote' I think you are better off plunking the $ due to the time investment you'll inevitably make.
-
QUOTE (Daklu @ Aug 22 2008, 12:26 AM) Actually, passing the string is probably better than writing it to file -- as you can keep everything in memory. Good one. QUOTE (Daklu @ Aug 22 2008, 12:26 AM) Is the workaround flattening the variant to a string? That might work -- you should try some prototyping and see for yourself Make sure to reply to this thread on whether it worked for you or not! In my project where we planned on using variants, the goal was to pass configuration data clusters of wildly varying types between LabVIEW/TestStand as variants. We ended up using a functional global in LabVIEW that stored the configuration data and having to basically create a custom TestStand type for each configuration (which sucks because it is harder to maintain as now our 'Types' are defined in 2 places -- a LabVIEW Type Definition and a TestStand Type Definition). Another thing that is bad is that TestStand doesn't have an equivalent to LabVIEW's 'Apply Changes' when it comes to changing the TestStand Type definition so you have to manually update every step that uses your custom type whenever the type changes.
-
The care and feeding of Sequence Structures
Omar Mussa replied to eaolson's topic in Application Design & Architecture
QUOTE (eaolson @ Aug 21 2008, 08:08 AM) The are occasionally necessary to help enforce data flow. For this reason alone, they should not be banned. But they should be avoided for almost all other cases in my opinion due to their inflexibility. -
QUOTE (Daklu @ Aug 20 2008, 05:21 PM) Actually, this is not a silly question. I don't know if NI has even tried using LV Classes in TestStand. You may be sort of stuck in a sense ... TestStand can't even properly pass Variant data to LabVIEW... A workaround exists but it kindof sucks ... I think your best bet will be to flatten the class to string and basically write it to file and just have TestStand pass around a filepath to the Class data. I have a feeling that this is your best option. On the plus side, if TestStand has issues, you'll be able to inspect your LV Class data and have a really good idea of what happened during the test that crashed. On the negative side, you can't use TestStand to actively 'use' the data in your LV Class. I'm not sure exactly what you intended to do with the classes from within TestStand -- hopefully your only goal was to pass them from one step to another. If you had other ideas, please post and maybe a solution exists but I'd be surprised. QUOTE (Daklu @ Aug 20 2008, 05:21 PM) I designed and implemented an entire class heirarchy with the idea of using TestStand to glue it all together. I plunked my first VI using a class and discovered TestStand doesn't know what a class is. Any idea how to pass an object from one VI to the next? (I sure hope the last months of work hasn't been wasted.) Well, no offense but the lesson learned is PROTOTYPE before you dive in too far (a month is WAY too far). If you can't get a prototype to work, you need to find a solution or redesign -- tech support or forums are helpful for that too.
-
QUOTE (NeverDown @ Aug 19 2008, 07:44 AM) That's one way to do it -- but you may end up missing out on something and can lose work. The whole reason that you get the .r2, .r3 is so that you can choose to resolve the conflict with 'use mine' or 'use theirs'. Also, sometimes its really helpful to be able to tell what the differences are in the conflicted VIs (you can open them with LabVIEW and use their comparison/merge tool). When you are done you can mark the conflict as 'resolved' (I believe this will delete the .r2, .r3 files but not sure). This gives you the power to not lose work by comparing what the differences are in the conflicted files. Another way to get rid of conflicts is to delete all your local changes (or move them to a temp folder), and do a revert on the folder. That will get you to the latest state (based on the update that gave you a conflict). Now you can copy the files back from temp folder into your source folder and they will appear 'changed' (as opposed to 'conflicted') and you can commit them to your repository.
-
QUOTE (pallen @ Aug 19 2008, 06:40 AM) Disk space is cheap. At the worst case, buy an external USB or Firewire drive and transfer data. QUOTE (pallen @ Aug 19 2008, 06:40 AM) Seeing as how it's possible to save for previous versions, is it necessary to keep both 8.5.1 and 8.6 installed on the same machine if I want to provide occasional support for a couple of 8.5.1 programs? If you can't test the code, how do you know if it works?
-
QUOTE (crelf @ Aug 9 2008, 07:51 AM) I'm sure we wouldn't mind helping NI free up some session rooms by presenting in the keynote instead
-
QUOTE (Ton @ Aug 2 2008, 05:53 AM) I had the same issue :thumbdown: . The only way I got around it was by installing LabVIEW on a virtual machine that had no other NI products installed.
-
QUOTE (jgcode @ Aug 1 2008, 04:30 PM) This is cool! I've been looking at the examples and I have one question for anyone else on the bleeding edge... I can't for the life of me figure out why the 'Weather' data service data output renders into an html table but the 'LV Queue Server' renders straight XML. Is there something I'm missing? I want to display the raw XML output from the Weather example in my browser, I don't want an html output. Is it because the weather service is using shared variables? Is it because the variables are in a library? I don't get it. QUOTE (Omar Mussa @ Aug 1 2008, 10:19 PM) I can't for the life of me figure out why the 'Weather' data service data output renders into an html table but the 'LV Queue Server' renders straight XML. I actually found out something useful from an NI webcast :thumbup: So I'm posting the link to it here: http://zone.ni.com/wv/app/doc/p/id/wv-810 (the solution to my problem is in this webcast) ... ok just in case you're too lazy, there is an option under 'Source Files' and the only way to get there is via the 'Configure' button on the 'Source Files' tab in the build rules of the web service.
-
QUOTE (Aristos Queue @ Jul 29 2008, 02:24 PM) I'm glad you caught this :thumbup: I noticed having performance problems (especially for classes with a large amount of data -- such as a picture control with a large image on it) but never knew why... I use this node all the time in my LVClass code so I think I now have the answer. I don't know if I like the workaround though: QUOTE (Aristos Queue @ Jul 29 2008, 02:24 PM) LV class developers should avoid using the To More Specific node to do type testing -- use dynamic dispatch subVIs instead One thing I've been meaning to do for a while but not had a chance to do is to understand exactly 'when' a LabVIEW class becomes locked. For example, if I have a plugin system, I don't want my class to be locked until the class has been 'plugged in'... (because I want to be able to edit the class for as long as possible). However if I have a Dynamic Dispatch VI, the class is immediately locked in my project (whether or not I have instantiated it) as soon as the plugin-loader runs. This behavior makes it hard to work on plug-in classes while the plug-in loader is running (if you're using Dynamic Dispatching). Hence, I've been avoiding dynamic dispatching on plug-ins... (I know, that sounds like a silly statement but my plug-in interface is pretty simple). Am I basically stuck now having to go back to the dynamic dispatching world and having my classes getting locked un-necessarily just because they happen to be in my .lvproj file? Or is there some way for me to get a class to become 'unlocked' while the plug-in loader is running?
-
QUOTE (GreatVIEW @ Jul 28 2008, 11:20 AM) Maybe what you should do is look at your application design more carefully. You may need to separate the GUI layer (for example, the value that is input on the front panel) from you application logic (ie, don't just automatically use the value the user entered in your application). This could be done in conjunction with using Norm's "brat" concept or an Xcontrol.
-
QUOTE (iowa @ Jul 23 2008, 11:54 AM) Its really unlikely that anyone is going to have the time or interest in building an example that controls the Windows Calculator... However if you feel it is worth your time to do this and post the resulting VI(s) to this thread, then other people will very likely look at your code and try to tell you how to improve it.
-
QUOTE (iowa @ Jul 21 2008, 10:12 AM) Anything's possible... I know you can simulate clicks/keyboard presses but am not sure about reading visible text without serious effort. Here's a http://zone.ni.com/reference/en-XX/help/371361D-01/lvexcodeconcepts/ex_3_call_the_win32_api/' target="_blank">link with an example to calling Windows API functions. Someone's probably got a library with mouse/keyboard API calls for LabVIEW somewhere...
-
QUOTE (neB @ Jul 20 2008, 06:26 AM) Cool, I will try to check it out.
-
QUOTE (neB @ Jul 19 2008, 06:52 AM) I have no idea how to check an OS scheduler to see which VI is running. I guess I only care about Windows apps in my case. Here is my goal... I have a state machine UI. I want to be able to run a supervisory VI that monitors the state machine and can log every VI that was actually run/called (as opposed to just being in memory) until the state machine completes. I was just about to give up on this but then I realized that the LabVIEW VI Profiler basically does what I need to do (and more). Unfortunately I am not sure how it does this... Any ideas? (Is it checking the OS scheduler? -- that would be surprising since it would mean there would be a different flavor of the VI Profiler for each LabVIEW OS version supported).
-
QUOTE (Karissap @ Jul 2 2008, 12:55 AM) Ya, I was looking for something that wouldn't require any code modifications to the existing code. QUOTE (pikapp506 @ Jul 18 2008, 12:20 PM) I'm not sure about version 8.2, but is there the hightlight execution button on the block diagram of the VI your inquiring about? I'm looking for a way to do this programatically.