Jump to content

Yair

Members
  • Posts

    2,870
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by Yair

  1. Based on the recommendations made here, I've made a decision recently to check out SVN as well (since I'm going to have another developer working in parallel), so I would like to add my voice to this request. I have started experimenting with TSVN using a local DB, but I haven't had the time to really go over all the postings about this topic, and I would like to be more confident about it before proceeding.
  2. Just now??? I thought you already know everything. I'm not sure what your problem is.If you have three groups of spirits, one with 2 spirits, one with 5 spirits and one with 8 spirits, then you do (2+5+8)/3 and you find out that you have an average of 5 spirits in each group. And that's how you apply mathematics to spirituality.
  3. Type cast the reference to the string control class and you can control this. I only checked it on 7.1.
  4. I don't know the details of how the ports are handled, but I do remember hearing about cases where the ports aren't freed fast enough if you open many ports. In any case, the solution would be to only open the port once and only do the write-read cycle in the loop. This works perfectly well and is probably faster. To get safe comm, place the open-close part in an outer loop, but this loop should only keep running if the internal loop experienced errors.
  5. Don't keep the color information in the table. Hold it in another array and apply it to the table whenever you change the data in the table. To handle the drawing time, set the Defer Panel Updates property to true before updating the table. This causes the display not to update until you set the property back to false and will make it go MUCH faster. The property itself belongs to the front panel.
  6. And we've come full circle back to Michael's suggestion. Yes! That's right. I'm getting a feeling that something is wrong here, but I can't put my finget on it.
  7. I'm fairly sure that you can use XML to represent almost anything, but you would need an editor. An open source G would probably benefit from the code saved as XML, but this would probably be relatively inefficient. In any case, as Chris said, to convert an LV diagram to XML, you need code for every class and that's a lot of work.
  8. I'm not sure if you can get the cycle "PC sends -> controller receives -> controller sends -> PC receives" to run any faster. It's possible that the controller itself is limited in how many times a second it can respond to your requests. One thing to note about your code is that you're building an array inside a loop. This requires LabVIEW to keep allocating memory all the time and can slow your program down or even crash it eventually. You're better off making an array large enough before the loop and replacing elements inside it.
  9. Another interesting way to convert a VI to text might be to recursively traverse a diagram and convert it to XML. I believe that XML is supposed to allow for nested data and for unexpected types, so the result might be interesting. Of course, interpreting the XML might be a bit more complicated than creating it.
  10. You can control the list of COM ports and their aliases through MAX. You can also do it by editing the visaconf.ini file. Another option is to use ASRL::INSTR4 as the name of the port, which will probably work.
  11. I believe that's a numeric with a transparent background placed on top of the needle, which is not transparent.
  12. I believe that OpenG has what you want - a Remove Duplicates from Array VI and a Filter 1D Array VI. You use the Remove Duplicates VI to generate the list for the ring and the Filter VI to get the indexes of your desired elements and use those indexes to extract the lines you want. I suggest you keep the actual data in another array (both color data and the actual values) and extract the data into your table every time you change the filter.
  13. Do you have a database management system which supports networked databases (like SQL Server or MySQL)? I believe that Access does not support this, so if your DB is an Access DB (or Jet, to be more accurate), you might have a problem. Anyway, to connect to a DB, you need a connection string. You can create this string by going to the Windows Control Panel > Administrative Tools > ODBC Data Sources and creating a UDL or DSN file pointing to your DB. The file should have the connection string inside it or you can point Windows directly to the file. If you have an Access DB, you might be able to provide access to it by placing it on a network drive. In any case, this is not an LV issue, so I suggest you do some searching on ADO, ODBC and connection strings to see how to set up your connection.
  14. Not if your exe is supposed to load the VI. The RTE can not run a VI compiled in another version (At least that's how it used to be and I doubt it was changed). To do this you would probably need to call another exe, compiled with the appropriate version and pass data back and forth using VI server, making this much more complicated.
  15. Unless you have the DB toolkit, NI did not offer you anything - All the tools for accessing DBs from LV go directly to the providers. Most of them use ADO (ActiveX or .net) which is a part of Windows and I have seen some that use DLLs, but in any case, NI did not write anything there. What NI did write (and sells) is the DB connectivity toolkit, which is a set of VIs which include some basic functions (create table, insert into table, build a parameterized query, etc.), but this toolkit only includes a small fraction of the things you can do with DBs. The main work it does is in parsing all the data types so that you can wire anything into the VIs. I do use the DB toolkit and I have found that once I've added some VIs (like Update Table or wrapper VIs which make the selection of data easier) that it was good enough. If you want an example of an application I wrote, here's one - a weighing system at a compost site (yes, I know, it stinks ) where drivers come with their trucks and get weighed going in and coming out and everything is in a DB (the lists of drivers, trucks, clients, orders, shipments, etc.). So an example of a function would be a VI which returns a list of truck names and IDs (each object in a DB should have a unique identifier). This allows putting the list of trucks and IDs in a ring control and when the truck is selected the value of the ring is the ID, and that can be used in the queries. Note that behind the scenes the VI can be going to several tables, but all the caller knows is that the VI will return a 1D array of strings (the names) and a 1D array of I32 (the IDs). The same would apply to any other list in the program. Another example is a VI which returns the details about a truck - it recieves a truck ID and returns a typedef cluster of data. Again, the VI could internally be doing a lot of stuff, but the caller doesn't care.e
  16. As hinted, in LV 8.x NI put scripting behind the license engine, so you need a license to activate it, which you can't get at the moment. If you search this board, you should be able to find the PMS assistant or the Dataact property browser, which I believe should give you access to these properties and methods in 8.x. Sounds like this should be added to the readme.
  17. I'm not sure what your problem is now, but here's a suggestion for what I believe is an equivalent piece of code: You should also make sure that you format the date-time string in a format which the database can recognize. Anyway, my suggestion for working with databases is not to refer to the tables directly, but to create functions (VIs) which will perform tasks and seperate you from the database structure. For example, you could have a VI called "Save Results". It will accept a typedef cluster or an array with the relevant results and will internally call whatever tables and queries it needs to perform its function. If you are asking about how to generate SQL code which will interact with several tables or have conditions, you should search for SQL tutorials or books.
  18. Actually, it seems that in 8.2 you can drag the icon into a static reference, but the reference itself has a null value. Also, deleting the static reference clears the clipboard, which strikes me as sort of a bug, albeit a minor one. I realized it was a VI. I was actually confusing text and image copying (which seem to be done in seperate functions) with copying pieces of code (which is copied into a diagram). In any case, you could break down the VI diagram for sure using the diagram properties etc., but can you tell when another event structure fires? As far as I remember you can't, but maybe this was added in more recent versions. Unless maybe it's a user event and you can get a reference to it and register it in another structure? In any case, since the value change event is fired when pasting, I think I would limit the changing to the current VI.
  19. I don't know about LV 8, but previous versions had an option in the application builder to include Port I/O support in your installers. It's possible that this is still the case.
  20. Dragging the clipboard icon into a static VI reference does nothing - the reference stays with a question mark. Accessing system VI like BObjectCreate1 and BHierarchy seems to be something a little tricky, and I assume that the clipboard VI is in the same league. In any case, even assuming that the internal clipboard implementation hasn't been changed since the days before events were available in LV, is there any way to access internal data to that VI, especially without knowing its internal structure?
  21. My usage of the word "level" was probably wrong. I basically meant that the coverage is different. In fact, I think the coverage of world news in most of the world is relatively limited compared to local news (except for the Europeans who have nothing better to do than meddle in other people's business ). I like Top Gear not because I like cars, but because I think that it's mostly a great show - their scripting is great, their photography and editing are nothing short of amazing and it's very good fun. This is true not just for the current format, but for the older versions as well, although the current format, with its wild races, mad experiments and more inter-personal interaction (not to mention what is probably the worst wardrobe of any TV show on the planet) is more fun in that way. For those wondering what I'm talking about, examples of Top Gear shows are racing a Ferrari 612 and a commercial jet from London to Switzerland, Racing a Bugatti Veyron and a small plane from Italy to London, buying old supercars and putting them through various tests, seeing just how much abuse a Toyota pickup can take and keep working (a lot. Really a lot) and so on and the point is doing it as amusing as possible, since that's how you draw the big, non-car-fans audience. BTW, this applies not only to Top Gear, but also to shows like 5th Gear (which has some people from the older version of Top Gear) and some other shows Jeremy Clarkson made with the Top Gear team (like Speed and Extreme Machines).
  22. Here are several options I can think of - Control the color properties - this at least gives you some level of control and is very easy. I think that in 8.2, you can make parts of the controls transparent and apply the skin to the pane (each pane can have a skin, but I don't know if you can control it dynamically). You will then probably need a subpanel for each control (sounds ugly). Use typedef controls. By removing the typedef control from where LV knows it is, you can force LV to look for it and tell it where to find the new one. Problems - not dynamic (can only be done when loading), it's not choosing (only if LV will not find the controls, you can tell it where to find them and it takes time), not sure it can be done with an executable (LV used to have an option of controlling whether executables still use typedefs or not, but I don't know if newer versions still have this). You could probably do this by having your interface loaded dynamically (maybe in a subpanel) and then copy the controls to where LV expects them to be. That way, you could also do this dynamically by unloading the VI, copying the controls and then reloading the VI. Use scripting to replace the controls. This requires the VI to be idle and I don't think it would work in an executable. Probably the most "skinny" skin would be to create your controls as pictures and use the picture control to generate your interface. Once you do that, you will probably need some sort of framework to be able to manage working with the picture control (placement of control, detecting events, etc.). You can find some examples of working with the picture control here.
×
×
  • Create New...

Important Information

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