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. OK, so Ben's current title line is "1 NI Knight = 1/10 LAVA Knight".

    Let's do the math:

    1 NI Knight = 10,000 posts

    1 NI Knight = 1/10 LAVA Knight

    1/10 LAVA Knight = 10,000 posts

    1 LAVA Knight = 100,000 posts

    That would be a tall order considering that the entire site currently has ~67K posts. Good luck with that, Ben. wink.gif

    Thank you Thank you Thank you!

    beer_mug.gif

    Yes my math was a little off with that title. S0 I switched over to something that is more consistant with my attempts to unifying our two forums. thumbup1.gif

    Re: 100K post...

    I still have another 1K to go to join you in that rare class of people that have posted more than 2K on both forums. Give me another year or so to work on that one. yes.gif

    Ben

  2. Can you change the format of your data? Strings aren't that efficient, and CAN packets are fixed-size. You could convert to a cluster of numeric values, where the first element is the ID. Then, one route would be to use that ID as an index into an array, where each element of the array contains a cluster that contains an array of all data found for that ID. Ideally you would pre-allocate each array, since one reason your example is slow is the use of build array in your loop.

    What output do you actually need? Instead of moving your CAN data around, you could build arrays of indices into the original data, one per ID. This would give you a quick way to retrieve all the data for one ID without making a large number of copies. I've attached a quickly-written sample that demonstrates this, then uses the generated array of indices to extract the data into separate arrays for each node.

    Oops, forgot the attachment - and the "Use Full Editor" button doesn't seem to be working, so I couldn't attach it to the previous post.

    The indexed sort is superior thumbup1.gif to my simplistic method described previously. If you do your own try what ned posted.

    Ben

  3. So is there a way to just set the value into a code variable that is not something on the UI so it purely exists in the execution threads? I looked at Local Variables but they seem to be UI-objects as well. Or is a wire in effect the variable on the block diagram?

    The Clean-up-selection is useful for some areas, but there are some tweaks I then want to make. Once I have a section 'clean' is there any way to lock it? I see I can mark structures to "Exclude from diagram clean-up" but these are not structures, just sets of icons performing one function.

    Also, is there any way to change the color/look of a structure? I see that if you wire an error to a case structure you get red/green borders - it would be useful to do this sort of color-coding on other structures where I have error cases based on bools or variable values. It would also help distinguish the structure lines where I have cases within sequences within loops within sequences within cases.

    "I think she's got it!" (Proffesor Higgen, My Fair Lady)

    IN LV all variables live in wires (or shift registers).

    I believe you can select code to exclude from the clean-up.

    You can use the paint brush tool to color your code.

    Ben

  4. I am having difficulty figuring out how to sort an array according to one of the columns, I'm sure there's a really easy way to do it but I can't think of a nice solution that doesn't use loads of memory!

    I have a large array that contains data from a CAN bus. Each line has the message identifier and 8 bytes of data. All I want to do is to split the array up so I end up with separate arrays each with all of the data for one individual message identifier.

    I have attached a quick VI that demonstrates the principle. This VI works fine and does what I am intending, but the actual files of CAN data are thousands of lines long and could contain upto around 30 different identifiers depending on how many nodes are active on the bus and what messages are present. That would mean that I would need to pass 30 arrays back around every iteration of my loop, some of which may contain thousands of lines of data depending on how active the ID is. It ends up being quite slow, I assume because I am sending so much data round and round my loop on each iteration.

    I would prefer to just terminate all of the possible array lines at auto-indexed tunnels at the edge of my loop so that I'm not passing that data back and forth. I can't work out how to make it operate like this though as I still need some output to send to every tunnel on each iteration, not just the tunnel of the identifier that the current line being examined refers to. I could output some kind of constant to all the other tunnels but then I have to go back through and remove all of the unwanted constants from each array afterwards.

    I'm sure there must be a better way to do this, could anyone suggest anything?

    Thanks

    I believe OpneG has a ready made solution but if you want to "roll-your-own" you can take advatage of the order of a cluster to accomplish this task.

    Create an array of clusters with each cluster representing one line. Set the cluster order such that the primary serach field is first then secondary seach field.

    Pass that througha "sort 1-d array" , unpack the cluster, done.

    Ben

  5. But even if there's only one property node, every time the value out of it branches, isn't there a possibility (probability?) that a data copy is being made anyway, depending on how the value is being used?

    Either way, AQ's last point about readability is an important one. With code this bad, a good intermediary step can be to put the property nodes right by where they are used so that you can get a better sense of program flow. Then, once you have it all cleaned up, take a step back and see if you can consolidate all those property nodes in a logical way. It is stylistically "better", and a good habit to get in to, since it's an absolute necessity if writing code where a particular value might be changed in between property node reads by some other part of the code.

    In all cases except those that screamed "bug" LV will schedule all reads on that wire to happen prior to any operation that changes the data. Of course if the wire branches too two functions that mod the data, then we have the classic "Data copy on wire branch" situation.

    The UI switch technicality is of particular concern if GUI update performance is an issue.

    Another thought...

    If those property reads are just looking at stuff the code already could have known (property set by code in the first place) then looking to the control for that info is a problem in itself.

    Ben

  6. Double-clicking on a wire will select the whole segment. Tripple-clicking will select all of the wire.

    Tim

    I asked that same question when I took LV basics I and the answer I got was "tripple-click". Outside of LV the "triple-click" is not used often in user interfaces so it is not something someone would just guess.

    Ben

  7. What kind of person brags about how convenient they are when other people have bad weather? blink.gif

    Actually, I much prefer the hot weather to the cold. And I live in what is (at least officially) one of the hottest places on Earth - Check out #3 (you may note the ~-200m elevation. This means that in the cold nights of winter it can get close to -10C/15F).

    And I am the exact opposite (formative years were spent living in Duluth Minnasota). I generally reply to the

    "Well is it cold enough for you?" with the reply,

    "Its OK and I prefer this to the summer. In the winter you just put on another layer of clothes. In the summer the are days when you can't take enough off."

    Ben

  8. OK, here's a recap of some of the things I experienced this past week:

    1. I saw people swimming in an outdoor pool (around 8 AM).
    2. I saw people sunbathing.
    3. I had lunch outside.
    4. I had lunch in a hotel restaurant atop a mountain overlooking the ocean with the sun shining.
    5. I drove about four minutes from where I live and saw the snow on the mountains about 60 miles away.
    6. I walked around in sandals and a short-sleeved shirt.

    P.S. Regarding "Snowmaggedon" - I drove by the actual Armaggedon1 a few times this week and there was no snow in sight2 .

    1. For those who don't know this, Armaggedon comes from "Har Meggido", which means "Mount Meggido" in Hebrew, and it's about 35 minutes from where I live3.
    2. Not that there would be. The "mountain" is only a few hundred meters in height.
    3. The site is actually by a pretty major crossroads, hence its importance throughout history. There are always people hitchhiking there and I always thought the name "Hitchhiking at Armaggedon" would be a great name for a prog-rock album4.
    4. Don't you just love nested comments5?
    5. Help! How do I stop6?
    6. Aaaaaaaah!

    Thank Yair!

    I had failed to notice my house has stopped smelling like Kerosene. How did you know? shifty.gif

    Ben

  9. Abraham was commanded by God to offer his son up as a sacrifice in the land of Moriah.

    Near the Abraham thumb is a synagogue and a mosque.

    Why they do not take out Abraham body maybe is intact because he saw God and be checked with C14. IF HIS BODY IS NOT INTACT HE DID NOT SEE GOD.

    For example Bernadette saw Virgin Mary and her body is intact:

    http://en.wikipedia....dette_Soubirous

    Just my 2 cents...

    Faith.

    Faith is belief in the unseen or unproven. Knowledge on the other hand comes from proof or eveidence.

    I don't know how well the following analogy will go in places were dogs are bad but here goes anyway.

    lets say i wanted a pet and I had to choose between a real dog with real short-comings and building a robot dog. The robot dog would alwys do the right thing because I programmed to do the right thing. Now in the case of the real dog, its actions are not neccesarily programmed (trained). A When it meets me at the door excited to see me, it means a lot more than if the robot did it.

    So now cast yourself for the moment as God and ask yourself if you would prefer to watch eternity play out with robots that always did waht was expeted and real creatures that had the oppertunity to choose to do good of their own accord.

    The story of Abraham and his willingness to sacrafice his ONLY son (in an age when a son represented social security) was a story of faith.

    To use the remains of a person of faith to PROVE defats the end goal of faith.

    Ben

    • Like 1
  10. I know Cincinnati wasn't hit quite as hard as the east coast, but Round III is here and hitting hard. I even heard reports of yet another big snow possible this weekend.

    I remember seeing radar of the storm system organizing over your place and quoting South Park "It's coming right at us!". Your loss was your gain.

    Ben

  11. We are still having fun after the "Madness".

    I thought the adventure was over when my son finally got power back at his place after 7 days. WE still have streets blocked off due to power lines. Yestrday afternoon the roof colapsed on the rink where the local HS hockey team practices. it was an old structure (dating back to the era when iceskating was a cool date) that used laminated wood arches to hold up the roof. Five minutes earlier and there would have been teams on the ice. Unless insurance covers the collpase, I fear that is the last of the Rostraver Ice Center.

    Ben

  12. yes the values has to get generated as specified.give me solution.......

    You can give yourself the solution after a little hard work.

    Sit down and start filling those arrays by hand. As yo do so, start watching for patterns that you follow as you go. WHt you will find is there is a finite set of rules you have to follow to fill the array. After doing it manually a couple of times, right down a set of rules that describe how you decided to put what value where. The rules and procedure you come up with will then drive the nature of your code. Your rules and proceedures should answer question like...

    Where do I start?

    When do I continue working in a row or collumn?

    What does the maiximum and minimum indexes have to do with when I switch from rows to collumns?

    Once you have it written down such that you can pass the procedure off to a gifted asssistant, then start teh translation in code.

    For the most part we will not do your home-work for you, but we are willing to help those who want to learn.

    Ben

  13. Dearest Friends,

    Recventley, Bad times have upon me. Tje work I was doing, Has come to an End. I Am Without WORK.

    BUT, still, I should HONE my skills??? FOr this Reason, I wish to Purchase LaVIEW for my house. So I can WOrk in “Threelance”.

    HOWever, I am Not a Rich, Man. Can You Reeecomend How to Get LabeVIEW FOR FREE? (OR Cheap)?

    Many Smiles and Warm Greetings,

    Sajib Nowdhury

    Hi Sajib,

    If you are still istening, I'll offer some advice.

    1) Stop working so hard to change fonts fonts in your posts. THe mixed fonts will shutdown most readers before they get to your question. Most people who will answer your questions on these forums are voluteers so don't make them work harder to help you.

    2) LabVIEW has an evaluation period durring which you can use it for free. It is only after that time that you have to pay.

    3) Post your question in both English and your native tongue. There are LabVIEW programmers all over the world and chances are someone would understand your Q.

    4) Don't give up and run away. LabVIEW like many other langauges require you stick with it otherwise you are wasting your time.

    like I said, I am just trying to help,

    Ben

  14. So I'm not going to tell you guys how I had lunch outside today and how I saw people sunbathing and swimming in an outdoor pool, OK?

    Exactly! I always said you were a fast learner.

    oops.gif

    Hold it! Are you just twying to make twouble?

    Ben

  15. Woohoo! We finally got some snow!!!

    64491515.jpg?AWSAccessKeyId=0ZRYP5X5F6FSMBCCSE82&Expires=1265821819&Signature=rLZInbAT11y03Ei%2BYRdE%2Bv4dYxg%3D

    If I ever find myself drowning with you Chris on the boat holding the life-preserver, I will have to rember not to yell "Does anyone have a Life-preserver?" but rather "Please throw that life-preserver!" yes.gif

    I live up on a hill who's access round was originally layed out by the mules owned by the miners. The road is now one lane, that is effectively now "One way". The closest cleared place to park my car is now about a mile away if that situation does not change before I get home today. my wife and I both love the beauty of the snow but ones attitude is subject to change when not watching from home.

    Ben

  16. The only silver lining in all of this is that my power has stayed on [knock on wood]. I have a gas fireplace that can put out some heat, but no where near enough to cope with the low temps we've been having. Honestly, if it wasn't for the fear of power loss, by this point I'd just throw my hands up and say, "Bring it on! What's another 20 inches?!" Oh and then there's the fear of my roof caving in...

    "its here!" and its the heavy wet stuff. yes.gif

    Ben

×
×
  • Create New...

Important Information

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