Jump to content

ShaunR

Members
  • Posts

    4,856
  • Joined

  • Days Won

    293

Posts posted by ShaunR

  1. Looking to control mass flow from feedback via coriolis meter. Proportional and Integral by themselves would do (no Differential). Looking to build it without the PIDs found only in Real-Time module. Found an ancient example in NI called Simple PID. Here it is...

    The ancient example in LV 5.

    But it is so very ancient that LV 2010 refuses to load it. I presume that's what I might have needed. Where can I find something like that, only newer?

    Simple PID controller just set the derivative to 0.

  2. Doesn't anyone know a solution to my problem? Or will this better get answered in some other forum like "application Design & Architecture" which has more visits?

    Br, Miha

    OK. I'll get serious (just for a moment biggrin.gif). It depends on what you are trying to do.

    As far as I'm aware (under windows at least) there is no native labview way to "hook" a TCPIP connection. In fact, without a kernel level driver not many other apps can either (they use WinPCap). I know RolfK did a load with TCPIP which got into the nuts and bolts of TCPIP and UDP (they're on LAVA somewhere). But I only looked at them briefly - maybe something in there for you.

    If you just want to detect if something is active, you can ,however, just open the port. If it fails; "something" has it. Quick and dirty if that's all you need to know.

    The other way is as a proxy handler. Where, each end-point connects to ports in your software so you become the "man-in-the-middle". you can then pretty much do what you like with the streams form that point but you stipulate "without reading" so I guess that's out.

    Labview tries to alleviate the programmer from really low level stuff, so it's not surprising there is nothing "off-the-shelf". You are probably better off using wire-shark, logging to a file, then reading it in LV (I don't know if Wire-shark has an API or not).

  3. For me; 8.x was the worst (pick any version). I almost cried with joy when 2009 came out. biggrin.gif I've skipped 2010 altogether - far to slow loading dynamic VIs (which many of my designs use) and no real new features or improvements that I either want or use (maybe the cluster hiding, but that's about it). It''s only used for playing and downloading stuff from LAVA - nothing serious. If 2011 is a bug-fixed version of 2010, then unless it fixes the bugs relevant to me, then that probably will get skipped as well.

    I'm pleased that NI now have yearly releases with defined periodic bug fixes, because now I know not to even think about upgrading until SP1 is released laugh.gif

    Oh. And don't get me started on beta testing biggrin.gif

  4. And Shaun why are you activating modules manually? Does the activation wizard not work for you in Windows 7?

    Activation wizard works fine. Development machines don't have internet access, nor do they need it.thumbup1.gif We have separate (IT owned) machines for office work like internet browsing wink.gif

  5. You do realise that, in it's current format, this can never be certified ph34r.gif

    Incomplete or secure code will not be accepted: including code with locked diagrams, missing diagrams or password protection.

    I would suggest at least putting a warning in the description that the package does not contain any accessible source code as this is unusual for LAVA.

  6. I had been thinking this way for over 12 years ... since V5.. It has only been in the last 6 months or so LV has really rattled my perception of the universe. 2009 and 2010 have been the occasional poke-in-the-eye after another of quirks and workarounds and glitches and potential show-stopping nightmares. I've spent more time on the phone with NI tech support in the last 2 months than I have in the previous 12 years combined.

    Those were the days rolleyes.gif. When men were men, and sheep were worried. (and the known issues would fit on a cigarette packet beer_mug.gif) < wispy reminiscing emoticon>

  7. My libraries have something similar for trimming, but use the lexical class as an input.

    post-949-0-04034000-1296658805_thumb.png

    That's sweet. I like the idea of using the lexical class. How do you trim both ends? Use twice? You could use an enum to choose head/tail or both.

    The speed of my implementation derives from the fact you do both ends at the same time and you don't have to increment along the entire string. So the speed doesn't deteriorate with increasing string size (assuming the reverse string and array aren't a factor....which they don't seem to be).

    But it's a bit moot since we both have difficulty testing our implementations without resorting to ridiculous string sizes and/or improbable numbers of iterations. biggrin.gif But I love these sorts of little nuggets of re-inventing the wheel - only a little rounder and a little more grease.beer_mug.gif

  8. I am still working on this one Shaun. I am using XP. Address bar shows C:\Documents and Settings\C.Richter\My Pictures before I right click on it. When I right click the address bar, I do not see an option to " edit address" but I only see 'Cut, Copy,Paste, Delete, Show unicode control, Insert unicode control. I guess I am one step closer, as I tried using "C:\Documents and Settings\C.Richter\My Pictures\MARS1 and this time got Error 7.

    MARS1.jpg?

    You can right click and use "Copy" then click inside the path constant and press "CTRL V". It will paste the path into the constant.

  9. [Queue ShaunR]

    Thanks Priscilla biggrin.gif

    I'm a LabVIEW beginner and would like to know what you think about using LabVIEW to make real-time and parallel updates to a SQL Server database. I presently use a serial overnight process to update my SQL Server backend database using stored procedures, MS Access, and VBA. There are a few hundred steps and currently the only way to update the database is to run the update process sequentially from beginning to end for the entire database. Since this takes about 8 hours a day, I can only run it once a day. My initial impression is that LabVIEW might be a nice way to represent the dependencies in the data, but the number of processes might be overwhelming to look at graphically in LabVIEW. Thank you.

    I'm not really sure what you have in mind here. Maybe your current VBA application is sequential because the operations are indeed sequential (no point re-indexing a table before you delete a load of rows for example).

    I think generally speaking though, that any move away from VBA (and definitely away from Access wink.gif ) will have performance benefits with the caveat that there are not many interfaces to Access that would be more efficient than the interface between VBA and the DB (I assume your using VBA within Access). With databases, just running more threads of the same process doesn't equal better performance (a thread will stall if a table is locked by another thread), but moving away would enable you to optimise your queries and give you greater control over those functions that can be executed simultaneously.

    Perhaps a better short-term route might be to look at Visual Basic since you will be able to more easily port existing code (CopyPasta with Hacksauce) whilst being able to assess what functions can be realised asynchronously. In addition, you will be running compiled code rather than interpreted (I think VBA is interpreted at least) and you will be able to see more easily how and where the software is idling; waiting for the database to complete.

    Many people just go for a text file with the SQL and squirt the SQL direct using PassThrough to bypass JET. The VBA becomes little more than a file reading function with a for loop and to change the queries you don't have to write any VBA. I have heard of significant performance improvements just by doing that alone. Indeed, you could very easily write something similar in LV (very quickly) and see if you can achieve better performance by doing a side-by-side comparison with a section of the existing VBA code. After all. You don't want to commit to a technology change only to find 2 months later after re-implementing that it's just as bad wink.gif

    • Like 1
  10. Then how can i make the byte interface to the coming data. i want to get the data from USB which transfers some 8 bytes of data..

    The internal representation of a char (1 character of a string) is a byte. If you write the character "A" it s a byte of value 101 (decimal) or 41 (hex). So when you write A to the port you are in fact writing a byte of value $41.

    A string is an array of characters and therefore an array of bytes. So writing "ABC" you are actually write an array of bytes $41,$42,$43. You can easily convert to and from the representations by using using the "String To Byte Array" and "Byte Array To String" primitives in the string/array/path palette (under the strings palette). But you can only ever write read and write strings using the VISA functions;.

    Now.

    When you read (or write) "bytes" that are in the printable character range everything is fine. You will be able to type in values to string controls when writing and when you read it back you will see characters if you usea string indicator

    However.

    What if you want to write a hex byte of value 0?.

    Labview has a very easy way of doing this. If you right click on a string control (or indicator) you will see a menu option for "\" Codes Display and "Hex display. Setting the control/indicator to these will display the "string" in either the escaped format (e.g \00 \00) or in hex byte format (e.g 00 00). so unless you are going to do some function on the values of the bytes (like a CRC) then there is no need to convert and has the added bonus that you can use the string splitting functions to break up the data..

  11. I am seeking to open a jpeg file into labview 7.0. If I do not wire a file path, a dialog box appears for me to specify a file to read from. This works just as the user manual says it should. However if I wire my path to the VI

    Desktop/My Documents/My Pictures/Mars1 ,this message pops up; "error 1 occurred at File/Directory Info in Check Path.vi>Read JPEG File.vi>Open a jpeg file.vi" I do have a picture of mars stored at Desktop/My Documents/My Pictures. Open a jpeg file.vi Please show me where I went wrong.

    " Desktop/My Documents/My Pictures" isn't a real path. It's similar to a short-cut to a folder that changes with each user.

    To find what the real path is you can open "My Pictures" in explorer and right click on the address bar. Then choose. "Edit address". The address bar will then show you the absolute path which will be something like C:\Documents and Settings\user name\My Pictures (XP) or C:\users\user name\My Pictures (Win7/Vista).

    • Like 1
  12. I'd like to add a bit more to this so I don't sound harsh. I like the idea of overhauling the probes and the icon editor. It's a step in the right direction. They just both need improvements to make them really useful for me and not get in the way of my workflow. They're not there yet.

    Nope. I think you were right the first time.biggrin.gif I no longer use the probe window preferring to slap indicators all over the place nono.gif

  13. Well. you are jumping 2 rather large technology areas.. It took me a week to figure out how to find the control panel and to turn off the User Access Control in windows 7 biggrin.gif I've also always moaned about LV activation since I have to apply activation (for the 24 modules) manually. I'm sure once you are familiar with win7 you'll try again yes.gif

  14. Hi friends ,

    I have a simple while loop with a 'Wait' function ( 20sec) placed in it. How do I read the elapsed time say every sec ? rolleyes.gif My indicators get updated only after the delay- no matter what timer function I use. frusty.gif

    Is there another way to implement this? Delay with elapsed time feature. Because I want to know how much I have to wait .wacko.gif

    Sharon

    Something like this.

  15. I'd put that percentage even heavier on the UI side. I honestly can't quantify the effort I put into writing obscure hierarchies of VIs to deal with the oddities features of the LabVIEW controls in an effort to make the UI behave at least somewhat consistent with anything else the user interacts with elsewhere. For anything other than the basic scalar controls, I find it takes all of a few seconds for a user to realize they're not dealing with a "normal" control. Don't get me going on trees or multi-column list boxes...

    I develop 100% Windows platform locked applications, and I swear, next time my UI is going to be 100% .NET or WPF based controls, except for the graph objects. The graphs I think are the strongest UI components NI has, and even they are showing their age.

    I'm 100% with you here...ESPECIALLY the tree view....frusty.gif. - and my UI are "simple" (or they would/should be...lol). I went through a stage of writing front ends in another language and have only the backend IO and stuff in LV. I didn't find many downsides to this apart from my abhorrence to mixing languages. In fact I might play with it again but using TCPIP as the glue rather than DLL calls. Oooh. Epiphany blink.gif This would mean the UI doesn't even have to be on the same machine biggrin.gif

  16. I bet a large portion of auto-tool haters just have not spent enough time with it. It actually pains me now to watch old-timers (its always peeps with 10+ years experience with LV) using the tab like crazy, and still being way slower than me. Also, as a lefty, tab was never a good option as I would have to take my left hand off the mouse. At the moment my right hand rests on the arrow keys to do very quick node adjustment or ctrl-double click etc.

    Only code monkeys need speed....for all the changes I want them to do biggrin.gif

    About the icon editor, I agree some of the behaviour is a bit unexpected (took me a long time to figure out you cant use the text inputs for the banner text), but it allows me to edit icons so much quicker. If I have an API type icon with standard glyph it takes about 10 seconds to edit the text if I clone the VI for a different API command. With the old editor you would have to paint over the old text, manually position the new text etc etc.

    I too like the new editors purely because you can import icons. It used to take me ages to try and make a new icon pixel-by-pixel...now I just import an image and (sometimes) make a box round it ...much quicker.

    For me the one of the worst "feature" is bloat. The context menu for some operations is nearly as high as my laptop screen! I would really like a low-cal version of LabVIEW, and one that does not install dozens of NI services which I do not use very regularly.

    Amen!

    Data-finder? What's that? Never used it. and If I ever decide to find out what it does I probably never will. NI device Monitor? I don't have any USB devices. NI PXI manager? Don't have a PXI rack., NI Motion Device Manager, NI WebServices.... et al.

    Otherwise it has to be the limited front panel control customisability. Its a pain to do any serious non-standard UI work... The whole UI feels stuck in the mid 90s. System style controls do go a very long way to fixing this problem, but they lead to quite boring UIs.

    This is one of my pet peeves too. Along with the amount of coding that must be done just to make a UI work. Most projects I find nowadays are about 60% UI code and 40% real-stuff. The UI hasn't really changed much since the MAC original (in look and feel). No matter what you do. It always "looks" like LabVIEW. I think we would see many "new" looks if NI gave us access to the controls canvas and "onPaint" event..

  17. I've seen this somewhere a few years back but haven't been able to figure it out recently. I want to change my default free labels to have a light yellow background and a black border. I like that style for comments a lot. I thought this could be done via the LabVIEW options, but It's obviously not there. Then I remember someone created a palette item which you could drop on the diagram to do this. Any ideas?

    This would be a great feature to have built into LabVIEW. But actually a better code commenting tool is sorely needed anyway.

    My version is set as you describe (yellow with a grey border for BD labels, LV 2009 and 10). My problem is that I can't remember how I did it an cannot change it back blink.gif. But it is possible :)

    I'll have a play and see if I stumble across it again :P

×
×
  • Create New...

Important Information

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