-
Posts
1,209 -
Joined
-
Last visited
-
Days Won
47
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Francois Normandin
-
Hi Pravin, the code attachment is missing. Suggestion: Find the coordinates (x & y index in the image array) of the dots with a color threshold, then use the "Draw Line" vi in the Picture functions.
-
You've got it, we need the VI server types to be thralled like LVOOP.
-
The result is not the same with OOP. Check this example where the wires for parent and child classes are different. The same thing is not true with VI server references. A boolean reference that runs through a control reference will still contain the boolean reference number, but the wire will be a control reference. You need to recast to boolean to be able to call methods that act on booleans.
-
I'd like to propose we establish the yearly "Mark Balla Award" for the LAVA member who should be commended for having performed the most selfless act(s) of support to other LAVA members. The award would be in honor of Mark Balla, who has done more then anyone has ever did before to bring support to a new premium member. The yearly member elect for this prestigious award would be known at the LAVA BBQ and would receive his/her prize from the hands of Mark Balla himself. For the occasion, let's all thank Mark and click the little green button at the bottom-right of this post. It's the one that was the starting point of his long-lasting effort. Kudos Mark.
-
When you reach 0x500
-
Done. (see v 1.2.0.7) With a bonus: mD Array to nD Array ==> insert Build Array when m < n & insert Index Array when m > n. <object id="scPlayer" class="embeddedObject" width="514" height="424" type="application/x-shockwave-flash" data="http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/jingh264player.swf" > <param name="movie" value="http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/jingh264player.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/FirstFrame.jpg&containerwidth=514&containerheight=424&content=http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/singular%20to%20array.mp4&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/" /> <iframe type="text/html" frameborder="0" scrolling="no" style="overflow:hidden;" src="http://www.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/embed" height="424" width="514" ></iframe> </object>
-
If NI says it's impossible, then I guess you should believe them. There might be a workaround for you to achieve the same result but at the expense of more complex code. You cannot get a reference to a single array element, just a reference to the type of element. Hence, modifying its background color will change it for all elements at once. If you absolutely need to change the background color of individual cells, then you should take a look at Multi-Column Listboxes (MCL). The Item Names property lets you set the values from an array of strings and the MCL allows for single cell differentiation (color, font, background, etc.)
-
If you're a newbie, you should definitely try the LabVIEW Help. There are tutorials but also a huge archive of all you're looking for starting in LabVIEW. If you don't find it there, start by searching the forums for the answer before posting. <object id="scPlayer" class="embeddedObject" type="application/x-shockwave-flash" data="http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/jingh264player.swf" width="1036" height="632"> <param name="movie" value="http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/jingh264player.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/FirstFrame.jpg&containerwidth=1036&containerheight=632&content=http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/newbie_how%20to%20search.mp4&blurover=false"> <param name="allowFullScreen" value="true"> <param name="scale" value="showall"> <param name="allowScriptAccess" value="always"> <param name="base" value="http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/"> <iframe type="text/html" style="overflow: hidden;" src="http://www.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/embed" width="1036" frameborder="0" height="632" scrolling="no"></iframe> </object>
-
How To REad Open Office File In LabVIEW
Francois Normandin replied to pravin's topic in Database and File IO
Hi Pravin, the RGT addon, as pointed by Shaun, is an incomplete suite that creates only Writer's odt files. The framework can be extended for Calc as well but I never got to continue working on it. It is still marked as "beta" because it is not complete. It's OOP based and extends NI's refactored RGT. If you want, install it and take a look at the code. You can probably extract enough information to customize something for your need. It is based on the .net AODL libraries. There is a link to the development site of AODL on the discussion page. You don't need to make it OOP to make it work. Create a reference to the ODS document and work from there with the iContents and iTables/iCells that are specific to Calc. All you need to get started is to have the AODL dll accompaying your code. BTW, AODL = An Open Document Library -
reference to private data
Francois Normandin replied to vivante's topic in Object-Oriented Programming
Simple answer. The Class Private Data is stripped from its Front Panel in the build process (no way to change this that I know), so we can't get a reference to the specific values on the FP... no FP ref => no data cluster ref => no controls references. Thanks buddy -
reference to private data
Francois Normandin replied to vivante's topic in Object-Oriented Programming
You will not be able to work on your Private Data at runtime. Creation / Removal of controls and indicators can only be done in the IDE and when the VI is Idle. If you want to get a reference at runtime, your best chance is with the Open VI reference and wiring "classname.lvclass:privatecontrolname.ctl". AQ mentioned that simple trick is a thread I have not taken time to find again. But the result is the same, you can't modify data at runtime. I haven't tried if you can even read it at runtime. I'd be really surprised if you could, because there's no reason to be able to get a reference one way and not the other. It's the same reference after all. Let us know if you succeed at runtime. Probably you need to create a private method in your class to support this, instead of going to the Private Class Data directly. -
Perhaps something like a Gantt Chart would help NI show us the real progress that is being made on solving the issues. <a href="http://content.screencast.com/users/normandinf/folders/Jing/media/736d1d4c-cc7b-4ad2-aa5c-33bdaf16d442/2010-10-14_1505.png"><img'>http://content.screencast.com/users/normandinf/folders/Jing/media/736d1d4c-cc7b-4ad2-aa5c-33bdaf16d442/2010-10-14_1505.png"><img class="embeddedObject" src="http://content.screencast.com/users/normandinf/folders/Jing/media/736d1d4c-cc7b-4ad2-aa5c-33bdaf16d442/2010-10-14_1505.png" width="1284" height="163" border="0" /></a> (not real data BTW)
-
[CR] LVOOP Event Handler
Francois Normandin replied to Francois Normandin's topic in Code Repository (Certified)
Hello Neil, that's it. Isn't it wonderfully simple? Kidding aside, the FGV is the only VI you will need if you use this piece of code. I plan to add stuff in the palette in the form of "Drop VI Content" to speed up development around this FGV... but essentially, this VI is the core of my way of handling LVOOP events between processes. Eventually, there might be a series of low-level objects that might be distributed with it, but that's the cherry on the sundae and some programmers might not like cherries after all, so we'll see after I show some examples. I didn't find time in the long weekend to finalize the examples I want to share. For now, it's might not be obvious how I intended people to use it, and I apologize for that. I'll have a demo on how you can "pimp" your state machine template and certainly a small real-world application to remove some fog around it. -
[CR] LVOOP Event Handler
Francois Normandin replied to Francois Normandin's topic in Code Repository (Certified)
There was a switched connector on the Preserve RunTIme Class primitive that escaped my initial tests. This caused a problem for child classes not recognizing that they were allowed to subscribe to certain events. This is corrected in 1.0.1. Sorry for this. -
I concur. Next time I ask myself whether or not to choose a database implementation or simple binary files to store data, I'll try to find some time to try these first...
-
Name: LVOOP Event Handler Submitter: François Normandin Submitted: 07 Oct 2010 File Updated: 03 Jan 2011 Category: LabVIEW OOP LabVIEW Version: 2009 License Type: BSD (Most common) LVOOP Event Handler v1.0.1 Copyright © 2010, François Normandin. All rights reserved. Author:François Normandin Contact Info: Contact via PM on www.lavag.org LabVIEW Versions: Created and tested with LabVIEW 2009 Dependencies: openg_appcontrol 2.10 openg_error 2.3 Description: This is a package that provides the framework for a LVOOP Subscribable Event Handler. Processes can dynamically register new events and list the classes that are allowed to subscribe to it. Once a TopProcess takes ownership of the Handler, it manages a Global Stop event and a Handler Activity event to inform subscribers that a new event has been registered with the handler. All subscribers can then get a list of all the events they are allowed to subscribe to. Everything is done through events with LVOOP LVObject as a backbone. The subscriber will then be free to implement its interpretation of the subscribe event content when received, by casting to the known object types. Instructions: After installing package with VIPM, refresh palettes if VIPM is not set to refresh automatically. Use palette to find the LVOOP Event Handler. Select the Event Handler VI and drop it in your application. There is a test program that shows how data is exchanged between three dummy classes. You can open the front panel of the Event Handler to see what are the actual allowed subscribers for which event owner. Known Issues: Acknowledgements: History: v1.0.0: Initial release of the code. (2009) v1.0.1: Fixed a wrong connection with the "Preserve RunTime Class" primitive where children classes were not considered as such when a parent class was passed. Better error handling on Destroy Handler command. (Caused a code 1 error when event destroyed by owner prior handler command. Added the Event Description string to the connector pane. License: Distributed under the BSD license. Support: If you have any problems with this code or want to suggest features: please go to www.lavag.org and Navigate to the discussion page. Distribution: This code was downloaded from the LAVA Code Repository found at www.lavag.org ============================ How it works: This framework consists of a FGV Event Handler that manages the interactions between publishers and subscribers to events. It consists of some commands that allow the use of generic LVOOP events. It allows the owner to control a Global Stop command, which can be listened by any VI. Once initialized, any process can register its own events and choose which classes are able to subscribe dynamically to it. A generic event notifies all subscribers to a change in the list of the events available, so that no VI needs to poll constantly to detect the new events or unsubscribe from events that are unregistered by its owner. Commands: 1- Initialize Handler: The first VI to call the initialization takes ownership of the handler. All other calls before the handler is destroyed will return an error. 2- Subscribe: Default case. When a VI subscribes to event, it will receive a list of all events for which it is allowed to register. Then the VI can decide what it does with the incoming data on that event channel. 3- Register: Any VI can register an event refnum (LVOOP type) and decide which object types can subscribe to it. If no input is provided, or if LVObject is in the list, then all are allowed to subscribe. A notification is sent via the Handler Activity event. 4- Unregister: Any VI that owns an event can remove it from the list. A notification is sent to everyone that listens to the Handler Activity event to prevent the need for poling. 5- Global Stop: Only the owner of the handler can call a global stop. It is meant to protect the integrity of the program should a subscriber decide to play god. 6- Destroy Handler: Releases the command to any process that wants to initialize it. It also erases all events still registered. It can only be called by the Handler's owner. *************** There is an example VI in the LVOOP Event Handler palette. Click here to download this file
-
Version 1.0.1
1,960 downloads
LVOOP Event Handler v1.0.1 Copyright © 2010, François Normandin. All rights reserved. Author:François Normandin Contact Info: Contact via PM on www.lavag.org LabVIEW Versions: Created and tested with LabVIEW 2009 Dependencies: openg_appcontrol 2.10 openg_error 2.3 Description: This is a package that provides the framework for a LVOOP Subscribable Event Handler. Processes can dynamically register new events and list the classes that are allowed to subscribe to it. Once a TopProcess takes ownership of the Handler, it manages a Global Stop event and a Handler Activity event to inform subscribers that a new event has been registered with the handler. All subscribers can then get a list of all the events they are allowed to subscribe to. Everything is done through events with LVOOP LVObject as a backbone. The subscriber will then be free to implement its interpretation of the subscribe event content when received, by casting to the known object types. Instructions: After installing package with VIPM, refresh palettes if VIPM is not set to refresh automatically. Use palette to find the LVOOP Event Handler. Select the Event Handler VI and drop it in your application. There is a test program that shows how data is exchanged between three dummy classes. You can open the front panel of the Event Handler to see what are the actual allowed subscribers for which event owner. Known Issues: Acknowledgements: History: v1.0.0: Initial release of the code. (2009) v1.0.1: Fixed a wrong connection with the "Preserve RunTime Class" primitive where children classes were not considered as such when a parent class was passed. Better error handling on Destroy Handler command. (Caused a code 1 error when event destroyed by owner prior handler command. Added the Event Description string to the connector pane. License: Distributed under the BSD license. Support: If you have any problems with this code or want to suggest features: please go to www.lavag.org and Navigate to the discussion page. Distribution: This code was downloaded from the LAVA Code Repository found at www.lavag.org ============================ How it works: This framework consists of a FGV Event Handler that manages the interactions between publishers and subscribers to events. It consists of some commands that allow the use of generic LVOOP events. It allows the owner to control a Global Stop command, which can be listened by any VI. Once initialized, any process can register its own events and choose which classes are able to subscribe dynamically to it. A generic event notifies all subscribers to a change in the list of the events available, so that no VI needs to poll constantly to detect the new events or unsubscribe from events that are unregistered by its owner. Commands: 1- Initialize Handler: The first VI to call the initialization takes ownership of the handler. All other calls before the handler is destroyed will return an error. 2- Subscribe: Default case. When a VI subscribes to event, it will receive a list of all events for which it is allowed to register. Then the VI can decide what it does with the incoming data on that event channel. 3- Register: Any VI can register an event refnum (LVOOP type) and decide which object types can subscribe to it. If no input is provided, or if LVObject is in the list, then all are allowed to subscribe. A notification is sent via the Handler Activity event. 4- Unregister: Any VI that owns an event can remove it from the list. A notification is sent to everyone that listens to the Handler Activity event to prevent the need for poling. 5- Global Stop: Only the owner of the handler can call a global stop. It is meant to protect the integrity of the program should a subscriber decide to play god. 6- Destroy Handler: Releases the command to any process that wants to initialize it. It also erases all events still registered. It can only be called by the Handler's owner. *************** There is an example VI in the LVOOP Event Handler palette. -
Three inches of resolution from space in 1964... How come they don't know where Bin Laden is? Or do they?
-
Disabled & Grayed Out doesn't support transparency
Francois Normandin replied to Francois Normandin's topic in LabVIEW Bugs
CAR # 252080. -
I was thinking of corrupted files when I sent you the test VI. But it's so rare... Concerning your questions, it surely is possible to use the events to do what you want. You need to activate/deactivate the events based on the last action performed. Wiring a constant to the references deactivates them, and wiring the correct reference activates them. Establish a list of the sequences you need to achieve what you want and code them accordingly as shown in the VI I posted. (1) What's the detailed list of user interactions for this? That's what you need to code. Ex: When left-click is detected, show the scroll down pictures and activate two choices: a) if mouse leaves, close the drop down menu or b) if user left clicks again, select it. In the example I showed, I used the Mouse Up event, but if you replace those by Mouse Down, it might work without further modifications. Try it, and if you don't succeed, upload your modified code to show what you tried. (2) You could add to the code to check for a condition when the user selects a picture that should have a second drop down menu to show this second picture array (make it visible) and position it where the user had clicked. Configure the events to react exactly the same way has for the first array of pictures (select or hide) depending on the mouse down/leave events. (3) You'll notice, in the Event cases, that there is an inside terminal with a list of things like buttons, coords, ctl ref, etc. The button terminal lists which button is activated. I'm not sure how you can scroll your list with the scroll button of the mouse, but it might be doable. Never tried that.(I don't think there is a "Mouse Scroll?" event)
-
I think the pictures are there... What is the size of your images??? Resize the picture frame in the array to show more if needed, but if they're huge, use an image editor to reduce the pixels to what you need to display in the array. I used a 32x32 picture, but enlarge it to what you want. It doesn't have to be square. However, the array elements are not resizing automatically to your picture size.
-
Isn't the array intersection the result of the terms present in both arrays? You show the list of terms that are present at least in one, not both.