Jump to content

hooovahh

Moderators
  • Posts

    3,388
  • Joined

  • Last visited

  • Days Won

    283

Everything posted by hooovahh

  1. No worries, we were all beginners at some point.
  2. That is an odd one. A repair of the LabVIEW install would probably fix it if you want to go through that process. You can still edit an Enum just from right clicking it. You can remove items, and add items before or after. Also to add several things at once you can type Shift+Enter to add after. Still this is a temporary solution and something is probably messed up in your IDE.
  3. Yup you could do that. Properties are only scalar values, so keep that in mind too. So maybe I have a property that is total number of failed and total number of passed tests in the file. If I run more tests I can write those two properties again, overwriting the previous values those properties had. You can of course flatten any data type to a string and write that so the scalar limitation is only applicable for the native data types, and anything else won't be human readable in normal viewer.
  4. Actually TDMS is quite robust. I'm not saying you can't break it, but I had a few tests where multiple references were opened and closed in parallel, and reading and writing took place in an uncontrolled way, and there wasn't any data lost on the writes. This suggests to me that there is a central driver that all API calls go into which handles the reading and writing. This isn't to say data loss can't happen in odd cases of multiple reads/writes in parallel. These cases should be avoided. I just wanted to mention that in my experience it is quite robust. The TDMS read has an offset and range for performing a read. So you can graph a subset of the data without having to read all of it. But for something like decimate you will likely need to read all values of the range you want, and then decimate it in LabVIEW, which is likely less memory efficient than a database call that has that built into the select statement. Also getting something like a Min or Max in TDMS can be less efficient than a database call, if you have open ended queries. By that I mean if you know you want to have the min and max of all channels, then when you are performing the writing of those channels, you can also write properties of the channel that is the min and max. Then when you are reading the file these properties are already written in the file and can be read without having to read every data point. These are sorta like queries where the result is written in the file, knowing that you may want to look for them later. For queries you know you'll want to do this is great, but if you don't know what you are going to want to look for in a post-processing way, then you will need to read all values, and calculate the result. For me each channel, and each sample has a Pass or Fail associated with it, and I want to know if a test passed in every cycle, meaning that every sample of the channel was a pass. Instead of reading every sample, I just write a single Pass or Fail property on the entire channel. If that is Pass then I know every sample of that test passed. I can also combine this and look at if every test has this passed property, and if it does then write a Pass property on the entire file. Then I just need to read this one property to know if the entire file passed. I knew I would want this query like information available, so I wrote it into the program that writes the TDMS files. If I now wanted to know every time a sample was above 0.5, I would have to write custom code to read every sample and get the results, because that isn't a property I wrote into the application.
  5. Topic moved, feel free to use the report to moderator feature in the future.
  6. The following file in the report generation toolkit performs the Save As function: <vi.lib>\Utility\NIReport.llb\Excel\Save Report to File.vi It has a case constant that uses the following values, I'm unsure if these same values can be used for the document save function. xls -4143 xlt 17 htm, html 44 xlsx 51 xltx 54 xlsm 52 pdf 57 csv 6
  7. This is quite basic stuff, and can be done several ways, with an event structure, and an event for each button, or polling the buttons and going to individual case structures, or building an array and searching for the True which would be the first button that was pressed, and then going to a case in a case structure. Why don't you post what you've tried so far. And feel free to checkout some of this free training material. Oh and in the future use a more descriptive title. LabVIEW VI means nothing but, "Sending a string based on a button press" is much more helpful. NI Learning Center NI Getting Started -Hardware Basics -MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations) -LabVEW Basics -DAQ Application Tutorials -cRIO Developer's Guide Learn NI Training Resource Videos 3 Hour LabVIEW Introduction 6 Hour LabVIEW IntroductionSelf Paced training for studentsSelf Paced training beginner to advanced, SSP Required
  8. "Do you mean we aren't doing 100% inspection already! I'm going to shake up this place up to make this company better (or so other people will hear me talk and think I'm even more important than I already am)", or "You're the test engineering, isn't this your job!" or "I don't mind making the hard decisions if it means less warranty returns!" or "Our customers demand perfection!" Too many blanket statements without knowing or thinking about how things actually work. Not saying improvements can't be made, but I tend to roll my eyes when people talk a big game but clearly don't know enough to be making decisions like these. Give me a manager with test and engineering experience over one with an MBA any day. (BTW sorry about off topic)
  9. Post what you've tried so far. Normally I'd suggest using the report generation toolkit with the template path, being the path to the original file, and then use the Save Report with the new path, but I'm guessing you mean you want to save a table which is in the HTML file, but without an attached file it is hard to say. Post what you have, post what you've done, and post what you want the output to be. This will likely involve ActiveX and/or the report generation toolkit, but there just isn't enough information to answer your question.
  10. You attached 12MB of PDF files, did you expect us to read the 500+ pages of documentation you posted? If your question is how to parse and understand an STL or GCode file maybe you should post example files on that, or read documentation or examples on what the file structure is for these file types. Posting NI documentation already available on the web, and pictures of your setup isn't very useful if your question is in regards to file parsing.
  11. Can we see a screenshot? That seems odd and I've never heard of it. Is it a Type Def? or Strict Type Def? Can you post the enum? What versions of your OS and LabVIEW are you using?
  12. Better yet did you smelt the metal? If not there could be imperfections in it that could cause a catastrophic accident going down the road. It's hard to have these types of conversations because at some point someone will say "Well that's just ridiculous, I should be able to trust the QA of the screw manufacturers." Just like how I've had some managers not trust the precision of resistors, and wanted each tested before, and after placement in the DUT (Dispite ICT likely finding these issues bringing up another FMEA). But what is ridiculous to some isn't for others. And at the end of the day my job can be made much more difficult than it needs to be depending on how ridiculous important people want to be. Oh and the operating system, and drivers we are using are closed source as well. Is it ridiculous to make a new operating system, kernel, drivers, file system, etc from scratch? Yes. Would some managers think they are doing the company a favor by calling into question the integrity of the operating system? Yes.
  13. Are we really talking about FMEAs on the risk of open source bugs and/or malicious code, versus source code developed in house? An interesting concept but in my experience most management would rather just have a blanket statement like "No open source code" then to have to go through a process of qualifying it. Michael is probably right, if it is a firm requirement then you're probably hosed.
  14. I know the question is about references, but all of the shown examples is less than ideal for errors unless it is intentional to only look at the last iterations error, and to clear the error if the loop runs 0 times. In cases like this I will either turn the error wire into a shift register (this will cause an error in iteration 0 to not allow iteration 1 to run, sometimes this is desired sometimes it is not) Or I will enable indexing on the error of the for loop, and use a merge error to turn it back into a scalar. This way each iteration will still run without error, but my output will indicate if an error occurred on any iteration. As for references, if the for loop runs 0 times the reference will be invalid if no shift registers are used. In this case it isn't all that bad because to cause the for loop to run 0 times the second subVI needs to return a 0 which will most often happen if an error was pass into that subVI, in which case the reference won't be made, and won't be used anyway. But in many other cases the number of iterations is defined by an indexing array, and if the array size is 0 you have the same issue of turning references invalid, and not being able to use or close them later. Many developers don't think about the ways that the array could be of size 0 and assume that will never happen but it does. Remember that if two arrays are being indexed, it is the minimum size between the two that defines how many times the for loop will run. So if one is empty and one has 10 elements, the for loop runs 0 times, and references are lost again. This 0 running for loop can clear errors in some cases too. In your #3 if the Error In is true, then the for loop will run 0 times, but the error also will be cleared which is also likely undesired. Basically #2 or #3 are fine for references, but have slightly different behavior, which probably won't matter.
  15. It's literally in the only link provided in this thread. https://decibel.ni.com/content/docs/DOC-8981 Although if I'm going to apply a bit more scrutiny, I guess NI is just saying these are the guidelines to be followed, not necessarily the things that NI verifies is true.
  16. Oh the compatible with LabVIEW is a good one to go with. These maybe 3rd party tools, but NI is claiming that to be "Compatible with LabVIEW" then that means the "Product does not include any malicious software". And OpenG is listed on NI's site as just that. You can ask for an independent investigation, but the thing is, code review is not a valid form of software verification. You can open the code, and look at it, but you can't say what it will do just by looking at the source, especially in a graphical world, where I could just place a picture of a block diagram on top of my actual code, and other malicious techniques. This is where tools like VI Analyzer, and Unit Test Framework come in to help detect things that the user might miss. If you can't just take NI's word, then I'd say it isn't going to be worth the hassle of independently verifying it.
  17. There are a couple of tools that come to mind which spawn a VI to run, and then stays running, and monitors your development environment and can do things, based on actions. One is CaseSelect which is a window which helps visualize nested case structures by allowing to collapse sections of it like a tree instead of a single listbox. It looks for the selected item to be an event structure and then does work if it is. It gets invoked with either QuickDrop or a right click but then stays running and monitors what items you are selecting. I'd guess you could do something like this, to spawn a VI that runs continuously and monitors if you are dragging (mouse down+moving+single node selected) and then detect if you are on top of a wire (correlate mouse coordinates with BD objects), then read the data type of the wire, and if an insert is possible, then maybe give a visualization that an insert is going to take place (maybe a semi-transparent VI overlayed on top of your mouse, or changing the mouse pointer?) then invoke the same scripting code that does the insert with QuickDrop. Lots of work, it probably wouldn't work well, but if you do get anything useful going feel free to post what you've come up with.
  18. You can actually extract a VI from an EXE, but there is a very good chance it won't be useful at all. If you did not enable debugging when the VI was made then you will get a VI with no block diagram, no front panel (in most cases) and no source code. This VI will be a thing that can be ran, but only in that one exact version of LabVIEW it was made for. There will be no VI icon, no description, and possibly no terminal labels (it's been a while since I've done this so I can't remember). This process of pulling a VI out is not like a decompiler. The output isn't like source code, it is more like a DLL that is still binary and still compiled for a specific platform and target. tldr; what infinitenothing said.
  19. I would say it is a bug if it is reproducible, but it seems to behave the way I'd expect in the VI I made. Are you saying the Panel Resize event always has Old Bound and New Bounds equal? Cause the attached VI shows that they are not always equal and events are being fired as the VI is resized, not just when the mouse is released (which is how I would want it) This is the same for a Pane Resize as well. Resize Test.vi EDIT: Oh I see what you might mean. The last event generated will be on the mouse up, and when that happens both bounds are equal. I wouldn't call this a bug, just odd that the mouse up generates a resize event. Other resize events still get generated as expected.
  20. The normal quick drop wire function worked for me (more or less). I selected the index, and I selected the bundle by name, then quick drop then CTRL+w and it wired it up. I thought maybe the shift modifier might be needed but in this case it wasn't. I also added a boolean terminal and it was left unwired. Windows 7 x64, LabVIEW 2015 SP1 32 bit.
  21. Yeah Devcon is the way I did it for a wireless card that would have connection issues when offsite: http://forums.ni.com/t5/LabVIEW/disable-wireless-card/m-p/3297564#M964373 If it couldn't ping google I first disconnected and reconnected to the network. Then if that didn't work I would disable and reenable the card. We were uploading remote data to an FTP from a DSL connection at the testing facility and it needed to continually try to put data out there so we could evaluate it from the office.
  22. Using the Variant to data, turn it into an array of variants. If it returns no error, then your input is either an array, or a cluster. This trick can also turn a cluster into an array of variants so you'll need to check for that too. Maybe check to see that all the data types of the output are the same? But even that isn't a guarantee. How did you end up with an array that thinks it is a variant? Maybe there is an unnecessary To Variant in there some where.
  23. I used JSON with the WebServices calls. Most projects don't use them, but the ones that do use JSON as the results type, and parsing using the NI primitive works the majority of the time, but then there are unsupported data types, and odd timestamp support.
  24. So this is an edge case for sure. But there are times that I want to put reuse code on the palette, and drop a VIT on the selected VI. VITs aren't very common but they will (normally) force the user to save the dropped VI as a new VI. It is like opening a template from your File >> New... menu. It doesn't drop the actual template, but instead makes a new unsaved VI, that has the code of the template in it. But if you drop a VIT from your palette you don't get a new copy, you get the template itself. This came up in conversation at Becky's presentation on the Project Templates at NI Week this year. I suggested that an XNode could make this possible and so here it is. (sorry Becky for taking so long I forgot about it) Anyway if you drop this XNode from the file explorer or palette, it will drop a new copy of a template, then delete the XNode that was dropped. If you want to use your own template, edit the Get Help VI description, icon, and Window Title (this is what is shown on the context help and palette). Update the code in the Template.vit, edit the VI description, and icon of this file to be the same as the Get Help VI (this is what it looks like when dropped). The only issue I've found is that if you drop the template from your palette you need to use undo twice to get rid of it. Once to get rid of the template (but this brings the empty XNode back) and again to get rid of the XNode. Drop VIT Xnode.zip
  25. An LLB is not a library. An LLB is more like a flat zip than anything else, and name space does not get modified. Your example of Init is a perfect one where libraries from all kinds of sources use the same Init, Configure, Read, Write, Close etc functions. Editing hardware drivers in your project is no problem, but editing ones in vi.lib, or inst.lib can cause more issues due to the distribution method. Update a package, and all the changes you made went away. If you organize via directories, then this is also a reason to consider the newer file structure since then your EXEs will have the same folder structure you have on disk, and doing a function like reading a VIs file path (given a reference) will tell you where on disk that VI came from. This can be useful when logging errors because you can log the full path to the VI that generated the error. Or the relative path from the EXE to where the VI is in the EXE. In the end it is of course up to you but I've found the new structure very helpful over the years. Yeah you need to know that a single strip path won't bring you to your EXE, but I use the OpenG function that is Current VI's Parent Directory which will keep stripping the path until a directory is found which works in both the 8.x and newer structure. You should get one of those super huge floppies, I hear they store 2.8MB.
×
×
  • Create New...

Important Information

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