Leaderboard
Popular Content
Showing content with the highest reputation on 12/22/2009 in all areas
-
In LV 2009, this is how I would recommend that the Singleton pattern be implemented: AQSingleton.zip No wrapping library. No replication of VIs caused by having public wrappers and private implementations. No excessive copy overhead. And, yes, thread safety for parallel public calls. This demo class implements three public functions: Set Path, Append Path (which does a read-modify-write) and Get Path. Note that there is one minor issue with this implementation *if* (and only if) you have multiple top-level VIs all using the same central storage and the one that accesses the global first quits before the others are ready. The workaround solutions for that are ... problematic. It is in the set of "holes in the LV language" that we've been slowly patching o'er these many years.2 points
-
First, Norm, thanks for the kudos. This was born of a desire to have a pure G app interface/control scheme similar to ActiveX, hence the name. And no, I didn't name it, but it managed to stick. I'm not going to add anything to his post. He explains it pretty well. If you decide you want to look at this technique further and need some more guidance, I'm sure one of us will help you out. Second, while VI server can be a bit tricky, the discussion is making it over complicated. Here is what you need in your EXE's ini to make it work: [your ini] Yes, that's right. Nothing. Of course that's an oversimplification, because then you have to manage the VI server settings within your application yourself (setting it enabled, setting port, setting machine access, setting VI access, etc.). The defaults will be port=3363, server=off, machine access=localhost, VI access=*. If you are at all concerned about security, that may be your best bet. If not, the following settings may be a little more reasonable: [your ini] server.tcp.port=xxxx server.tcp.enabled=true That will set your port and enable VI server. Machine access will default to localhost and VI access will default to * (all VI's accesssible) If you want to set only specific VI's as accesible than add the line: server.vi.access="{your VI names/patterns}" To change machine access settings, add a line like this: server.tcp.acl="290000000A000000010000001D00000003000000010000002A10000000030000000000010000000000" -> This is the value to give all machines access. You can set all this in your project properties and it will be part of your ini when you build. If you go with the small exe, then the technique Norm describes will work great for you. No need to periodically monitor a file. Just send a message directly to the app. Or simply just run a VI remotely to load/launch your main VI. Also, it is possible to load/run your main VI directly into your small app (from say an llb build) to do the work if you didn't want to launch a separate exe. Lots of options... - Scott2 points
-
Great reply, Dak. Well thought-out, articulate, detailed, and respectful; just the kind of debate that I value on LAVA. Nonetheless, I still think we need to wean ourselves off of the oil tittie and move on to something more sustainable. Just my $0.02 worth. Woo hoo! I just hit my 100th post! At this rate, it'll only take me about 120 years to catch up to crelf1 point
-
Uhh... well the thread was started specifically to address climate change data, so it is relevant to this thread. Regarding the other issue you raised, I happen to agree with you in principle. I'd like to see more alternative energy solutions. At the same time we have to remember there's no free lunch. Alternative energy advocates usually present these ideas as ideal solutions that lead to energy nirvana. I never see any discussion of potentially negative side effects. Remember catalytic converters? They were supposed to solve our smog problem by changing toxic chemicals into "harmless" water and carbon dioxide. Oops... it turns out CO2 is destroying the planet. Nobody saw that one coming... Every solution is going to have some sort of side effect. Biofuel crops displace food crops and drive up food prices. Opening new farms specifcally for biofuel crops puts more stress on the water supply and increases the cost and use of fertilizers and insecticides. Nuclear plants have that annoying radioactive waste to deal with. Geothermal is very localized and loses efficiency over time. Wind and solar both take energy that exists in a natural environment and convert it to electricity. On a small scale it's impact is undetectable. What happens when there are enough of them to supply the world's growing energy needs? How will all those windmill farms affect weather patterns? During the day, solar energy heats the ground like a thermal battery. Put down solar panels and those batteries no longer get charged. What impact will that have? Oil is used because it is convenient, relatively cheap, and has a high energy content. (Since 2003 only ~18% of US oil has been imported from the Persian Gulf. Link) Suppose we do develop alternative energy sources and we no longer need oil? Big oil companies get broken and the world is free? Not likely. Big oil may be done but they'll be replaced by big wind, big sun, or big nuclear. What happens to those countries that depend on oil exports? Will they sit by passively while the world slowly strangles their economic livelyhood? Will they switch over to farming and exporting opium? Will they invade neighboring countries for their resources? Do you expect them to happily return to being nomadic desert tribesmen? The promises made by renewable energy are, IMO, largely pipe dreams. Extracting useful energy from nature for our own use will always have some impact on the system as a whole. There's no such thing as a "environmentally neutral." There are some forms of sustainable energy (hydropower comes to mind) but they cannot produce infinite power. Reducing energy use is the only route to long term survival, and frankly I doubt humanity will ever willingly go down that path.1 point
-
Lets all take a timeout and take a quick quiz to see what our levels of understanding truly is on this HUGE topic that needs final conclusion : Short Quiz #1 : http://www.geocraft.com/WVFossils/GlobWarmTest/start.html Short Quiz #2 : http://icecap.us/images/uploads/Globalwarmingquiz.pdf Further reading : http://www.oism.org/pproject/ http://rankexploits.com/musings/ http://climateaudit.org/ http://icecap.us/index.php http://iceagenow.com/ http://wattsupwiththat.com/ http://www.friendsofscience.org/ Stay properly informed folks. Please. The most inconvienant truth in the USA is the Constitution. We've had one type of framework since 1776. Look at how many many other countries have had since then. Capitalism and free markets were / are part of that plan. Each country has its own free will of choosing. The real topic here is about redistribution of money and the choices people make to what type of government they have. A Conditionally-led Republic (USA) type of government as designed by the Framers is far better than anything out there (with all due respect to other LAVAer's). This is fact. Marxism, Socialism, Communism just don't work. How many potatoes could you find in a market in the USSR ? One maybe two ? Lets be conservationist but lets not impose wacky, leftist mob rule on common sense people. The tide is turning in the US against the 60's leftist nonsense. Europe needs to return to its senses too (I love your food, but wonder what happen 2-3 hundred years ago with your government paths ...). The leftist in the last 40 + years have wanted to push out God from the culture. Now they want to push out civilty, common sense, and proper debate in science - because it "feels good". When the numbers don't go their way they still can't admit their wrong. Sounds like my 17-year old slamming doors because he can't have the family car keys. He is doing better now (heading for West Point). So, during the timeframe of Moore's Law where computers where doubling in speed every x years, common sense, reason and rational thinking has lessening at the same or greater rate. That is why we are having this debate. The warmest year in the past 100 years was and still is 1934. Ouch, facts do hurt ! Can we erase that ? No. Sorry. Maybe in 1934 they ate too much meat that year, or maybe they were exhaling too much. Hmmm. Sounds like a One Flew Over's convention discussion. In the end, humans want one thing the most and that is Freedom. That would be Liberty over Tyranny. Freedom from voodoo science trying to CONTROL our lives. Now lets return to a higher level of reason and rational thinking ... even while we are coding in LabVIEW. Oh, BTW, I am using NI 8353 (Quad-Core), PXI express (two 6535's), LabVIEW 2009, & Real-Time fo the first time. What fun ! Merry Christmas to All ! -Karl1 point
-
You would, because they're not related. I put type cast in bold in my original post to indicate that you should use the type cast primitive, which doesn't do the type checking (similar to the flatten-unflatten trick Felix used), but just reinterpets the data on the wire. As I also said, it was a long shot which didn't pay off.1 point
-
Ice core data, cyclical temperature changes, who said what and when, graphs, politics... none of this is really relevant. To me, the central issue that needs to be addressed is from where we get our energy. Right now, the bulk of the world's petroleum reserves -- the energy source we find easiest to obtain and use -- are under countries with unstable political regimes and (to Westerners) undesirable cultures. The US is fighting two wars because we have to keep ourselves involved in the politics of the Middle East. Plentiful non-petrochemical energy would mean that these countries would become irrelevant. What truly irks me about our country's energy strategy (or lack thereof) is the complete absence of political will and forward thinking. We've spent close to a trillion dollars over the last eight years in Iraq and Afghanistan; imagine how many solar panels, wind farms, nuclear reactors, or whatever other kinds of non-petrochemical energy sources could have been brought online with that kind of money. We've been collectively dicking around with fusion research for the last four decades, and the latest projections that I've seen still put practical fusion power out another 20 years. We're spending only about $200 million per year (that's 0.25% of what we spend in Iraq) on what should be a Manhattan Project-style national priority. This is the real issue. Without stable, abundant, and inexpensive energy, our entire economy stumbles and falters. We have become the pawns of political regimes whose power and influence otherwise would be those of nomadic desert tribesman.1 point
-
I did, and that's why I asked the question. Unfortunately, you don't seem to want to answer it here. You started the topic, granted, question remains: what is your problem? See below before you hit reply. Does asking questions make things political? If it is Science that concerns you, how about the organic transistor of Schon from Bell Labs; or the South Korean cloning thing: did that excite you that much? Sidenote: how exactly does science go beyond politics? Who's funding science? May not like it, but it's the way it is. OK, bite to this then. I hypothesize that, based on you "0bama and the watermelons" statement, this issue is in fact political for you. This is not an issue because you have every right to feel that way. For discussion sake, though, of this is the case, please stop playing the science card. If not, please stop posting politically motivated links and statements. 40k years back without an uncertainty estimate? Sure, graphs are easy to understand, remember the hockey stick? Maybe laughable is not the right word. How about unscientific. Just like all the other data that was presented as conclusive. Why do you feel your arguments are better? The issue is complicated, the data often ambiguous. There is a world wide community of climate/environmental scientists working on this. Why do you distrust all of these people? is that another seniority issue?1 point
-
If the remote device is sending you a value that is the number of seconds since 1/1/1970 00:00:00, then create a timestamp constant on the block diagram, and set the value to 1/1/1970 00:00:00. Use the add primitive to combine the epoch with the DLL seconds. LabVIEW tip: easy relative timestamp calculations1 point
-
Got some time, so here the results. New VI object: style = string Control 1; vi obj class = String Constant (Decoration.Text does not work). To type cast the object, instead of to more specific class, I use Flatten To/Unflatten From String (works without errors). Now I have the reference as String Control. If I try to set the Key Focus I get Error 1058 'Specified property not found'. Felix1 point
-
FWIW, I utilize the technique of running a VI that exists within an lv_EXE's memory space in many applications. SMenjoulet was actually one of the first people that I had seen do this elegantly. His creation was LabVIEWx or LVx. The basic idea is that within the executable, you have 1 subVI that, at the beginning of the exe's execution, spits out an event reference and stores it internally within a shift register. <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/c77073a3-5a2a-48d8-bc0f-47f75f104659/2009-12-21_1231.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/c77073a3-5a2a-48d8-bc0f-47f75f104659/2009-12-21_1231.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/c77073a3-5a2a-48d8-bc0f-47f75f104659/2009-12-21_1231.png" width="536" height="356" border="0" /></a> Register the EXE for that event <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/79ce3e24-5d72-400a-91fa-bc69abd9aa44/2009-12-21_1231.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/79ce3e24-5d72-400a-91fa-bc69abd9aa44/2009-12-21_1231.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/79ce3e24-5d72-400a-91fa-bc69abd9aa44/2009-12-21_1231.png" width="338" height="289" border="0" /></a> REMOTELY (from another VI or lv_EXE) Open a reference to aforementioned EXE through VI server and call that aforementioned subVI via 'CallByRefNode' and pass in the command. <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/af6aaa05-302d-41cd-a94a-952c8ae82f0b/2009-12-21_1246.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/af6aaa05-302d-41cd-a94a-952c8ae82f0b/2009-12-21_1246.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/af6aaa05-302d-41cd-a94a-952c8ae82f0b/2009-12-21_1246.png" width="1024" height="598" border="0" /></a> And at the end of the day, when you run the Remote Export, you will have fired the event within the LV_EXE along with the data you passed to it. Is this close to what you were looking for? Also if you're using LV 8.2, there is an issue with an ini key "TCP.ACL = ...." that will need to be copied from the LV ini into your EXE's ini. This may resolve your error 71 point