-
Posts
3,432 -
Joined
-
Last visited
-
Days Won
289
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by hooovahh
-
Most front panels are removed automatically when building an EXE or DLL. I'm unsure of what the rules are but basically if the VI doesn't have settings to show it then they are removed. Password protecting the VIs seems to be sufficient for most tools network developers, but yes there is a risk of cracking them open. But even removing block diagrams and front panels, doesn't mean the VI can't be called similar to a compiled DLL. You might not know what is going on inside but it can be called with inputs and an output be returned. It may also be possible to load a VI of the same name in memory and have your functions link to the new one (assuming they aren't in libraries or classes). Protecting LabVIEW IP is a tricky one for sure. Even things like code obstruficators are rendered useless with block diagram cleanup most of the time.
- 5 replies
-
- licensing
- ip protection
-
(and 1 more)
Tagged with:
-
Very neat and postage stamp sized. There are apparently lots of different ways to perform this and I have yet another way that I've been doing. This is part of my Force 1D Array Min or Max Size VIM that is part of my array package found here. I am curious what is the fastest, and under what conditions one works better than another. Also somewhat relevant is my Circular Buffer XNodes I made here. This one uses the shifting method, but tried to be a little more efficient with things like not shifting if it wasn't needed, and if a shift was needed to keep the shifted data so a consecutive read wouldn't require a shift or split and build.
-
Thanks for the advice. On my system all of the string character sets I tried had the same result, summing their parts, as NI's method.
-
So attached is my first attempt. I did things a little different than you described. For any one set of font settings I didn't generate the size of each printable character. I only get the size of each character in the string and cached the result. If that character for that set of settings was already generated it uses it. At the moment it only supports Left to Right text, without offsets (unlike the normal method) but that could be added. Also I included a test VI which after you run it a few times clearly generates text that is always faster than the built in method for a set of random strings. If you open up the font range obviously it is less likely to have a cached value for your characters and will take longer. Also my test runs the cached code twice, in the hopes I could see the difference when some text hasn't been cached but when you run it with 1000 random strings of random sizes it becomes noise quickly. Get Text Rect Cached.zip
-
Oh I like that. I too have done some image processing stuff and found that function to be quite slow. One simple technique I wanted to try (but probably wouldn't help) would be to have a string control that isn't seen, and get the size of the text in it, after setting the text and information appropriately. Not sure if several thread swaps using property nodes would be faster than the internal call to a LabVIEW function or not. But caching the characters would definitely be faster. I see a place where variant attributes could be used for sure.
-
Yes this is somewhat known and talked about, being able to white list a data type is important and I remember hearing black listing one would be possible at some point too but since that is for a future version of LabVIEW (2018?) it might not come. That being said AQ has a philosophy that is pretty sound in most cases when it comes to VIMs. The idea is you shouldn't have to white list data types, and really the true propegation of the code you wrote should dictate what data types are possible. If the code you wrote accepted the data type and worked fine, then it shouldn't need this function to force only that data type. While this is true most of the time I can think of a few places where the data type might be accepted, but cause unexpected results. Imagine if I wrote a randomize string function. It takes in a string, randomizes its characters, and outputs a new string. If this were a VIM it would also work with the 2D picture control since this has a data type that coerces to a string, and many string functions work on this data type. Of course randomizing a pictures bytes will result in garbage data so one might want to force that function to only work on the string, and not the picture data type which can coerce to a string. Here in my opinion is a good place to white list the data type, allowing for possibly another custom set of code which randomizes the picture in a known way. Anyway what I'm trying to say is personally I will try to use white listing (and black listing if it exists) as rarely as I can when writing VIMs. But still won't mind using them in places where I need them.
-
Web publishing does work in an EXE, but has many limitations and requires silverlight which is deprecated and only is supported in IE among other limitations. There are many 3rd party solutions for controlling a VI from a web page, and a couple 1st party that have issues. My personal favorite is this one, which the source is fully available.
-
Okay how about this. Attached is an example where you give an array of Bar Plot values, and a gradient graph is generated. It uses the gradient code I posted earlier, along with code to get the colors of the plot, and find their positions for replacing. It is somewhat robust in that the plot size and positions can change and the new gradient overlays should be placed in the correct locations. At the moment only positive values are supported. If you really wanted I think you could give the 3D look with some minimal effort. This is all using the picture control overlay feature of the graph, and on initial creation you can see the flicker between the normal solid bars, and then the overlays. Gradient Bar Plot.zip
-
I was going to suggest the 2D picture control anyway. I mean you probably can do some post processing like get the image of the graph, and then overlay an image of the gradient on top, but I don't think it is all that hard to draw a gradient bar. Attached is some code that does the trick and pulls code from the dark side. Gradient Picture Hooovahh.zip
-
First please post code, or snippets, but not pictures. You wouldn't upload pictures of notepad for a text based forum. Second if you are new to LabVIEW then you should checkout some of the free training online. 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 Introduction Self Paced training for students Self Paced training beginner to advanced, SSP Required But as for your specific question you appear to have rings and enums. A Ring is a numeric where a single value corresponds to a text element which can be changed at runtime using properties. An enum is type specific numeric that cannot be changed at runtime, and will likely have type propagation when the values in it are changed. Attached is a quick demo that shows the difference. The Item Mode is an enum and has two values it can be, while the Selection is a Ring that can have its values changed. Clicking OK will return the selected item by indexing out the right string based on its value. Ring Enum Demo.vi Also it appears this is for a class assignment. You may want to study up on any materials the professor gave you on rings and enums.
-
There are a few VIs not setup to be reentrant. There is a quick and dirty solution, which doesn't work quite as well as I'd like but may work for you. If not you are welcome to try to make improvements. The following two VIs need to be set to be reentrant preallocated in the execution of the VI: \FP Publisher\Websocket_class\Protected\Connection Listener.vi \FP Publisher\Front Panel Manager_class\Protected\FP Server.vi And then the Open VI References in these two VIs need to have a decimal 8 constant on the Options terminal. There are two in each VI: \FP Publisher\Websocket_class\Protected\Connection Listener Repository.vi \FP Publisher\Front Panel Manager_class\Protected\FP Server Repository.vi Once I did that I was able to make a second example, and run them both, and then get updates from both at the same time. The problem is the close function doesn't differentiate from one web page to the other, so running the Cleanup.vi on one, will cause all webpages to stop updating, and then trying to cleanup a second time will result in an error. To cleanup only one at a time, more work would be needed to track the name of the VI better but for now this will allow you to have multiple web pages going at once, until I or someone else gets time to improve it.
- 137 replies
-
I've been avoiding these functions since they are much less efficient than the variant to data functions. I made an XNode that you wire an array of variants to, and it will turn it into the cluster you told it. Of course if you don't like XNodes not written by NI you can do this normal VI that converts the array of variants, to a cluster variant, which variant to data can turn back into the cluster. Note that VI has a bug where clusters of size 2, 3, 4, or > 50 elements don't work properly. Also the Idea Exchange where Database Variant to Data function seems to do the same thing (also an XNode but by NI).
-
VI server method to get refs of all clones?
hooovahh replied to ensegre's topic in Application Design & Architecture
There is not a native way to do this. Clones are created and destroyed as needed, and I don't think there is a central place that keeps track of what ones are opened. In the IDE you can go to View >> Browse Relationship >> Reentrant Items, but I think this list is probably populated and maintained by the IDE and not some VI server pool. Your method would probably work fine as long as you remember to run that function and track them appropriately. -
Error 500 from forums.ni.com when logged in
hooovahh replied to Mads's topic in Site Feedback & Support
Firewall? Network restrictions? Have you tried starting in private browsing/incognito mode? This eliminates any left over cookie issues. I've been able to access the NI forums. -
Oh I'm very grateful for you getting this started and sharing it with the community. I've deployed a couple of projects that use this technology pretty successfully. There is plenty of room for improvement, I just don't have time for it right now, and all the features needed for my projects are complete so there isn't much motivation either from a business stand point. I think getting RT working well (with an included example) would be the next thing I'd want to work on. I'm not much of a CSS/HTML guy so adding more control types is something I don't think I would take on.
- 137 replies
-
String with multiple delimiters
hooovahh replied to Bira's topic in Application Design & Architecture
Here's my attempt. Not sure if it is the fastest but I didn't know if you wanted other information so I just wrote code that allows for N different delimiters, but all of which are a single character. Multiple Delimiter Hooovahh.vi Edit: Just noticed the <CR> is still there in my test, might want to perform a string subset, or trim whitespace on the last element. -
Oh man I didn't even read the old threads I linked to, didn't realize it was you that originally brought this to my attention. I've done that a few times with TDMS memory leaking bugs that I found only to search the forums to find...I had already found it and posted it.
-
This was a known bug a few years ago: https://forums.ni.com/t5/LabVIEW/XNET-ECU-Control-does-not-throw-a-Value-Change-Event/td-p/3106333 CAR #426378 was assigned, searching didn't come up with anything but I just tested it in LabVIEW 2016 32-bit in Windows 7 x64, with XNet 2017 installed and it worked properly so I think this is fixed. Just update your XNet drivers and you should be good. You can run 2016 LabVIEW with 2017 XNet.
-
You posted your first question to the forums on a Saturday (morning time in US), and then waited one hour before screaming "HELP ME" adding nothing to the question, and describing nothing new. You are being quite rude and those of us who put in our own spare time to have discussions and to answer questions don't feel compelled to help those who ask questions the way you have. That being said I've never used that DLL, and never used the Mandarin language, and assume it is a problem with Unicode support in LabVIEW. In the future if you want questions to be answered, ask it in a better way.
-
What do you actually want? What have you actually tried? Writing a string to a file shouldn't be difficult, and should be something covered in the first hour of a LabVIEW basics example.
-
In the development environment? You can't. The only hooks NI gives us to augmenting the IDE is through the menu bar (which is limited by typically are for entries in the Tools Menu), QuickDrop plugins (which get invoked by performing CTRL+Space, then CTRL+{Key} that you define), and starting in 2016 a right click frame work which works on objects that are right clicked. So you can define a menu to show up if a string control is right clicked, or a numeric constant, etc.
-
Glad you think so but there are plenty of things this project does in a less than ideal way when it comes to OOP. Certainly more dynamic dispatch would make adding new types easier but I never got around to improving it. I always thought a hardware abstraction layer like some posted on NI's site were good ways to get your toes wet in OO. http://www.ni.com/webcast/3431/en/ https://forums.ni.com/t5/Past-NIWeek-Sessions/Hardware-Abstraction-Layers-Using-LabVIEW-Object-Oriented/ta-p/3508682 http://www.ni.com/white-paper/53226/en/
- 137 replies
-
Okay after testing out a few things and being confused on why the last upload didn't, work I think I know your problem. So the demo is primarily setup to work on localhost. If you wan it to work on a remote system you need to tell the web publisher what your local IP address is. I left a comment on the block diagram next to the Publish function stating: "Here we can use the external IP address, in case computers on the network are trying to access this page. Unwired is localhost and will only work from browsers on this computer." So what you need to do is wire from the IP to String, to the Host Connection terminal on the Publish function. In my setup I also use port 80 not 8080, but I tested using XAMPP on IE, Firefox and Chrome on another computer. The reason I left this unwired is you may have multiple NICs and I didn't want to assume the IP address you want to use, is the one returned by the IP to String function and wanted you to be able to specify it. Maybe in another update I could have the configure dialog ask for these settings listing the IPs found by performing IPConfig
- 137 replies
-
- 1
-
-
For small development stuff in obscure versions Microsoft has VMs available for free download with a multi month time limit that can be extended, and snapshots that can be taken to extend this for quite some time. And many large companies have site licenses for Microsoft products where they aren't paying for each install with a full install price but sometimes just a key to use on that site as much as they want. But yeah if you don't fit into one of those two categories VMs are a bit harder to do large scale. Something as old as 8.5 should probably be in a VM just due to the legacy OS that it officially supports. Still I get the frustration.