Jump to content

hooovahh

Moderators
  • Posts

    3,388
  • Joined

  • Last visited

  • Days Won

    283

Everything posted by hooovahh

  1. 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
  2. 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?
  3. Lets see the code. Also is this for actual hardware or just simulation?
  4. 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
  5. 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
  6. Does C++ have any overcurrent protection? C++ just like LabVIEW is software and overcurrent conditions is a physical issue. What do you really mean?
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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
  16. 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.
  17. 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.
  18. (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,
  19. 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
  20. 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.
  21. You aren't cleaning up your references at all. On top of holding onto the file you likely would have memory leaks. Close all the references you open when you are done with them. There are some functions that also have a dispose method so you may want to see if those are appropriate for releasing reference too.
  22. Yup that seems to be the problem. The Enum control (or possibly ring I think those appear as the same control type in the JS) is being shown as an image, and not as a web control. I'd suggest you either edit your cfg file, or give the boolean constant to the Publish function which can show a dialog of settings for each control. Look at the settings for the enum control and it should have Show as image to be false. If you want Value Only then that is up to you but with it either on or off it should be controllable.
  23. Would it be possible to post any of the HTML or JS files generated? I'm unsure why some controls that are legit controls wouldn't be controllable in one location but would be in another. Maybe also post your cfg used which defines how each control should be seen and used. If a control type isn't recognized it defaults to an image (which the path control does because what should it do in a browser?) and it is possible the other controls that don't work have the same issue. Buttons will always act as buttons even when it is set to be image only (since it just toggles between the two static images) so if a button is no longer clickable then that likely isn't the problem with that control. Oh what about z-order as well? Is there something on top of the control? I see a decoration and I thought I made them go to the back but maybe there is some invisible object on top of a button. The HTML generated should make it clear if that is the issue. In Chrome you can right click and choose inspect element to see the page source and where the objects are and what data they have.
  24. Again not saying this is the issue, but many desktop CPUs have somewhat decent integrated graphics now a days, even lower end Core I3 has had some integrated Intel HD graphics. These are still pretty poor for gaming, but basic video rendering, playback, and streaming could see some benefits.
×
×
  • Create New...

Important Information

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