Jump to content

Grampa_of_Oliva_n_Eden

Members
  • Posts

    2,767
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by Grampa_of_Oliva_n_Eden

  1. Hi All,

    I want to write a program which plots data on a surface graph then

    allows the user to click on the graph and "mark" points on the plot. The

    program should change the color of the "marked" points on the graph.

    I wrote the attached code which uses "event structure" and cursors to do

    the job. I used cursor to read the X,Y,Z position of the clicked point on

    the plot and store them in arrays. These arrays then were feed into a

    new plot added to the graph using CWPlots3D.Add() method. However, my

    code does not draw the second plot (which would show marked points in

    green) nor it does not get the marked points coordination correctly. I

    appreciate your help to correct the code.

    Thank you

    Starting at reply #7 in this thread on the NI site

    http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=144155#M144155

    you will find example code that demonstrates most of the functionality in the CW 3d graphs. Please read those posts and try out the code I posted.

    It sounds like you are not redrawing the plot after you add the new points.

    Ben

  2. I am customizing a push button control. I added a regular push button control on the front panel and navigated through advanced > customize. I wanted to delete the shadow background of the push button, but wasn't able to delete any of the picture items.

    As a work a round I resized the shadow pictures to small sizes and made them transparent.

    But how on earth do I remove them completely?

    Same issue if you start with a control from the classic palette?

    Ben

  3. Have you done some benchmarks first to make sure 1500 variables is going to fly? I have no idea about the latest LabVIEW DSC versions, but from what I know they are based mostly on the shared variable engine technology and I have in fact some doubts that technology scales well. So before going through all that hassle I would make sure I can operate with a reasonable amount of variables first.

    As to automating the binding to front panel controls you might be able to get at that information through the scripting API. In that case you could fairly easily create a little tool yourself that does whatever automation you feel is right.

    Ditto that!

    I have managed more than 5000 using the old version of DSC (pre-shared variable) and it ran well even on the 400 MHz PC it was deployed to. Modern PC maybe able to handle the I/O via DataSocket read/writes so it would be a good idea (as Rolf wrote) to benchmark the performance to minimize that risk.

    Ben

  4. ...

    For deployment reasons I want all my builds to boil down to a single executable (nor do I want my source floating around). Any idea why this is happening and how I can fix it?

    Thanks!

    I believe your classes are worthless with the parent class. If you build the parent into the exe then anyone that wants to steal your child classes will not be able to do anything with them.

    Ben

    • Like 1
  5. This sounds like when I can't trust my daughter not to eat a whole bag of M&Ms so I have to just give her a few at a time. In other words, I don't believe she is mature enough, or smart enough to make the right decisions, so I limit her options.

    When you're talking about a 14 year old, that's reasonable. When you're talking about all adults over the age of 18 in the USofA, it sounds a bit patronizing.

    All of this being said, the majority of voters are for term limits (or have been in the past). "We The People" have voted to limit ourselves. And if/when "We" decide "We" are mature enough to handle it, "We" can vote to remove term limits. That's what democracy is all about.

    Of course this isn't going to happen any time soon, since most of us as individuals think "We The People" are just an unruly mob who can't be trusted to vote the "Right Way" (as I can't trust my daughter in the M&M example).

    I personally think that term limits should be abolished whenever MY party of choice is in power and reinstated otherwise. tongue.gif

    OK take another approach Ben.

    Maybe its just me but I get a sense that the politician feel they are better than the rest of us and they know better so we should just shut-up and listen to what they are telling us. Their behaviour suggests (to me) that they are in a different class than the rest of us. For me this seems to arise from being a "proffesional politicians" where their only real job is to get re-elected so they can stay in power.

    So what can WE do to get our public servant to understand they are our servants and not our superiors?

    Looking for your opions,

    Ben

  6. A couple things:

    1) Why, when I create/reply to a post, is there now a line above it saying "Topic Poll" and a button saying "Manage Topic Poll"? And the "Post New Topic"/"Add Reply" and "Preview" buttons are missing from where they have been conveniently placed above the post.

    2) My "View Unread Content" is often not updating after I read a post. This may be my browser (IE7), but it's worked fine in the past.

    Staff?

    ben

  7. I don't agree with term limits - I think if a representative keeps getting voted in by the people they represent then so be it. I don't think there should be a law stopping the people from electing who they want to represent them, and that's what terms limits does.

    In an ideal world I am the same page. But I feel we are not living an ideal world so we have to adapt. George Washington set a good example by walking away when they wanted to make him king. All that followed him thru the presidency followed that example until FDR. FDR was still warm when term limits were put in place for the president. I don't believe in coincidence.

    Ben

  8. Interesting thought... what have we taught them and what do we want to teach them.

    One of the things I beilve we have taught them is they can buy our vote by passing laws that take money from my neighbors pocket and put into ours. The progressive income tax system let them contrive a scheme where they can treat one group differently from another group thereby giving the polotcal types the option to buy-of one groups vote with the money from another. Oss the progressive income tax and switch to a flat tax system. We have also taught them that they can crate a set of rules we can't touch (senioritiy rules in congress) that put incumbants in a position where they have power over their peers just because they have been elected more times than their peers. I don't see how a history of a congresional district being consistantly stupid over a large period of time, why their rep should have more clout. So term limits and no seniority rules.

    I think the biggest leason we have to re-teach is "They do not make us happy when they spend our money and put or childrens future in jeopardy."

    Ben

    OTher leasson we need to teach...

    They work for us and not the other way around.

    What is in the constituion does matter.

    Never sign (vote ) for anything you have not read.

    Ben

  9. That's because our leaders are elected to delegate work to their constituents.wink.gif

    Interesting thought... what have we taught them and what do we want to teach them.

    One of the things I beilve we have taught them is they can buy our vote by passing laws that take money from my neighbors pocket and put into ours. The progressive income tax system let them contrive a scheme where they can treat one group differently from another group thereby giving the polotcal types the option to buy-of one groups vote with the money from another. Oss the progressive income tax and switch to a flat tax system. We have also taught them that they can crate a set of rules we can't touch (senioritiy rules in congress) that put incumbants in a position where they have power over their peers just because they have been elected more times than their peers. I don't see how a history of a congresional district being consistantly stupid over a large period of time, why their rep should have more clout. So term limits and no seniority rules.

    I think the biggest leason we have to re-teach is "They do not make us happy when they spend our money and put or childrens future in jeopardy."

    Ben

    • Like 1
  10. From my understanding, the difference here is that you're pulling from a template, not dropping new components. If you can find where those templates are stashed on disk, you should be able to open them up, untick autogrow, and save them back. Thereafter, no more autogrow!

    After you find them write down where you found them becuase you will have to repat that operation when you upgrade to the next LV version (been there done that).

    Ben

  11. A functional global *is* a subVI with an unitialised shift register that stores data. You can do more with it than just that (hence the "functional" part of its' title), but all functional globals have the unitialized shift register as their basis.

    I have seen two exceptions to that rule, one good one bad...

    The FG could be wrapping up a single element queue to stor the data (good)

    The FG could be using off-icon-connector controls to store the data (bad and down right cruel to expose a young G-babe too. I still wince thinking about it).

    Ben

  12. I've been looking at some LV code that looks like someone wiped their...

    ...

    ... screen with a magic marker? shifty.gif

    THe mention of wiping reminded me of a trick I learned from a fellow engineer that may or may not be common knowlege. I fixed a white board i found in the trash that was apperently ruined becasue someone used permanent marker to write on it. Trick: color over the permanent marker with the markers made for dry-erase boards. The solvent takes the permanent stuff off with a simply wipe.

    Ben

  13. Is there a reason you haven't tried the tabbed approach? Where tab 1 has just one graph, tab 2 has two graphs, tab 3 has three, up to the number you want. Then color the tab to be transparent (so the user doesn't know it is a tab) and then control which tab the operator sees.

    That being said I've never had the "Scale FP objects" work properly for very long. Usually I could resize once and it would be okay, then I would scale it back to where it was and every thing would be moved around slightly, and alignments between objects would fail. Maybe grouping them would have helped.

    The "docking" approach I mentioned earlier works very well with the "Scale FP Objects" when I have only object in the Undocked panel.

    Ben

  14. A looong time ago (2001?) when I was designing a GUI I needed to be able to show from 1 to 4 waveform charts on 1 screen, in separate plots. If there was 1 plot, there was 1 big chart, if there were 2 plots, there were 2 narrow horizontal charts, and if there were 3 or 4 plots, they were each in 1 quadrant of the screen. To make it even more fun there are two different sets of plots (the other is an XY graph) I need to do this for.

    At that time my intention was to stack all those plots on top of each other and make them visible/invisible as needed. This had a tendency to crash my computer. There was some issue with LV back then about stacking lots of stuff on top of each other and manipulating it in that way. So what I did was instead of making an unneeded plot invisible, I moved it to another (hidden) part of the FP. When I needed it again, I moved it back to the right place and resized it according to how many plots there were. While painful, this has worked okay.

    Flash forward to 2010... my Users now want to be able to resize their windows on-the-fly. While LV does allow one to "Scale Object with Pane" for selected objects, it unfortunately gets very confused when those objects are off on some other part of the FP. Not that I am surprised or would expect otherwise.

    Since my current layout doesn't work, I've been revisiting the stack-and-hide concept. This seems to work better with the resizing, as long as you don't get too wild with it.

    My question for you all is -- have any of you tried this with recent versions of LV? I will have somewhere in the neighborhood of 19 plots stacked on top of each other. This is going to take some major recoding, so before I head down this way I thought I'd check around here and see if anyone had any experiences with doing this.

    Cat

    I have a set of sub-VI that let me realize "un-dockable" regions of the GUI. see reply # 18 in this thread.

    http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=351512#M351512

    The customer I developed this code for was very happy with the effect since it lets them expand what they wanted and ignore what did not matter.

    Ben

    • Like 2
  15. I have code that uses strictly type def'd structrures and another programmer has some code that I want to reuse as much as possible in my project. Essentially he has parsed a file of data that ultimately will come from a database file and displayed the contents in tables. I now have a need to take this data and use it in my code where my type defs are identical to those in the parsing code. My first inclination is to unlink from one set of type defs and then to relink to the other set of type defs. That would be nice and easy, but I do not see any easy way to remake a link unless I bring the VIs into my code, and then go into the front panels and delete the clusters used for inputs and outputs and re create new clusters using my typedefs. Other than this I see no other way. If there is an easier way please let me know!

    1) Close both

    2) Open yours and makes sure all VIs that use the type def are in memory.

    3) Open the type-def and doa "Save as" and save it under the name he used.

    4) Save and close all callers. Your code will now be linked to the new (his) name.

    5) Now open his type-def.

    6) Open your code at it re-link to his version.

    7) Save and clsoe all of your stuff now pointing at his.

    8) Do a Source distribution and clean-up behind yourself.

    That all ther is to it.

    Ben

  16. I second Ben's post - I've used the ethernet-serial and ethernet-GPIB modules from NI before and they're great - easy to use and rock solid.

    Another example of where NI stuff shined.

    Customer blew out a port on a unit and when installing a spare, I needed to get the new unit to support the same port as the old. A ten minute phone call to support told me I could find "NIPortConfig.exe" in "...NI-Serial\" and I was done. I would be suprised if I could get someone knowlegeable on the phone from another supplier in ten minutes.

    Ben

  17. Cross post at NI - http://forums.ni.com...11462&jump=true

    I'm looking for recommendations for Ethernet to serial adapters (also known as device servers) which have 2 or 4 RS-232 ports. We don't need super performance or anything like that, just something that will work decently and not break down. If you have worked with a product you liked (or disliked) that's what I want to hear.

    The only one with this number of ports we used was from Advantech and our impression wasn't good. I've used ones from Tibbo as well and I have nothing but good words about those (in case you ever need such a device), but unfortunately, the relevant models only have one serial port.

    I have used the NI versions in the past and they just worked.

    I have alos had customers looka the price say "I'll get my own." and latter say "Yes I should have purchased the NI version." after finding out the driver would not release the device once used (i.e to switch from hyperterminal to LV they had to reboot).

    So the question becomes "How much do you charge an hour for the headache." In my case if the third party widget cost me an extra two hours or so, the NI version is cheaper.

    Ben

  18. Hi,

    I am trying to resize a picture control on a front panel, but "bounds" property is read-only parameter, even with VI scripting enabled on LabVIEW 2009.

    My motivation is to cover a certain control by a picture control or anything I can create animation dynamically. Picture control is the one I can think of, however, any alternative works to me. Has anyone tried things like this?

    Regards,

    Toru

    Draw area size?

    Ben

    • Like 1
  19. I have some processes where I need to time an external device and issue a timeout if that device fails to respond in a certain amount of time. These timeouts can be in seconds or minutes or even longer in some rare cases.

    I have accomplished this in the past by getting a time stamp outside the loop that monitors the external device and then in each iteration of the loop I get another time stamp, subtract the original time stamp and then take action on the result if it exceeds the limit.

    I have used the time stamp instead of the tick counter because I am concerned that the tick counter can roll over and cause a problem with my elapsed time calculation.

    The problem is, once in a while, the clock on my machine is 'adjusted' by the network time service to bring it back in line. If this happens while the loop is running, the time stamp calculation will be thrown off and my code will think the external device has not responded in the allotted time when in reality it still has more time left to finish. When this happens, I issue a timeout condition that is not real.

    So, anyone have a suggestion for how to solve this or at least make it more reliable? Our IT guys are not willing to disable the NTP service on my machine to prevent these adjustments so I need to find another way.

    -John

    If the following correct attribute it ti Rolf because I think it was him that posted to Info-LabVIEW the following. If its wrong blame me.

    THe tick count is a U32 so as long as you keep it as U32 the math will still work out, even durring the roll-over.

    Ben

  20. I don't know what happened but I cannot find anything anymore.

    Even a simple search on 'ton' (which should trigger approximatly 1000 posts), or 'git', 'rss' return anything.

    EDIT: it seems the minimum search length is 4, could that be fixed

    Ton

    If you serach on the terms "LAVA Search trick" on the dark-side you will find a thread where Michael shared the following;

    "You can do a focused Google search by adding site:lavag.org after your search terms."

    This works very well for me.

    Ben

×
×
  • Create New...

Important Information

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