-
Posts
3,392 -
Joined
-
Last visited
-
Days Won
284
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by hooovahh
-
You are right to be worried about lighting. It is more of an art form and having something as open as this type of setup you will need to experiment alot to see what can be done. In the past I have seen a line scan camera where a light bar was directed right at the lens of the camera. This caused a saturation of all other light in the environment. I'm not saying to use this product but the light bar looked similar to this. This setup was for detecting objects falling and worked well because it was the only place where light was obstructed. In your setup a line scan camera coupled with a light bar might work as well, if you can mount some kind of light behind the steel strip. Then you'll see light where there is no steel, and you'll see darkness where there is steel. You'll then need to perform a binary threshold using some kind of tolerances or other image filtering, and then perform edge detection with a few degrees of rotation, and then some measurement for horizontal distance. Sounds fun, and doable just some time experimenting with setups to get it right.
- 8 replies
-
- width
- measurement
-
(and 1 more)
Tagged with:
-
Sorry I'm not answering the question you ask (because I don't use your messenger but do like it). But I wanted to mention that I love this type of feature. The majority of the time I have a state machine of some kind with a BFC (big cluster) with data I pull out and put into stuff and having it get the name from the data and making the name optional is a great feature. I wonder if it would be worth reading the Application.VersionYear and perform one set of code for 2011, and another for other versions? I realize this would add to the overhead so it might not be worth it, but if someone is concerned I'm guessing all of that overhead would be skipped if a Label name was provided.
-
Most Elegant Code to Close Multiple Reference Objects?
hooovahh replied to lvb's topic in LabVIEW General
I this case I would call that a feature, which clears the error, which is the intent. EDIT: I also like the idea of putting an X on VIs that run regardless of the error. I do this on driver level code I write for the close tasks but think it would be best to make it clearer. -
Most Elegant Code to Close Multiple Reference Objects?
hooovahh replied to lvb's topic in LabVIEW General
I don't believe it will. There are several functions (like Close VI Ref) that will function even if an error is passed in because it knows it is a cleanup operation and should try to run no matter what. -
Most Elegant Code to Close Multiple Reference Objects?
hooovahh replied to lvb's topic in LabVIEW General
Yeah stupid me forgot to test the type cast. In either case I can suggest an improvement. Turn on For Loop Parallelism for the for loop, and for the number of instances wire the array size. This way they will all be closed in parallel like your first post. To do this you'll need to remove the shift register, but again as stated we don't care about the error so just pass out the last one from the for loop and clear it. -
Most Elegant Code to Close Multiple Reference Objects?
hooovahh replied to lvb's topic in LabVIEW General
After a few tests I didn't come up with anything. I thought I'd be smart and use the Coerce to Type but it also only works with user events of the same data type. Another method was OpenG Variant to Array of VData, then Variant to Data, or Coerce to Type of a user event that is a variant type. That didn't work either. So my official solution is to change your architecture to either have all user events user the variant data type. Or only have one user event with the variant data type. And in both situations convert back to the usable data type where the data is used. Sorry I couldn't come up with something better. -
How to read quicktime videos (not via active x)
hooovahh replied to ThomasGutzler's topic in Machine Vision and Imaging
I can't seem to find it at the moment, but I remember seeing a post someone made at NI's forums where they used VLC to perform an operation similar to what you are asking using ActiveX. It didn't fully work but I saw what they were going for and maybe that is an option. VLC by the way plays just about everything under the sun and I'd be surprised if it didn't play mov files. Since I can't provide a link to that idea here is another topic very close recommending a command line call to FFMPEG which might be useful too. Oh here is another similar topic. -
I'm not apart of the beta, but if I was I think I wouldn't be allowed to answer that. I can say 2013 SPI doesn't have the type of functionality built in that you are looking for.
-
I've done some work on tables to make them more user friendly. Things like Tab, Enter, Shift+Tab, or Enter, formatting of cells to accept strings, or numbers or drop downs. All of these things are a manual process. LabVIEW gives you the controls to be able to do what ever you want, if you don't mind spending the time getting it right. I think some of the slowness you are seeing is because of custom cell formatting on each cell that you have. LabVIEW had a few functions for coloring an entire column, or row a specific color and that helps with performance, but having each cell individually colored is more difficult for LabVIEW. It even struggles with cells that aren't being shown. So if you have 10000 rows with custom formatting it doesn't matter that you only see 5 rows at a time. There are a few techniques to help with this, things like a virtual table that only shows 5 rows at a time, and it loads the data and formatting from some other location. Also in 2013 there were many improvements to tables and multicolumn listboxes to be able to handle this data a little smoother. It looks like you are on the right track, but unfortunately there aren't many native controls for what you want. I'm not sure your application but you could try to do some ActiveX and actually insert an Excel table in a LabVIEW front panel. I've experimented with this and had decent results, even with the free Excel for web pages can be inserted, but with limited functionality.
-
Controlling motors using a digital multimeter reading
hooovahh replied to jamest6's topic in Object-Oriented Programming
I probably spent more time on this then I should have but I got carried away. Basically you could do it with multiple loops but there really is no need, you are only going to be doing one thing at a time. This makes state machines a good design. I created a state machine that is string based using an event structure to handle the UI being interacted with by the user. You said you wanted to find the peaks but didn't really specify how long the test should run for so I added a control that at the moment defaults to 5 seconds. So after clicking start it will run for 5 seconds displaying new data on a chart, and keeping track of the first value, and the maximum value. At the end of the 5 seconds you click Exit and Log or close the window to save the data the same way you were before. I also added a splitter and resized the graph with the window. I don't think this does all you need but it is a good place to start and to build on without shooting your self in the foot. Efficiency Checker Hooovahh Edit.vi -
I usually recommend looking at one of the shipped examples. Search for Basic Serial Write and Read.vi in the Help >> Find Examples in LabVIEW. This VI shows how to setup a port with the baud rate, and other bit flow settings. Then you write a string, wait, then read the response from the serial buffer. If you have it working in MAX then it should work in here as well. I would normally recommend LIFA but if you already have the code the way you want then I can see why you might want to stick with it. For future projects you might want to try out LIFA. It basically does what you already did for many I/O. It has a base firmware you put on the Arduino, and then you have premade VIs that know what commands to write and read to get the response from the Arduino.
-
Experience with "Separate Compiled Code From Source"? (LV 2010)
hooovahh replied to Rob Calhoun's topic in LabVIEW General
I hope this is what you are talking about http://en.wikipedia.org/wiki/Teaching_grandmother_to_suck_eggs Never heard of it before. -
Experience with "Separate Compiled Code From Source"? (LV 2010)
hooovahh replied to Rob Calhoun's topic in LabVIEW General
I've been using it almost exclusively on all code in our reuse library and several projects from versions 2011, 2012, and 2013. I've had no issues yet. I've also inlined just about all I can in the reuse library as well without incident. -
I have and I maybe optimistic, but I think the community would benefit from it. It does have some quirks at the moment and you can shoot your self in the foot if you don't know the 2 or 3 rules when using it. I think I can have checks for these rules in the design with some extra coding but I want to keep it lean so I'm not sure what I want to do. The main benefit of what I have is the generation of actors, their methods, and even the basic project starting point is done through scripting invoked through the tools menu. This can be done also to add new methods to existing actors and projects. The main reason I haven't released it yet is it was developed on work time and it is used on several projects here. I've recently approached management asking them if I can post parts of our internal reuse library externally, hoping to get more things like this out there. They have yet to respond so I'm guessing they are ignoring my request. If that changes I will try to release all I can.
-
So like many other developers I have my own spin on the actor design. Had yours been developed when I needed it I may have used it instead but that's besides the point. With my actor implementation I have a actor dedicated to probing the other actors messages. This can be opened by going to Help >> Debug Application >> Actor Probe from the application so it can debug messaging in an EXE. I have a few things I'd like to suggest that you can choose to do or not. In my probe I have the option to allow the size of the history to be changeable. It's not necessary but some times having too large a history can add unneeded extra memory but at the same time when debugging you want it to be larger. I also added a Pause and Resume function because some times messages come in quickly and with a history size being limited I might want to pause and look at what happened while the application continues as normal. Lastly I'd recommend some way to look at the actual data that is being sent. I see you have something for this but for more complicated data structures I don't think you'll see the values. I highly recommend the Variant Probe. With this not only can I see the history of messages sent, I can also look at the actual data that is being sent with it. All of these things combined have helped me troubeshoot multiple applications when deployed and behavior can be slightly different then in a development environment. I do think having a DT between messages is a great idea and I may implement that in the future.
-
Usage of same code between different versions of Labview
hooovahh replied to Yaswanth Dontu's topic in LabVIEW General
So sorry I re-read my post and I said the wrong thing, I have edited my previous post to be correct. When DAQmx is installed it looks for all versions of LabVIEW installed that it is compatible with and updates those versions to have the DAQmx palette and functions. If you install LabVIEW after DAQmx then you will not have those functions. What needs to happen is to reinstall DAQmx if a new version of LabVIEW was installed after DAQmx. So again to recap, here is an example Install LabVIEW 2012 Install DAQmx 9.7 (this adds support for 2012) Install LabVIEW 2009 At this point you will have 2012 working with DAQmx but 2009 will not. If you then reinstall DAQmx 9.7 it will add support for 2009. But as I mentioned no version of DAQmx supports both 2009 and 2013. -
Usage of same code between different versions of Labview
hooovahh replied to Yaswanth Dontu's topic in LabVIEW General
If you installed LabVIEW after DAQmx you will need to re-install DAQmx. But even beyond that you won'd find a version of DAQmx that supports 2009 and 2013 according to this. http://digital.ni.com/public.nsf/allkb/B0D5630C0A50D5C6862578E800459248 In the past a virtual machine (or two real computers) helped with this so that you could have one version of DAQmx with 2009, and another version on a different computer with 2013. You still may run into issues since I'm guessing there are features in the newer DAQmx that aren't in the older. You might just want to develop in 2009 if that is the final form that the code will be in. Going to new versions is easy, going back is more difficult. -
I wouldn't think capitalization is the issue, simply because I thought that it defaulted to false. Meaning if there was no entry in the INI it wouldn't allow multiple instances, and only if you set it to true does its behavior change. Sorry never see this before.
-
Wow very cool. I'm sorry I missed you saying that the Write PNG file.vi didn't work on RT. In either case congratulations on finding a solution.
-
As usual a unlocked block diagram won't help. In most cases when a block diagram is locked it is for one of two reasons. The code is horrendous and was thrown together quickly for a uncommon function that NI doesn't intend on anyone but them using. Or (and this is the majority) the VI simply calls a Library or DLL function. In these cases I'm guessing NI just doesn't want you to know what the data type to the library calls are. In this case it is the second reason. But I'm guessing you can replicate the function by writing the file to disk and then re-reading it as binary. EDIT: Okay it was simple so I just wrote it. Not sure if it actually works. Image to PNG Data File Method.vi
-
I love that little VI. It is probably the easiest way to convert a System.Graphics PictureBox image to a LabVIEW image. You can invoke the save on the PictureBox Image saving it to a stream of bytes instead of a file. If you set the file format to PNG you can then use that string with the PNG Data to LV Image VI to get it back. Some things LabVIEW is better at as far as 2D picture controls, and some times the system PictureBox is better so this enables you to go from one to the other without having to perform any I/O operations on the disk. EDIT: Here is an example of reading a file with .Net, scaling it, saving it to a PNG stream, and then using PNG to LV data to draw the resized image again. http://forums.ni.com/t5/LabVIEW/Net-image-resize-how-to-convert-to-format-labview-can-use/m-p/2199022#M704093
-
What third party LabVIEW tools do you use the most?
hooovahh replied to David_L's topic in LabVIEW General
Yeah totally agree, but you'd be surprised at the things that are in the block data for a VI file. Description, History, Default Icon, Title, Reentrant setting, Help info, and Version info are just a few things I know how to pull out. But you are right that VI broken-ness you would just have to open the VI reference. -
What third party LabVIEW tools do you use the most?
hooovahh replied to David_L's topic in LabVIEW General
I think this is a weak argument. I mean I agree that it isn't very flexible, but how often do you start a comment with # and then no space? That is the only time a bookmark is made. If you have the comment "Here we take our # of samples and average them" it won't make a bookmark. You need to deliberately make a comment starting with # then no space. Yeah this one I think is a big over sight by NI. I mean they have a product, which semi-relies on free labels to be in a specific format to be able to pull requirements. When making the bookmark manager it should have some how incorporated that standard. That being said I know you can modify the requirements gateway reading functions to look for #tag instead of [tag] just like I think it uses [covers] could be #covers. I just think that what ever you came up with (which looks great and probably is more flexible) probably isn't as fast as NI's implementation, because they were able to put whatever hooks into the VI to make finding bookmarks faster. Wouldn't it be nice if your code used the bookmark manager searching tools instead of your own, assuming NI's is faster for larger projects. EDIT: By the way awesome discovery. Bookmarks are saved in the VI in a human readable format. They can be found by going to the BKMK block of the VI file, this can make finding bookmarks much faster since you don't need to even open a VI reference to the file, you simply need to open it and read the bytes of the file. -
What third party LabVIEW tools do you use the most?
hooovahh replied to David_L's topic in LabVIEW General
Because NI has support for custom Bookmark Managers, I'm guessing that Shaun could make his own that merges the functionality of the two. -
Attached is what I was describing. Hydraulic Pressure units Hooovahh Edit2.vi