Jump to content

hooovahh

Moderators
  • Posts

    3,392
  • Joined

  • Last visited

  • Days Won

    284

Everything posted by hooovahh

  1. Oh well that seems like a poor user interface, that is going to require all kinds of checking. Wouldn't it be a whole lot easier if you asked the user what values they want to input and then default the ones they don't? Attached is what I was thinking. By default you need to provide X, Y and Z, with their default values coming from a constant on the block diagram but could be loaded from a file. Then if you choose to not provide a value it hides that control and will use the default value. Enter XYZ Demo 2013.vi
  2. There's about a dozen ways to store a value and load them later. The easiest in my opinion is to use the OpenG Write Panel to INI and Read Panel From INI, which will save and load control values to a human readable INI file. Other methods involve reading and writing to a binary file with the Read/Write binary where you can bundle all your desired values into a cluster, or turn it into an array. You could also just write it as text. Or write it as TDMS, or a database, or even the Windows registry if your user has permissions.
  3. Hardly a monopoly. NI isn't the only company selling FPGAs. Also NI has 7,000 employees. They are international but I wouldn't call them giants.
  4. Ohhh! This is a different issue all together. You don't have a Waveform Graph, you have XY graph. A Waveform graph has every sample be the same distance apart, where XY it is arbitrary. Attached is an updated version where we write three channels, one for the X one for Array 1 and one for Array 2. Then when we read we read all values from all three channels, then build them back into a bundle of X and Y values. I also built that into an array so one XY Graph can show both plots but you may want that on separate plots. TDMS Waveform Example 2.vi
  5. Using things like the dynamic data type, and express VIs is going to be your down fall. These functions work fine for the majority of the use cases, but having more low level control gives you the features you'll want. In this case I see a couple of issues where you are trying to provide an array of delta times where this should be a scalar value stating the amount of time between samples. This information needs to be recorded in the TDMS file and using the TDMS write primitives do this. That is why the time scale on your graph above is samples since the delta time between samples wasn't recorded, likely because the Write to Measurement File didn't know that meta data was there, since it is write a dynamic data type. Attached is an example of writing and reading a waveform with TDMS. Write Read TDMS Waveform.vi
  6. Both the link in the first post, and the link in your post download it just fine. Are you sure you don't have some firewall, or IT policies preventing the download?
  7. Lets see the code. Also is this for actual hardware or just simulation?
  8. Well that's okay I felt like doing some improvements on the image manipulation code. Attached is an improved version that supports ico and tif files and allows to select an image from within the file. For ico files it basically grabs the one image you select (with Image Index) and make an array of bytes that is a ico file with only that image in it, and then displays it in the picture box. For Tif files there is a .Net method for selecting the image which for some reason doesn't work on ico files. Edit: Updated to work with Tifs as well. Image Manipulation With Ico and Tif.zip
  9. You didn't give much to go on, since I'm not familiar with IEC or IEEE Time-Current curves. So attached is some code that allows you to set the current and the Amp Hours are then calculated and if it goes over a limit then a boolean turns on. Overcurrent Test.vi
  10. Does C++ have any overcurrent protection? C++ just like LabVIEW is software and overcurrent conditions is a physical issue. What do you really mean?
  11. Uggh, this does not look easy. Here is some VB code that looks to attempt to pull individual icons out of an icon file, and then load them into a picture box. https://www.codeproject.com/articles/6171/access-multiple-icons-in-a-single-icon-file Sorry I don't have any good suggestions.
  12. Just lots of trial and error. Even hidden windows have a title, and have a handle (HWND) that can be found. Some times this can be done by first finding a process ID that is linked to a file on disk. Then you can get all windows associated with an application, and manipulate that, without needing a window title. Sorry I don't have any examples of this, it's been years since I had to do something like that. As for reaching search fields maybe pressing tab a set number of times will get you there, or using simulated mouse clicks.
  13. Just tested my stand by method of using .Net and it seems to open and work just fine. Here is the code I posted over on the NI forums a while ago. It opens an image using .Net and then scales it to fit to the pane without any extra work. It supports all the different image file types, alpha layers, and can be exported back into LabVIEW Image Data.
  14. Yes Channel Wires existed in a semi-beta state in 2015 but are official in 2016. Go to Help >> Find Examples and you'll find lots of examples showing the different types of Channel Wires and explaining how they can be used for communication between loops.
  15. It does really depend on your software needs, but generally any new industrial rack mounted PC is going to be an I3 or better. I'd pretty much avoid Atoms at this point unless you really know your needs are small and dedicated. I've been using the atom based RT controllers running Linux and this seems fine most of the time but I wouldn't mind more performance. The cost difference between a dual core atom, and a quad core I5 or so isn't that great. We generally spend $1500 to $2000 US on a rack mount industrial PC and it has more than enough horse power for what we need. As for OS we still stick with 7. I think 10 is fine, and we'll probably start moving to it for new projects. We just couldn't see using 8, especially before the 8.1 update.
  16. Without the source your only hope is to use the mechanisms left by the developer. If there is no ActiveX and the only interaction is with a mouse and keyboard, then you'll have to simulate a mouse and keyboard. There are several examples of using AutoIt or LabVIEW to look for windows to be active (based on their titles) then simulate pressing keys to navigate where you want and type in information. This is quite error prone and user interaction may mess with stuff.
  17. Need to see the code, but I suspect a few local variables, or some communication scheme between loops would work. Have you looked into Channel Wires? This could also be used to facilitate communication between loops.
  18. Either method would work. I was suggesting it leverage the select class so that you don't have more code to manage, but making a Select - String class as a apposed to a Select - Numeric class would be a fine solution too.
  19. Some of the details of adding new control types was posted in the other thread, but I'd really like it to be class based with dynamic dispatch. At the moment it is a bit of a pain to add new types but clearly is possible. Start by looking in the Web Front Panel_class\Private\Object Factory.vi. This VI is what identifies each object and figures out the type that it is. The Init state looks at the control ClassName, then goes to other states based on that. You can probably just duplicate the String class and do what it does (which isn't much) until it goes to the Finish state. Here we create the new object class. Here I think you can go into the Select object class type. Now how do we update the object we just made? Open the Front Panel Objects\Select_class\Get JSON Data.vi and edit it to support the combo box class type. This VI at the moment assumes the data is always a numeric, so you'll need to do some type checking, or maybe attempt both the variant to data on string and numeric and use the one that doesn't generate an error. Or feel really adventurous and update the Front Panel Objects\Select_class\Attributes.ctl to have the added attribute of Numeric, or String which can be set in the Object Factory. If you do add this to the cluster, be sure and update the value to numeric when a ring, or enum are used. Then the last thing is to look into what to do when the user changes a combo box control value. Update the Front Panel Objects\Select_class\Set JSON Data.vi and set the combo box with new control values. It will return a numeric of which item is selected, so you'll need to look up the list of available items from the combo box and set it. Again if you update the Attribute type def you'll know to treat it as a string or numeric. Otherwise you can look at the data type of the control, or the class the control belongs to. But since this will be called a bunch of times the more efficient method might be to update that type def to contain things like what the data type or ClassName is. This will have a limitation that a combo box can't have a value that is undefined or not in the table. Not sure what would be needed to support that but it would probably involve looking into the web control support. If you give more information on the other two controls that aren't being updated I can try to help. Are the controls just normal string? If they are images do they update? I realize you can't control them then, I'm just trying to figure out what it could be
  20. Very neat but it doesn't look like it has been released yet. Looking around all I see are posts updating the status of the project but no source provided yet. I don't have any Wemo devices but it looks pretty neat. This is the kind of thing I'd expect to see on the NI Week expo floor. The emulation and hardware is pretty cool too. I was unfamiliar with the feather but having a USB wifi device, that can be programmed with the Arduino IDE, and have built in support for recharging battery packs in a nice little package for $16 is awesome.
  21. Just look through the list of methods for a given reference using an invoke node. I've used the Bitmap .Net before a few times and I don't remember having to do anything else to release a file from being held by an application.
  22. (BTW I don't mind having a two way conversation the whole internet can see) Combo boxes aren't a supported control type, so it must default to the image type. Just like if you have an array of something on your VI you can't represent that as web page elements (not easily at least) so it makes it be an image. So no matter what check boxes you pick, it will be the image type, maybe I should make that more clear, and disable check boxes, or force check boxes on to make that more clear. What also doesn't help is that the system enum, ring, and combo box all appear the same visually (which is usually a nice thing) Use a ring and you'll be fine, or implement combo boxes to use the same technique that the enum and ring use. Had you used a non system combo box it would have been visually obvious that it was showing it as an image and not a native web control. You also reminded me of what might be an interesting feature, which is when a button is clicked on the webpage, to show the true value and hold it for X amount of time, maybe until the page polls the new button value again. Sometimes I am unsure I clicked a button because the image won't change unless when it refreshes that it is true, which can be a small window. Your first post mentions things not updating, which controls/indicators in particular aren't working, it looks like the graph is,
  23. Well lets not jump to conclusions here. Yes the XNode Editor I made a while ago allows for editing the icon associated with the library of the XNode, so even the community can set this static image of their XNode, even if the image generated by the ability is a different one
  24. Great suggestion Neil. Since an XNode can redraw the icon at run time. Looking at the Xnode library icon it really does look messed up. I'm guessing this is because the actual VI ran to generate the image is the C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\variable\VRDraw.vi file, and if you just run that with the default inputs then it generates a nice clean image. Honestly this looks like a fault of NI and they made their XNode library icons messed up, maybe with auto generated icons or because they knew they would be replaced with scripting.
×
×
  • Create New...

Important Information

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