-
Posts
97 -
Joined
-
Last visited
-
Days Won
7
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Taylorh140
-
I find myself frequently looking for a good pattern for collecting a pool of array elements until they reach a certain size and then removing the oldest elements first. I have used very stupid methods like a bunch of feedback nodes being fed into an build array node. But today I thought up one that I really enjoyed and I thought that I'd share it. Its a simple pattern and no crossing wires . Perhaps someone has thought of something better, if so don't hesitate to share.
-
String with multiple delimiters
Taylorh140 replied to Bira's topic in Application Design & Architecture
-
Will statecharts survive to move to nxg?
Taylorh140 replied to Taylorh140's topic in Application Design & Architecture
This is a really nice step in the right direction. It is notable that this kind of development seems easier for developers of nxg than traditional LabVIEW, perhaps they cut out a great deal of development overhead. -
I have to admit I've never gotten to use the state-chart module on a project, but I've always wanted too. I really enjoyed it when i evaluated it, but i worry it wont be available to nxg users... ever. Of course I can hope that it will be re-tooled and better than ever on nxg. What do you guys think will happen?
-
After working on the set cluster element by name xnode, it made me realize i could use the same concept to convert a variant array to a cluster. The technique is actually pretty simple, the xnode generates a case structure for each element in a cluster in cluster order, wherein a bundle by name is used to set the value and an unbundle by name is used to get the type, a variant to data is used to convert the data. This has some benefits over some methods, you are not limited to 255 elements, although that is not usually the case some of us are paranoid that clusterosaurus giganticous will be larger than expected. It also has a draw back that is that when converting from a variant array all the elements must have unique, non-blank names, and this is usually the case. I think this technique (though very brute-force) might be useful for some other things let me know what you guys think. VariantArrayToCluster.zip
-
Set Cluster Element Xnode (experimental)
Taylorh140 replied to Taylorh140's topic in Code In-Development
-
Set Cluster Element Xnode (experimental)
Taylorh140 replied to Taylorh140's topic in Code In-Development
I added a LV2013 Version, I hope that helps. Let me know if you have any issues or comments. I have always wondered why this isn't a standard function. -
This Xnode allows setting a cluster element by label string without using references. I pulled a great deal of inspiration from Hooovahhs Variant Array to cluster xnode, which i suppose this could be used for, another benefit is its not limited to 255 elements. Its mostly experimental because I haven't used it much. SetClusterElement.zip SetClusterElementLV2013.zip
-
I noticed a little gem that was added, the "Is Value Changed.vim" but i found its implementation curious. typically when i want this functionality i would use a feedback node. Are feedback nodes becoming taboo?
-
I think you rediscovered the source! Thanks! (this seems like an updated version of mine.)
-
There is often a disconnect from what IT wants and what is needed for Testing. One of those things is windows updates, IT really needs interconnected computers to be up to date. But often this means a policy that forces computers to shutdown and reboot, which is awful for longer test. (the solution for this one is difficult to say the least). Another is forced logoff and locking screens and such. IT policy on power saving is usually the more the merrier. However when running Test this kind of thing needs to be disabled. I certainly do not want my computer hibernating when I am running a test. (this doesn't include weird USB power saving settings) I have seen some interesting solutions to this one: Mouse Jigglers -> These exist as both hardware and software solutions. (what has the world come to?) https://www.amazon.com/dp/B00MTZY7Y4/ref=cm_sw_r_cp_dp_T2_1YOqzbZXHNQW2 Disabling power settings in windows (requires admin) (sometimes group policy can reset this) My personal favorite:The Prevent Screen Saver which is attached. (I don't remember where I got it from) It uses the same call that the windows media center does, to prevent the system from sleeping. Its also nice that when the application closes the screen can lock again which I find better. Also it doesn't require admin. Testing requires the system configuration to remain largely static. however for security reasons this rarely happens. Testing would like internet access to send notifications and pass information to outside data-servers. Some solutions like an air-gap are not really a complete solution. what is really needed is a one way communication valve. So the testing computer can notify and send data but cannot necessarily receive it back. This also implies that data exiting the computer must be guaranteed to be collision-less to prevent data-loss since handshaking would not be possible. Perhaps Virtual images will provide a solution in the future but I still think they integrate poorly with hardware. I think that in general Windows standard settings align more with IT than what is required for good LabVIEW stuff. There is a great many things that need to be considered for long test using LabVIEW on windows, and the number is increasing every new windows release, and IT isn't helping. It would be nice to have library to handle these needs (maybe the windows people have a plan ). PreventScreenSaver.zip
-
Currently SVN, tortoiseSVN. (separated source code from executable). I would change to git, but i haven't decided the best implementation or client.
-
USB2.0 High Speed Serial Communications
Taylorh140 replied to Gary Armstrong's topic in LabVIEW General
Most Uart devices don't support that data rate. I guess maybe make sure that the USB device supports it. I have only seen one that support this baud rate. I think it was an NI device. Your generic USB to uart usually caps at 115200. -
Automatically Adding Build Date To Front Panel
Taylorh140 replied to Taylorh140's topic in LabVIEW General
When Trying this in a larger project I seem to get the following problem: Error 1017, (I seem to see this error quite a lot since i started working from a networked drive.)- 8 replies
-
- configuration
- lvscripting
-
(and 1 more)
Tagged with:
-
Automatically Adding Build Date To Front Panel
Taylorh140 replied to Taylorh140's topic in LabVIEW General
@hooovahh If i could be so bold as to ask, and i am indeed very interested on how you use SVN with LabVIEW. (Maybe we can talk at NI week 2017) My setup uses tortoiseSVN and no plugins to SCC like the one provided by pushok. I have separated compiled code from VIs (although i seem to still get changes that lvdiff describes as no change) I use externals for components that i use between projects. What do you use to pull in the current SVN Version? Do you induce a commit during pre-build to help guarantee reproducible builds? How do you manage the configuration of the code in (vi.lib and user.lib)?- 8 replies
-
- configuration
- lvscripting
-
(and 1 more)
Tagged with:
-
I think you might be looking for the cross-correlation function. https://en.wikipedia.org/wiki/Cross-correlation
-
So for a while, I have wanted a good way of identifying my builds and one way is to add build date to the front panel. Typically I had done this manually, I have searched for a good solution for automating this but, but typically the answer is very obfuscated. Then one day I had a thought, I could use VI scripting to generate a VI holding a constant and in a way use it as a pre-processor to make things happen. I'll provide a rough outline and a project of how I made things work. And who knows maybe someone has an even better solution. I suppose it was kinda obvious that this could be done, now that I think of it. I think lv scripting was introduced in 2012 and is needed for this example. First Create A VI that generates a constant via LV script. Use it in your Top Level VI or wherever you would like the compile time constant to be visible. Generate a A Pre-build Action.vi that calls your VI generator. Now you can have compile time constants that are up to date! I included an example project let me know if the same thing works for you. BuildDateOnPanel Ver12.zip
- 8 replies
-
- configuration
- lvscripting
-
(and 1 more)
Tagged with:
-
It was a niche use-case, 99% of the expressions were only ran 1 time. I did look at that Expression Parser. If it would have worked i wouldn't have gone through the trouble of building this monstrosity. but at the end of the day it had to support more than just numeric types.
-
I have Created a dll that takes a variant pointer and sets the value to a string. Its very simple... But i want to easily move information to and from LabVIEW with very little overhead. I was wondering if there was a equivalent C api for Get/Set variant attributes? cviauto.h has many variant related functions that work well for manipulating data inside the variant but i can't seem to access the attributes.
-
I have been using the D programming language (http://dlang.org/) lately, I like that its not a preprocessor dependent and that it compiles to machine code nicely. I personally hope it becomes C++ successor.
-
I would like to present one of my latest projects, a port of the Gold Parser Engine to LabVIEW. It was not easy, I needed More advanced evaluation than the Built in LabVIEW functions could offer, so I found the Gold parser engine for Java and VB, and yes i could use the .net but I couldn't get it to work well with reentrant calls to parse multiple things in parallel. So I put this together, I would like to polish it with the LV community, And Make it work even faster than it is already. I would like to thank, Devin Cook and Ralph Iden, for their excellent work on the previous Engines. In case you're not familiar with Gold: GOLD is a free parsing system that you can use to develop your own programming languages, scripting languages and interpreters. It strives to be a development tool that can be used with numerous programming languages and on multiple platforms. I use it mostly to build AST out of strings of text that represent short snippets of code. The Source comes with an Top level example of how a recursive evaluator can be implemented. But it can be used for many LabVIEW things including a 100% native XML parser, 100% native Scripting language... and the idea is that its native so that's nice. Performance: I haven't tested long source strings for performance but currently it is working really quite quickly. Sub milliseconds for the numerical evaluation example. LabVIEW can be really sneaky making extra copies when you don't really need them. I have tried to do somethings to increase performance more. Alot of the items in the parsing VI are subroutines. And I have added Swap Values as a common performance tool. It is really cool. especially when working with class private data that doesn't deserve an in class function. eg. Tokens contain other tokens that can be evaluated recursively, however it doesn't make sense to put the eval function in the token class. As AristosQueue posted here http://forums.ni.com/t5/LabVIEW-Idea-Exchange/New-in-place-element-structure-option-class-property-node-read/idc-p/2515866#M24026 After creating a grammar This example uses Devin Cook's Operator Precedence example. As you can see a string goes in and a number comes out. Parser engine has an application to test and verify grammars. This engine only except egt format. The above grammar has 15 symbols. I think of content as leaves on a AST (abstract syntax tree) and Nonterminals as Branches that have more leaves. Productions are a list of how each NonTerminal can be configured I like to think of it as a list of cases to handle. It turns out that this makes a pretty simple recursive evaluation scheme If the Token is Content I see what type by getting the table index and using a typedef with all of them listed. In the case of an integer i get the value from the string and return it. However if the Token is a NonTerminal, It can be handled by Sending the Tokens contained by the token into the recursive function and using the values. You can see that the Production: <Muiti Exp> ::= <Multi Exp> '/' <Negate Exp> Contains 3 tokens. I want to evaluate the Value associated with the <Multi Exp> so i get the sub token at index 0 and <Negate Exp> at index 2. You can find the Code here: https://decibel.ni.com/content/docs/DOC-41064