Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by bbean

  1. how many points are in each plot of graphs you shown in your last post? 8192 or 30-50 Is the template trace pre-calculated before starting or is it an average of some set of the white traces (exceeding some threshold)? I guess I'm asking if you have multiple different thresholds for each color shown in the graphs?
  2. I'm a little confused. On your first post you show code and an example where you do a peak detection and than pop off traces from the data around those points (samples before and after). Is that all you need to do? Or do you need to do additional post processing on the samples before and after the peaks (analyze each set of data around the peaks). For example in the post with these screenshots: you show another threshold line. Is there a second post processing step (on the traces that were pop'd off of the original signal) that you want to do "online" with another threshold? Also do you want to be able to change the samples before and after in real-time as you are collecting data or can it be fixed for each session?
  3. Changing the colors of individual plots occurs in the UI thread and is "expensive". The secondary XY graph avoids this by making all plots the same color...in your case yellow? Some other things to think about: if you change your threshold value, do you want to remove the old yellow traces from the display if they no longer meet the threshold criteria? It gets more complicated that way. how long does the daq read take, you should explore pipelining to help speed up things as well. In the link A would be your DAQ and B would be your update of the buffer and display You make an exact copy of the graph and then use the tools pallette paintbrush, switch the color to transparent T, start erasing things on the graph that aren't needed (everything except the signal plots for the most part), and then move that graph over top of the other graph. Some ppl will call this a "cluge" and you have to make sure that if the x or y scale change on the visible graph, it also changes on the transparent graph. So programming challenges arise for instance if you allow the user to autoscale.
  4. the last snippet from ensegre is not working for me either. Point taken re 8192 points. On my laptop it takes about 20ms per plot update. How long does the daq take? Maybe pipe-lining would help here. Option 2 - decimate the data for display 8192 points or more exceeds the pixel width of the graph indicator area (unless he needs a super big xy graph and has a super monitor). For display purposes he could decimate the data with min/max and only display the #of points = pixels width of graph indicator. Then store the actual data in a separate buffer.
  5. Ha! I knew someone would be able to make it more efficient. Is the visible property faster than defer panel updates? Is there anyway to do the array operation inplace? or is there a "rotate 2d array" primitive hidden somewhere? Also I'm guessing a good portion of the execution time is redrawing all the plots when they shift 1 plot location on each iteration...but maybe I'm wrong.
  6. Nice. Building off of ensegre's solution, here is another option for ring buffer (below). I think its an order of magnitude slower, but it allows older plots to fade away. I think you will have to create two ring buffers and two graphs, one for displaying realtime data, and another for displaying your "selected plots", then make one graph transparent and overlay it over the other
  7. Sorry don't have too much time to help here, but try example code here for some guidance maybe: C:\Program Files (x86)\National Instruments\LabVIEW 2014\examples\Graphics and Sound\3D Picture Control\Using Meshes.vi
  8. Some self promotion here, but have you tried or seen this:
  9. Make sure all your power options are set so that the computer doesn't turn off when not being used (no hibernate, no sleep, no usb suspend, etc)
  10. Maybe this can help a little until 2016...Re-label Event Wire Xnode
  11. I put together a simple xnode to relabel event registration reference wires that feed into dynamic events of event structures. With the increasing use of event based messaging systems, I found myself manually changing the name of event registration references to clarify the event name when multiple event registration references were used in an object. I did this by manually creating a cluster constant on the build cluster before the dynamic registration terminal on the event structure and renaming each registration reference. Being a lazy programmer, this seemed tedious after a few times so I decided to attempt to create an Xnode to accomplish the same thing faster. This video shows the "problem" and the potential solution using the xnode: Re-Label Xnode - Event Registration Here's another example showing another use case with ShaunR's VIM HAL Demo code: Re-Label Use Case ShaunR HAL Demo This may have been done before or there may be an easier way to do this, but I wanted to throw it out here to see if there's any interest and to see if people will try it out and give feedback. I've found it works best using quick drop for initial use (highlight wire, CTRL-Space,type re-label, CTRL-I, type new name in dialog) and for replacing or renaming an existing instance on the diagram (highlight existing xnode, CTRL-Space, type re-label, CTRL-P, type revised name in dialog). You can also use directly from the palette, but I found much faster from quick drop and also seen a couple crashes replacing through the pallete. The Double Click ability is also a work in progress. Its purpose is to allow you to quickly rename the relabel with the same dialog box, but when it executes it breaks the wire on the output connection. You can still re-wire it to the event structure, but you will have to open the Event Structure Edit Events menu to get the event to "Re-link". Something I'm trying to avoid. The Xnode generated code is simply a pass through wire with the output terminal renamed to the label of your choice. This seems to update attached event structures. - B sobosoft_llc_lib_diagram_tools-
  12. Thanks for the heads up. I guess I'll have to sign up for the beta testing to get a peak.
  13. Thanks, I'll probably try the Copy ability. For future reference, can you upload an example Post-Install VI with the actions you described? Also is there a list anywhere that describes the syntax for "Reply" commands/states in the Xnodes? For instance, is there a way to force the AdaptToInputs ability.. (UpdateInputs maybe?)
  14. I created an Xnode that pops up a dialog when the user drops it on the block diagram for configuration. However, when I put the Xnode inside a Merge VI (so I can add it to a function palette menu), the On Drop Ability doesn't fire when the merge VI is used. I guess this is because its not really dropped but merged. Is there another ability that will handle this situation in a Merge VI? Couldn't find an OnMerge ability so I tried using "On Owner Change" ability, but it fires anytime you put code around the xnode (like a case structure, etc) or copy it to another diagram which could make the popup dialog very annoying quickly. On a separate note, why can't I add an Xnode directly to a functions palette menu?
  15. Thats where I was headed, but wasn't sure what the downsides to using the control reference were (other than speed I presume).
  16. In the attached example, I'm having trouble figuring out why the references Traverse G - objects.vi returns for typedefs do not have the control name embedded in variant data when they are registered for Value Changed Events (enabled diagram). It seems to work fine for controls that are not typdefs. If I explicitly find the controls using VI panel properties (disabled diagram), everything works fine but I have situations where the traverse Gobjects would be preferred since it can go through nested tabs / controls etc. Am I missing something simple. Typedef Value Change.vi
  17. Code looks the same as before. Where is new technology?
  18. Hi Porter, Very nice library you put together. One quick question. Is there any reason the RX/TX data and timestamps are not available as a Read Property from parent Modbus Master Class. In situations where a device could be either a serial or tcp modbus, it would be nice to have access to that information at the parent level since it appears (unless I'm missing something) that the data is common to both the TCP and Serial Class. Brian
  19. Can anyone give a link to Amazon or CDW to purchase the Microsoft Windows 7 license they run on their Virtual Machines (for a single developer/machine)? You will be my hero and I will owe you multiple rounds of beers. Or do people develop on Win7 VM's in the cloud on Rackspace or AWS? Or a tutorial about how to accomplish developer VMs / snapshots with a Windows 7 license? Added bonus LabVIEW version snapshotting/licensing. I gave up on Windows VMs after getting stuck in an infinite loop entering the Microsoft Licensing Vortex .
  20. I like the idea of having separate project based configurations stored on the local machine and being able to switch quickly between them. Would there be a way to "trick" VIPM/LabVIEW to point to "project specific" user.lib / vi.lib directories using symbolic links?
  21. Your code looks Ok. Have you tried using a serial sniffer (such as device monitoring studio) while the OEM software is running? This will give you a clearer idea of how it communicates if you are able to make the OEM software work. It looks like you have a bunch of duplicate COM ports left open, probably a result of not stopping the program gracefully. You can modify or use the attached VI to close these duplicate ports. (There may be a better version out there to do this but I can't find it right now) But I don't think thats the root cause of your problem. Also, try starting at address 1 (instead of address 0) VISA Close All.vi
  22. The best way to debug would be if the mfg'r provided a test software and you get that working first (without labview open) that will verify your hardware layer. Then move to LabVIEW and software layer. 99% sure its not the "functions" you are using. If you don't have access to the mfg's software, start at the hardware level and read the OEM manual (i couldn't find it on line): Is the interface RS-232, RS-485, or RS-422? Does your USB to Serial converter support the hardware layer above? If its RS-232 to you have the TX and RX lines swapped incorrectly? Are you sure the COM port is assigned to COM1? Plug and unplug the converter and see if COM1 disappears from windows? Moving to the software layer What does the manual say the default COM settings are? Baud Rate = ? Parity = ? Data Bits=? Stop Bits= ? What is the default Modbus device address? Based on your screenshot, it looks like you are trying to read from a starting address of 0. Usually the address is a higher number. Do you have the address list from the mfg?
  • Create New...

Important Information

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