Jump to content

hooovahh

Moderators
  • Posts

    3,365
  • Joined

  • Last visited

  • Days Won

    269

Everything posted by hooovahh

  1. I realize that you shouldn't really give a user too many ways of doing the same operation. Otherwise you get a fragmented experience between users. But I think this case is common enough that maybe some percentage of users prefer File >> Exit (for whatever reason) over another method of exit. Do I use File >> Exit? Nope, but it's in my programs. If I was using a program and found File >> Exit was missing I wouldn't care, but in the back of my mind I would think the developer forgot to put it in, rather then deciding to leave it out. Oh and I just check Word 2010 and File exit is still there. Has it been remove in newer versions? Now that I'm looking at it I notice they moved the help to be under File, which I also don't like.
  2. I'm not saying you can't do what you are suggesting, but if you are choosing to effectively store the data ran when in the development environment, and load it when we are in the run-time, it would be much easier to just deal with the string value which can be pulled out and saved as a constant. What I am describing is the code that I posted earlier dealing with the string value, and not the image.
  3. According to the help the Get Image Scaled doesn't work in the run-time engine.
  4. I don't want to jump out on a limb, but I want to say this is an undocumented feature and LabVIEW shouldn't be able to do this. Searching resulted in a few links where people have work arounds to get arrays of graphs because "you can't natively have an array of grahps/charts in LabVIEW". The internet has been wrong before but I think this isn't allowed. I do think it is something with the array control. Because if you pull out one of those graphs you can't put it into a new empty array. You can make a cluster with just a graph in it, and then put that cluster in an array but that has other issues. Also I don't know about on your system but when I open that VI I get all kinds of unreadable text in the context help. Sometimes this is a regional/language thing but it could be a sign that this shouldn't be done.
  5. So the tests I did seems to suggest you were dreaming. Getting the block diagram reference is not allowed in the run-time engine. And using the "Insert Block Diagram" on a sub panel, for a VI that didn't have the block diagram removed returns "Cannot Load Block Diagram" when in an EXE.
  6. Yup I totally agree with drjdpowell. I don't have a type def for my BFCluster and just bundle constants of the things I want in there. It is faster to add an item this way then to have to open the type def and add it there anyway. I also only take the things I need for the functions I want. I don't think having a type defed cluster is wrong it's just not how I prefer to develop my code. This is sorta like private data to this QMH anyway so having all the data available to some other function feels wrong. I only need to give it the data it needs, which maybe a typed cluster within that cluster but most the time is isn't.
  7. Okay so I have a working test of what I was talking about with the Pre Build action. Attached is a project with a VI in it that gets the text of a Formula Node in the development environment. It also has a string constant that is blank, but before building the EXE it will take the value from the expression node and put it in the string constant. Build the EXE and you'll see that the value of the string constant will change to the value in the expression node. Not ideal but it can be done with minimal engineering effort, and using all built in tools. Formula Node Test.zip
  8. Okay so I ran some tests. Getting the text from a Formula Node in the development environment is easy. Use Traverse for GObjects to get a reference to the Formula Node then use a property node to read it. In a built EXE even when the block diagram is still there you won't be able to to use this VI. So instead I tried using the All Objects property on the block diagram. But that too won't work because that doesn't work in the run time environment. But even if it did, the Formula Expression node won't work in the runtime engine either. One possible alternative (that I'm still looking into) is if you can open a reference to the VI within the EXE, but in the development environment. This would mean you can only get the expression from within the full development environment and not just from the EXE sorry. If you are considering using some string constant I would recommend looking into some scripting that can run in a pre-build of the EXE that could copy the text from the formula node into the string constant. That way at least you don't need to rely on the engineer to manually update it for every build.
  9. In newer versions of LabVIEW (2009 or around there) NI changed how local variables looked to make them look more like Global Variables. Maybe you aren't familiar with the older way of seeing them.
  10. Thousand, Million, Billion, Trillion, Quadrillion, Quintillion. Each comma is a new unit which is every 10^3. Always seemed logical to me but I've always lived in the US. More info on Wikipedia.
  11. I've already admitted defeat, and hope I am clear that I never asked for it to be one way or another. But because it is Monday I made the 3 ways to do what we are talking about. The native way (the actual function), the right way (start with is the value less then Max?) and the wrong way (start with is the value greater then Max?). Both the right and wrong way have the same amount of logic having two checks each. I don't see how doing it the wrong way adds extra checks. After running the test on an array with 100000000 doubles I got a resulting time of 233ms for native, 239ms for right, and 238ms for wrong. I think we can call that a wash. Coerce Tests.vi
  12. Forgive my ignorance, but are you telling me that 1,000,000,000 American doesn't equal 1,000,000,000 European? EDIT: Wikipedia
  13. But if I say is the value less then Max then I also get a false, meaning I am outside the valid range and should coerced... (you must have known I would have came to this logic)
  14. I guess I expected it to coerce a number to be within the range I provided. This is the first time I found that providing an input to that function didn't force my value to be within the range specified. I'm not saying it should coerce, and I agree that it behaves the way standards say it should (and the documentation says as well). I was just taken back because I've never seen it behave that way is all. It's like if I used the one button dialog box and if I make the message one specific constant it behaved differently.
  15. Your image doesn't look like it represents the function you are asking for. I implemented the function the way you described it. You provide a folder of JPGs and run. It loads the first picture in the folder. If there isn't any it prompts you. Once it has been loaded you use the Next and Previous buttons to go between images. Cycle Through Images.vi
  16. Go ahead and type in that path on your windows machine into Run or the Explorer path. I'm guessing that it won't work because your path contains spaces between each character, some non printable characters, and characters before the drive letter. Looks like something went wrong with your read and conversion to a path.
  17. I just tested in 2011 on many different comparisons and you are right that it always returns false, and the Coerce In Range. My coworker must have been confused but claims it was in version 2010. I did discover one other potential issue with this NaN and comparison business. Lets say I take an average of some values, and then want to command a device over serial with that average value. I have a valid range so I use the Coerce In Range to be between 0 and 10 which in this hypothetical is my devices limit. If my average returns NaN by trying to divide by 0, then the coerce in range returns NaN not 0 or 10. This functionality isn't what I expected, but it is what is documented in the help.
  18. I heard recently that when you look at your code from 3 years ago that you should feel disgusted. If you look at your code and think you did a pretty good job, then you aren't improving, or using the new techniques and features in newer versions. Isn't it quite interesting how LabVIEW code looks dated? I mean I can look at a block diagram and and based on coding styles make a pretty good guess at what version it was developed in. Oh using white labels instead of transparent on block diagram controls? Labels on the left or the top of controls? Comments not part of the wires but intended to be? Bookmarks? Subdiagrams on structures? Lots of polling controls? Default subVI icons? When I look at C++ code from 5 years ago it more or less looks the same. But 5 year old LabVIEW code is very different. Either we're changing too much, or they aren't changing enough.
  19. According to this post http://forums.ni.com/t5/LabVIEW/nan-change/td-p/1826573 It happened some time in version 2010 or 2011 (since it worked one way in 2009 then another in 2011). Now the other question. Well while I can understand while some would say a NaN should be something and some would say it should be something else when converted, I agree that changing it between versions is asking for trouble. I know I had a coworker have a similar issue when he was doing limit checking. He had code to say is the measured value less then X and I think NaN would always return true (or maybe greater then X). But once the conversion was understood (for that version of LabVIEW) there were no other issues.
  20. hooovahh

    Cross post?

    Are you a wizard?
  21. Here are some of the free tutorials I suggest: 3 Hour Introduction http://www.ni.com/white-paper/5243/en/ 6 Hour Introduction http://www.ni.com/white-paper/5241/en/ LabVEW Basics http://www.ni.com/gettingstarted/labviewbasics/ Self Paced training for students http://www.ni.com/academic/students/learn/ Self Paced training beginner to advanced, SSP Required http://sine.ni.com/myni/self-paced-training/app/main.xhtml LabVIEW Wiki on Training http://labviewwiki.org/LabVIEW_tutorial#External_Links Of course the best training is to work along side those who are experts on all things LabVIEW. It is also very motivating to know there are others who struggled just like you but became experts over time, and constantly researching newer and better ways of doing things.
  22. So I've played around with Arduinos in the past mostly just the Uno and 328 set of microcontrollers. But I was looking for something a little faster for doing some stuff that I didn't have a use for yet and stumbled on the Teensy 3.1. It's a microcontroller that is ARM based running at 96MHZ (Uno is 16MHZ). It also has a bunch of DIO, AIO (yes real analog output), SPI, I2C, a bunch of serial ports, real integrated USB with DMA not the RS-232 to USB FTDI, and it even has a built in CAN bus. And for $20 bucks. One of the things I wanted to see if I could do with this is make a CAN gateway, where it used the one built in CAN bus, and then filter the messages or translated them, and then send it out on another CAN bus talking with SPI. I also thought it would be cool if I could send all that CAN from both buses over USB to the PC, or even log to a micro SD that's onboard. I didn't finish my project because of other tasks, but I can confirm that the thing is capable of doing all of these things. I can elaborate more details if there is interest but really the purpose of this post is to talk about the Teensy itself which is a very powerful microcontroller that has alot of Arduino compatible modules and even uses the Arduino IDE. It isn't as cheap as a blank microcontroller but the form factor, compatibility, and capability is great for the price.
  23. If you don't mind I took it a step further. http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Conditional-Disable-LabVIEW-Run-Time-Versions/idi-p/2795540 But going with the tools we have now, I think that defaulting to the NI method is probably best. There are multiple functions that are both done by NI and OpenG and when possible I choose the NI because I expect with each version LabVIEW gets better NI's methods maybe improved. Besides I think NI has better support then OpenG.
  24. 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.
  25. 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.
×
×
  • Create New...

Important Information

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