Jump to content

Graeme

Members
  • Posts

    59
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Graeme

  1. Anders, I'm don't understand what you mean by cluster together. However, I can tell you this. A single system each has one filter in it and in theory all filters should be identical. There will obviously be variations due to component tolerances. The hope is that variations between filters built with components form exactly the same batches will be small, and even form different batches should not be that great. The result is (hopefully) that once the voltages for one filter are found these can be used as a sound starting position for tuning all the others. Graeme.
  2. asbo, I can talk to the board's contoller via USB serial and send it commands to set set and apply the tuning voltages via DACs. So, as you say, this is easily implementable via VISA. You may not have come across the parameters (s-parameters) that I'm measuring if you've not delved into the world of RF and microwave. I'm measuring them using an Agilinet E5071B network analyzer. It's the tuning algorithim that is the issue. ShaunR, You've hit the nail on the head. It is one of those "twiddle these until you get that" problems, only 800 times over! I'll check out the Taguchi Analysis. Sounds like it may hold some promise. Thanks. Anders, Good question. Personally I don't have a model for the filter but the designer must have. I'll speak to him and see what he comes up with. The 11 outputs are only affected by the 4 input variables. The problem is that a change in one input variable could potentially affect all 11 outputs, although in practice it is likely that three or four of the outputs will be affected to a greater extent and the remainder to a much lesser extent. drjdpowell, I see where you're coming from, and I do have a filter to play with, but for the reason given in my last sentence above I doubt it would be a simple algorithm, which is why I'm looking for some sort of recognised optimization one. Regards, Graeme.
  3. Hi all, Firstly, let me say I know nothing about optimization, hence the post. In a few months I will have 800 or so varactor-tuned band-pass filters to align (possibly more over the years) which tune over quite a wide band. The designer says they take about an hour each. Doing these manually is not an option for me so I'm investigating automating the process. To align the filter, four voltages (V1-V4) are applied to it to optimize its RF response at a particular frequency. To gauge the optimization I consider five spot frequencies around the frequency of operation, where I measure certain parameters: F1 - below the passband well down on the lower skirt where I measure S21 F2 - on the lower edge of the passband where I measure S11, S21 and S22 F3 - in the middle of the passband where I measure S11, S21 and S22 F4 - on the upper edge of the passband where I measure S11, S21 and S22 F5 - above the passband well down on the upper skirt where I measure S21 This is by the by, but out of completeness, the filter is microprocessor controlled and has on-board memory. When the filter has been correctly aligned for a particular frequency the four voltages are stored in a look-up table. When the system needs to operate at particular frequency the microprocessor is told, looks up the voltages for the frequency in question, applies them to the filter, and hey presto. So, as far as I can see the problem is this. I have 11 output variables which are functions of 4 input variables. I need an algorithm that can adjust the 4 inputs to minimize/maximize as appropriate (or cause to meet a specification) the 11 outputs. I have stumbled across third-paty software called "modeFrontier" which integrates with LabVIEW and looks like it will do the job. However, a single seat licence will cost £12K ($20k) a year. Also, it would be a shame to go third-party if an all LabVIEW solution could be found. My problem is that I haven't much of a clue where to start! I've been told that the algorithm probably best suited to my needs is the Levenberg-Marquardt. When I look at the corresponding LabVIEW functions they seem to be more related to curve fitting and finding co-effecients in formulae from sets of data, which is not what I think I want. If any of you get bored with the holiday festivities perhaps you might spare my problem a thought. Seasons greetings, eveyone. Graeme.
  4. Sorry for the delay. Here's my ADO database table reader. It's a bit of a mish-mash and uncommented I'm afraid, but make of it what you will. Regards. ADOReadFromTable.zip
  5. I haven't access to my code at the moment from where I'm posting but I'll upload it as soon as I can. It would be the least that I could do. Regards.
  6. Hi asbo, Thanks for replying again. Well I took your advice and Googled as you suggested, and it turned up trumps! I found a cracking little site that explained all about ADO and Excel in terms that even I could understand. It even had simple examples albethem text based, though it was simple to follow. I hadn't realised that Excel was a database, or at least via ADO could be treated as one. I only had to slightly tweak the SQL stuff in my ADO MS Access VIs that I'd written to get them to work with Excel. I think I might change those to handle both Access and Excel based on the target's file extension perhaps. Incidentally, I did a little experiment. I created a simple three-column two-row Worksheet in Excel by hand. I ran my ActiveX Excel Worksheet Reader VI on it and it took 2-3 seconds to return the 2D array. I tweaked my ADO MS Access table reader appropriately (with my newly gained knowledge!!!) then ran that on the Excel Worksheet and it returned pretty much instantaneously. So there you have it. ADO it is for me from now on. Obviously there is some overhead in in ActiveX. A guy I know who does databases for a living tells me the ActiveX layer sits above ADO??? A bit beyond me but I'm happy I'm moving forward now. Thanks so much to LAVA and to you asbo. I just learn so much cool stuff here it's untrue. Regards.
  7. Hi again asbo, Good questions! Well, as ever in these things, I'm stuck with Excel due to hand-me-down legacy reasons. Also, I like a challenge!!! I guess I'll just have to try and develop some ADO Excel stuff on my own and see what advantage it gives me, if any. Interestingly, I see there's loads of stuff about ADO and Access, MySQL etc but little about ADO and Excel, at least with respect to LabVIEW. I've found a bit but any pointers would be most welcome. Regards.
  8. Hi asbo, Thanks for your reply. Excel's not running when I'm doing all this, not to my knowlegde anyway. I attach my ActiveX subVI for reference but I think it's doing the best that it can. I've heard others say that ADO is faster, which is why I asked. I'm not worried about formatting as all I want to do is read data and write data to an Excel file. Regards. AXExcelWrite2DArrayWsheet.vi
  9. Hi all, I've put together a subVI that writes a row of data to an Excel worksheet using ActiveX. It works fine but it's a bit slow. It takes a few seconds for the VI to complete, although the row only has a few tens of columns. This is not a show-stopper but it doesn't give the user a slick experience in the top level VI that the subVI's used in. I was wondering, if I attempted the same using ADO would I see a significant improvement in speed? If you're thinking why don't I just try it, it's because I'm rather new to ADO (and ActiveX for that matter) and it would take me a while to get an Excel ADO solution going for myself, although I successfully use ADO to communicate with Access. I don't mind doing my own donkey work but it'd be nice to get some speed comparison information between the two approaches from those more in the know than myself before I attempt to flog a potentially dead horse. As ever, many thanks. Regards.
  10. Thank you for the replies so far. Pete, your code is just what I was looking for and I'm having fun playing around with it. Thanks. Replacing a space in a field name with an underscore didn't work for me. However, digging around microsoft.com suggested putting such names in square brackets. This did the trick and works for table names as well. Looks like ADO is something I need to get familiar with. Regards.
  11. Hi all, I post this with a little trepidation as I'm sure I'll get shot out of the Ether as this must be one of the most common LabVIEW ActiveX questions asked. However, try as I might I can find no hint to the solution anywhere. I've Googled this and searched LAVA posts and code repository but to no avail. In general there's a lot about Excel but not much on Access. All I want to do is add a record (row) to the end of an MS Access database table. I know the path to the database and I know the table name. I found a lovely example somewhere on ni.com that reads an entire Access table into LV via ActiveX. Beautiful! I thought I'd chop the back end read stuff off of this and replace it with appropriate write functions. My problem is I can find no properties or methods anywhere down the ActiveX Access application hierarchy that seem do this. You want to know the number of fields, records and all sorts of other stuff - no problem. But adding records, setting or changing values of something - I can't even get started. Is there anyone who is able and willing to point me in the direction of enlightenment on this one? Regards.
  12. Hmmm, interesting. I've noticed this too. I was just about to start a thread on it myself as it's been bugging me for a few years. I see this: TestExecutive.vi\Instance 1 26Saved MultiTestTemplate2 .vi Maybe some of my history can shed some light. As probably many do, I've written a test executive to suit my needs as I didn't fancy TestStand. The top level VI was originally called "MultiTestTemplate.vi". Being a bit slap-dash regarding revision control (shame on me) I just added a number to the end of it as its revisions went up. At some point I Saved-As (or did I just re-name it, could be important but I can't remember) "MultiTestTemplate2.vi" to "TestExecutive.vi" as that name seemed more industry-standard and meant more to people. Anyway, there you have it. It's my top level VI that the "instance" is referring to and as far as I know I'm not using any Express VIs in it. As a parting shot what about this? If someone wants to use my test executive they run my cloner on it so they've got their own project-specific copy and hierarchy. A guy with his own copy has recently been developing on several different computers (very unusual for us). I ran a subVIs list on it out of curiosity and then I saw additional "Instance0", "Instance1" etc. (I'm not at work and can't remember so don't take as Gospel what I've just put in quotes). To close I should say that I'm not using the "Traverse for GObjects.vi" but the "VI:Get VI Dependencies" method recursively, but what from what's been reported the result looks pretty much the same. Further information appreciated. Regards.
  13. Hi w15nu, Haven't looked at this for a while but thanks for your input, I'll look into it. I'm running 8.6 (IT department's a bit slow) and that's what the code was written in. Annoying that it breaks just one major revision later, although, as the code's comments state, no guarantees. I'll probably skip 2009 and go to 2010 when the disks arrive in a few weeks, so I'll try it with that. Regards.
  14. Graeme

    ActiveX

    Hi all, I have an ActiveX-based VI that writes a 2D array of strings to an Excel worksheet. Occasionally the write fails, with the following error message: -2147417848 The object invoked has disconnected from its clients. Can anyone tell me what this means, please? I have little understanding of ActiveX. My VI has been put together by hacking others' examples. Today the VI ran successfully 1630 times in succession before failing. The write is across a network. I attach the offending article. Many thanks in anticipation. Regards. AXExcelWrite2DArrayWsheet.vi
  15. Thanks Joe Z, I'll check this out. You're right in that a command line apparoach is not unreasonable at all, and if it works consistently does it really matter how the job is done. I'd just envisaged that a neat solution might be a wrapper VI just interfacing with a DLL, inputting the traget PDF filename and outputting a pink wire, namely the extracted text. Maybe I'm expecting too much. I always think calling third party applications is a chore because you have to, er...well, install the third party application. That said, if you call a DLL you have to put it somewhere, so maybe there's no difference. Perhaps the ultimate solution is an LV coding challenge! In native LV produce a BD that extracts the text from a PDF though you can count me out here! Ideas still welcome. Thanks guys (and girls). Graeme
  16. Hi all, I want to be able to extract the text from PDFs from within LV. I thought this might be a common requirement but searching for "PDF" here returns nil, and Googling fairs little better. I've discovered that extracting text from a PDF is probably not easy in any language: the text seems to be contained in a very heavily encoded data stream. I doubt I could write an LV algorithm that could do the extraction well (or even badly, for that matter). My thoughts turn to interfacing with an existent DLL. Numerous PDF to text DLLs exist on the Web but I don't know C and its variants so don't really understand DLLs, to be honest. A compay called Softinterface seem the most likely key to success. They've got some good stuff. I've had a play with some of their DLLs and the LV Import Library wizard which created some VIs but I couldn't get them to do anything (oddly, the header file for the DLL only defined very few of the functions that the DLL appeared to support). I eventually got something going via the afore mentioned comapany's product ConvertDoc. This is a PDF to text GUI application that has a command line. So, I send the command line paramaters to it via the System Exec VI calling the cmd console. It extracts the text from the PDF and writes it to a text file (not surprisingly). LV then reads the text file and does what I want with the text. So, I can do it but only with the clunkiest of methods. Can anyone point me in the direction of a slicker method of extracting the text from a PDF? Many thanks in anticipation. Regards, Graeme.
  17. Happy New Year everyone, Well after much trying over the holiday period I've come up with the attached. Very much an experimental work in progress, although it does provide the functionality I was seeking. I couldn't see any posted LV code as I don't have 2009 yet (company has lost the discs!!!), but clues you all gave me in the text of your replies, and in a similar one mesmith relied to elsewhere, gave me enough to think on for myself. There are issues, though. GUIDs are a problem; see the comments in the AppEXEConfig subVI. Also, in the same subVI it would nice to create a custom control that contained a tag name and tag value. You'll know what I mean when you investigate it. I should add, by way of a disclaimer, I don't do much with projects generally. I only use them to create executables (hence my interest in this area) from a single top level VI, so if my goals seem limited project-wise then that's why. I'm not involved with large multi-developer projects at all. Constructive criticism is very welcome. Graeme. AppEXEConfig.vi ProjectMaker.vi
  18. Thanks for the replies so far. I'll investigate them over the holiday period and let you know how I get on. Regards.
  19. Hello, I'm trying to build a project programmatically. The "Add Files to Project" example VI is a really good start but I'm trying to take it further. However, I'm struggling! I'd like to add a build specification under "Build Specifications", akin to right-clicking on "Build Specifications" and selecting "New">"Application (EXE)", and configuring it appropriately. The "ProjectItem:AddItem" method seems the way forward, with perhaps "Application (EXE)" (guessing) as the "Type" input, but "Name" and "Path" inputs baffle me somewhat. Has anyone any pointers for me? All I want to do is copy the build spec. from one project to another. Searches have revealed little. Regards, GGT.
  20. jdunham, you are quite right, it is a data flow problem. There is no oddity at all, other than my brain! In the abscence of the case structure, the simple act of wiring the Dequeue Element function's error cluster to the first of the property nodes yields desired behaviour. Doh! Thank you for pointing me in the right direction.
  21. Hi all, I have a Producer/Consumer architecture, somewhat new to me I should say, that I'm developing. In the Consumer loop there is code in the True case of a Case Structure which has a True constant wired to its selector terminal, so that the code should always run, and it appears to do so. However, remove the Case Structure in toto, so the code that was in the Case Structure should still always run, but certain aspects of the code now fail - so, code in the case that must execute, runs, code out in the open, which surely still must execute, doesn't run properly. The attached VI with its FP guidelines demonstrates this better than I can in words here. Can anyone help? Regards, GGT.
  22. Hello all, I have a requirement to convert a string to an array of the string's characters, each element of the array containing sequentially one character of the string. I can't believe no one has ever wanted to do this but various searches reveal little. I attach my effort but wonder if there is an even simpler way. Risking two questions in one posting I'll say why I'd like to do this. I have a company home brew box that I can send a string command to via HyperTerminal, quite successfully. However, in LabVIEW the box will only accept one character at a time, so a VISA Write in a For Loop indexed by said array of characters. Can anyone enlighten me as to why HyperTerminal sends the string successfully in one go (apparently) , but via LabVIEW it must be a character at a time. As ever, indebted. Regards, Graeme.
  23. As ever, I'm indebted to all who have replied. Thank you for taking the time and going to the bother of doing so. You have given me much to think about and pursue. Both LVOOP and OpenG sound exciting and powerful. I suspect you have pointed me down paths well beyond the scope of my initial posting. Although time hasn't allowed me to do so yet, I shall follow up your suggested avenues with vigour as soon as I can. I wonder if I'm about to embark on that journey where a LabVIEW boy becomes a LabVIEW man... :worship: Thanks again. Graeme.
  24. Ton and Crelf, Thank you both for your replies. I feel heartened that neither of you have replied in the negative. Without wishing to extend this, probably dull to most, posting into an endless one I would like to take the aspects you both mention a little further. Ton, your two suggestions intrigue me. Alas I'm not a programmer by birth, but an escapee from the world of RF test engineering. Thus, you would have to spell out your stamping suggestion a little more for me, for the penny to drop. Regards, OOP, well, I've seen it referred to a lot, but to be honest I haven't a clue about it. I certainly don't expect you to solve my problems for me, but if you knew of a link to an "LVOOP for dummies" or similar, I would be happy to learn from there. Crelf, like OOP, I've seen references to OpenG a lot. Similarly, I don't really understand it, never having pursued it, though I probably should now, but I have a (slightly off topic) question. I summise that to get OpenG VIs you install VIPM which downloads them from the Internet. At work, where I do most of my LV coding, there is absolutley no way our PCs can ever be connected to the Internet. However, I run LV at home on a PC which is connected to the Internet. My question is, can I use OpenG VIs at my work place some how? To maitain relevance I should add that my original post in this topic is the last niggle in a project that I've been working on for two years. It would seem my solution would work but is a little clunky, and I'm the first to admit that. A slick solution would be excellent, and if finding such enhanced my LabVIEW skills as well by methods new to me then that would be a bonus. Regards, Graeme.
  25. Hi All, I have a top level VI designed for other developers in my organization to expand as necessary. Simply, it is a state machine, each state of which is intended to hold code that will run a test and return a single test result. The data types of the results are only ever going to be Boolean, Numeric or String. The results need to be checked for pass or fail, displayed, then built into a result string array for writing to file. To this end I've written near identical 'result handler' VIs to do this for each data type (which I could make into one polymorphic VI). A developer then places the appropriate result handler VI in each state machine case as required. It struck me that I might be able to do all the result handling with a single result handler VI in the following manner. Each result would be converted to Variant data and this wired to an output tunnel on the state machine case structure. This in turn would be wired to a single modified result handler VI outside the case structure. The modification would be that the result handler VI would accept Variant data as its input and would convert back to the correct data type for processing by a successive trial and error method. In this way, fellow developers need not concern themselves about the result handler VIs at all. In essence, I'm trying to get different data types through one tunnel. My question is, what do others think of the proposed technique? Is it accepted programming practice and is it sound? I should add, my data sets are very small in the greater scheme of things and execution time is not critical. Thanks in anticipation. Regards, Graeme.
×
×
  • Create New...

Important Information

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