Jump to content

hooovahh

Moderators
  • Posts

    3,392
  • Joined

  • Last visited

  • Days Won

    284

Everything posted by hooovahh

  1. Using another LabVIEW program control values can be changed easily. Just open a reference to the VI, get references to the controls, (usually by name), and invoke the Value (Signal) method on the control, all using VI Server. A better solution might be to add functionality into your application to perform automated testing, which invokes a state machine.
  2. Well I started wiping my INI settings and found that removing the QuickDropKeyboardShortcutMappings line fixed it, but removing just the QuickDropPanelShortcuts and QuickDropDiagramShortcuts didn't fix it. Still LabVIEW doing weird stuff, but just to me I guess.
  3. So on the topic of weird LabVIEW stuff I had a few today. I noticed a couple my quick drop functions not dropping what they should be. Now this might just be a result of my custom quick drop shortcuts, but I don't have any shortcuts for the Copy or Delete functions. I recorded my oddness here. Anyone seen anything like this?
  4. NI themselves do not record sessions, all recorded sessions are from volunteers who bring their own equipment, and provide their own bandwidth. Since Mark could only be in one session at a time, he only has the sessions he attended available. Apparently the FTP has both videos from Mark, and Shane (Intaris). All the videos numbered 001-017 were recorded by Mark The videos numbered 101-112 were recorded by Shane As for other recordings they are all done by individuals and you'll just have to talk to others who choose to record sessions. I haven't seen any posted online yet, other than the ones already posted here.
  5. Well that sounds terrible, but also something I can't say I've seen. Do you have a simple VI that exhibits the issue that can be ran to reproduce the issue? What OS and LabVIEW versions?
  6. So I'm not changing the calling VI for the fun of it, and I believe I'm doing it in a safe-ish way. I know it isn't conventional but it has a purpose. And the intent is to leave the VI the way it was found when the user right clicked. So the the purpose of the code in the for loop is to detect if the disabled structure that was right clicked was a normal Disabled Diagram Structure, or a Type Enabled Structure. I could only think of two ways to determine what type of structure was clicked on. Either export an image of the structure and do some image analysis on it since the borders differ, or the more obvious solution was to try to set a case to be enabled and then see if it actually gets enabled. If it doesn't then that means the structure is a Type Enabled Structure, and if this is the case then I don't want the menu to show up to replace it with a Type Enabled (because it already is one). As for the creation and removal of frames. I thought of a case where a structure exists with only one frame that is already enabled, how could I test to see if this is a DDS or a TES? So if there is only one frame, then I add a second frame, try to enable it, and then delete it when I'm done, so the user couldn't have right clicked that frame, because it didn't exist until after entering the builder VI. So if I enabled a case for a test I will enable the original one back, and if I added a frame I will remove it with the goal being that the VI is untouched, with the only purpose being to detect what type of structure it was the user clicked on. But to be fair I can think of another solution. I could copy the structure to a new temporary VI, then do this test on the newely pasted structure, but that sounds slower, especially if there are N structures to evaluate. Maybe the image manipulation method would be better. I suppose it is too much to ask for a way to detect what type of structure it is through a private method or some super secret tag, or something? Edit: It seems my other method might not work either, is getting the image of a object resetting the undo stack as well?
  7. Sure thing, attached is a somewhat crude approach that isn't easily scaleable but I think it is pretty simple. You have 4 shift registers for the data to log, and 4 more for the data in the graph instead of chart which has the benefit of having it's own buffer, but you have less control over it, like when it gets updated. If you have more than 30 samples of data log it, this should be roughly once every 500ms. This can be increased or decreased as needed. After getting 30 new sample the data is appended to the end of the graph data, but if more than 1000 samples are in a graph, only the last 1000 are kept and shown. Also the graphs will only be updated at most every 250ms. Then after it stops executing the samples in the buffer that haven't been logged yet, are logged. This will be samples between 0 and 30 that haven't been logged because there wasn't more than 30 at a time yet. I also added a feedback node to measure the loop rate and put it on an indicator and chart. Removing this will likely cause better loop rates, but if I were you I'd be curious what rates you get, and maybe remove this code once you are sure it is working well enough. TDMS_Logging_Simple_4chan hooovahh edit.vi
  8. As far as the code goes I think it is pretty simple, and looks right. You have continuous sampling which is good, multiple finite reads is something I wouldn't recommend here. I might suggest a few improvements to have better performance, not that what you are doing is wrong. But I notice you are reading 28 samples at a time, and your DAQ session is setup to sample at 1612.9 Hz. This means your loop rate will be no less than 17ms per iteration. This seems relatively fast. Imagine if updating the graphs, and redrawing them, and logging the samples to disk takes 20ms what will happen? Well samples won't be lost, right away it will just lag behind, and the data you log will be more and more from the past, until your DAQ read buffer fills up and then you'll get an error and stop. Also even if you don't full the buffer and error out, clicking Stop will stop and the data in the buffer that you haven't read out yet won't be logged either. To help with this you can choose to not update the UI with every iteration, but instead just update it a couple of times a second which will probably be enough for most users. Also instead of logging each sample as they come in, you can build a buffer of samples, and then when you get so many, log them at once. The overhead of logging single point data to a TDMS can be larger than the payload of data to log. This may mean a few changes with shift registers to keep track of the data in your own buffer, and changing the charts to graphs. Of course a more simple solution if you can get away with it is to take more samples at a time, or making a seperate loop where you log, and update the UI.
  9. So I'm apparently terrible at handling the undo stack but I can detect when you right click a TES or a DDS. All you need to do is attempt to change the enabled case away from the current one. A TES can't have an arbitrary case enabled, it will always enable the first one with no broken wires. So with scripting you try to enable case 1 and if it doesn't get enabled then it is a TES if it does get enabled it is a DDS. I tried fixing the undo but I just couldn't figure it out. Currently right clicking on any structure will wipe away the undo stack. I tried doing a begin and fail but an undo begin has already started as part of the right click API so I'm not sure what to do in that case. Replace with TES.llb
  10. I haven't used one personally, but the answer I got from NI was yes. Things like right click events, mouse down, mouse up, etc in an event structure work, but I think they only work from the embedded UI, and not from the remote front panel connection if you are connected from a host.
  11. So glad to hear that. I swear I looked into this less than 4 years ago and found the array searching code. I made the Variant Repository code because I wanted something light weight, and fast. I wouldn't have made my own if CVT at the time met my needs.
  12. Well some people started using Bing, I never used it but I hear you can Google with bing. I hear it is a good website for doing internet searches, I know this because I googled it.
  13. So in a presentation about XNodes I was asked a question about what were the valid "Reply" options for an XNode ability. Some abilities have a reply as a 1D array of string and it appears to work like a QMH where you provide a list of states to go to and it does them one after another. I didn't know the answer but I knew scripting could help. So I scanned a bunch of XNodes for what strings were on the block diagram going to the reply and here are the abilities, along with the reply strings I've seen used. AdaptToInputs UpdateTerms UpdateImageAndBounds GenerateCode ForceAdaptToInputs Copy GenerateCode UpdateTerms UpdateImageAndBounds FailTransaction DoubleClick FailTransaction UpdateTerms UpdateImageAndBounds GenerateCode GenerateCode PreserveUserCodeGUID GetError Message UpdateTerms UpdateImageAndBounds GenerateCode FailTransaction ForceAdaptToInputs OnFontChange UpdateImageAndBounds UpdateTerms OnOperateClick UpdateImageAndBounds GenerateCode OnResize UpdateTerms UpdateImageAndBounds GenerateCode OnDrop UpdateTerms UpdateImageAndBounds GenerateCode OperateClick ShowMenu RefeeChanged GenerateCode UpdateImageAndBounds UpdateTerms RespondToDrop GenerateCode UpdateTerms UpdateImageAndBounds SelectMenu UpdateImageAndBounds UpdateTerms GenerateCode FailTransaction ReplaceSelf Size UpdateImageAndBounds UpdateTerms GenerateCode UpdateState GenerateCode ForceAdaptToInputs IssueWarning UpdateStateWithRef UpdateImageAndBounds UpdateTerms GenerateCode ReplaceSelf So the unique values that I've seen put into the Reply are the following. I am unsure if only some abilities only support some replies. UpdateTerms UpdateImageAndBounds GenerateCode ForceAdaptToInputs FailTransaction PreserverUserCodeGUID GetError ShowMenu ReplaceSelf IssueWarning As for what do these do? Well some are more obvious than others, but here is some text I found in one of the XNodes that helps: FailTransaction: LabVIEW will abort the current transaction. This will avoid putting transactions in the undo list when the user just hit cancel. GenerateCode: This will cause a type propagation if appropriate, and will cause the XNode to GenerateCode when type propagation is run. UpdateImage: LabVIEW will call Image and invalidate the XNode. UpdateImageAndBounds: LabVIEW will call Bounds and Image and resize and invalidate the XNode. It will not call Size. Size is only called if the user resizes the XNode (so that you may update your state and return this reply). Make sure that if your terminals need to change size or location, you also return UpdateTerms. This reply will set the transaction type. UpdateTerms: LabVIEW will call Terms and create, delete, and move terms as necessary. ForceAdaptToInput When mutating an old, unconfigured Express VI, we need to ForceAdaptToInputs before code gets generated. AdaptToInputs used to always get called before GenerateCode. But that is no longer the case in LV2011.
  14. Perfect, then just make a shortcut for "Chooser" or "CH" or whatever you want, now you can type that instead of traversing the palette. BTW I know you have tough skin, but I don't want to be unnecessarily harsh or snarky. All the benefits of 2009 you mention are things that I have no interest in. But the benefits I've seen in the last 7 years are things I use daily. This is probably short sighted, but if NI decided to only support Windows, and only support 64 bit, I think they would benefit overall. They would upset a few percentage of the user base, but cut out a decent percentage of regression testing and development. Now if I were in that few percentage of the user base I admit I wouldn't be happy. From one year to the next I agree with you about upgrades. If you are on 2009 no need to pay the multiple thousands of dollars to upgrade to 2010. But if I were on 2009 I could justify the cost of upgrading, assuming I don't have the limiting issues you mentioned.
  15. So the advanced user track seemed to be a pretty good success but maybe I'm biased. The user track presentation content can be found on the NI Community here. Or possibly in the NI Week Content subforum, and of course Mark was awesome enough to record all the sessions and has it's own thread here on LAVA. If you attended any of the sessions (or any NI Week session) I encourage you to give feedback wherever NI takes NI Week feedback. I word it that way because I've heard reports that the session surveys had issues.
  16. Okay now that LabVIEW 2016 is out, and the Mac version of 2016 is also out, I went and downloaded these VIMs that were in the user.lib. I hope I'm not doing anything wrong in posting them here, because these are files that are just available in the evaluation install anyway. When asking around the unofficial name for this new structure that automatically enables which ever case has no broken wires is the "Type Enabled Structure". It looks and behaves very similar to the disable diagram structure but specific cases cannot be enabled by the developer, and the border is a bit thicker. As always with unofficial features, don't be surprised if it changes functionality, or support, or gets removed with new versions of LabVIEW. My presentation on XNodes, and VIMs is available here, under the 2016 Advanced User Track. 2016 User.lib Macros.zip
  17. The CVT is extremely slow (is that an overstatement?) and the variant attributes look up table will probably be on the order of 100X faster (no test at the moment). I've been using my Variant Repository (which uses Variant Attributes) for a few years now for messenging APIs because I figured it was the fastest solution. This improvement just makes it even faster and I'll likely update my Variant Repository to use the IPE instead.
  18. That sounds like some vary valuable feedback that I'm sure NI would have appreciated in February when the beta opened... But to be less snarky some of the complains you have were brought up in the beta, I especially share the comment about wasted space. The Drag and Drop however I don't have much of a problem with. I have yet to notice an impact on my development style, if anything I think it is an improvement but that's just me. Honestly 2016 isn't full of major changes. The addition of Channel Wires (officially) is one of the few major improvements but it isn't doing anything functionally you couldn't have done before. The other major point I remember is the greedy or not greedy selection (I think it is shift). Beyond that the inclusion of the Type Enabled Structure (no name officially) that Jeff K eluded to is neat, but of course has a limited use. Having VI Macros be slightly more official is nice too. Just name a VI, a VIM and drag it to your block diagram and it works, no INI keys needed. Of course some INI keys are useful for debug. The initiative to have more support for 64 bit has continued too with a few toolkits I actually use. There is also the IPE structure for Variant support, of which I haven't benchmarked yet but intend on using. I remember hearing a few new right click menu options were added, like convert to color box and back for constants. There are of course other features that I heard about, but are pretty specific and fixes or improvements for hardware. In general if I were an independent developer and needed to spend an extra few thousand dollars for 2016 I wouldn't justify it given the preview program I hope you now understand maybe a bit why releases have been light on the new features. But if I were stuck on 2009, I could justify the cost of upgrading. Far too many of my applications use some newer features that would make life a bit of a pain for sure. Oh and to answer your original question I don't know of any config or INI setting that changes the functionality.
  19. LAVA has won an NI award for LUGnuts at NI Week, the largest independent online user group. Thank you everyone for making the online community something to be proud of.
  20. Yeah if you default to one you are going to upset one group of people or another. I would guess NI's thoughts were it you wanted to read a control just use its terminal, and a developer would be more interested in writing a local variable. If you aren't CTRL dragging yet you would be. I is a bit odd that that operation does something different than a copy paste but I like it.
  21. OOOOhhh, yeah I've never used that feature but it seems to be a feature of the Waveform Chart and not the graph. http://forums.ni.com/t5/LabVIEW/How-to-stack-plots-using-Waveform-Graph/td-p/329917 The good news is a Mixed Signal Graph can look and behave in a similar way. Graph Test 2.vi
  22. I still don't know what you mean by upper and lower stack, is this a graphing term I should be familiar with? Do you mean two separate Y scales? Cause that can be done as well with one on the left and one on the right. This was also why I asked for a picture since I wasn't sure what you were talking about. Glad you seem to have something working or close to it.
  23. If I understand you right you want this. Here I did it with a Waveform Graph, but it could be done with XY, and probably a chart. Graph Test.vi
  24. I don't think what you are asking is too difficult, but I'd rather see a picture of what you are trying to accomplish. So I understand where the 6 lines come from, A Minimum, Maximum, and Value for two separate measurements. But what are the 2 stacks? I think this can be done pretty easily with an XY graph but I might be misunderstanding your needs. Also keep in mind that the XY graph also has the ability to place static images on top, or behind graphs using the Plot Images property node. With this you should be able to also overlay anything you might want on the graph that isn't immediately respectable with XY data.
  25. I don't understand. Are you writing CAN or reading it? Are you using NI-CAN or NI-XNET? What is your hardware, is it NI based even? Post your code. That being said I've never had any problem reading or writing CAN frames at different rates in any API. Oh and if you are new to LabVIEW here is some free training: 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 6 Hour LabVIEW IntroductionSelf Paced training for studentsSelf Paced training beginner to advanced, SSP Required
×
×
  • Create New...

Important Information

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