Jump to content

PA-Paul

Members
  • Posts

    135
  • Joined

  • Last visited

Everything posted by PA-Paul

  1. Hi All, Quick question. I'm writing a user interface based on using an event structure in a while loop (nothing unusual there!). However, to keep it simple I run the code for each UI generated event within the event structure. The problem is, some of the "events" may take some time to complete, and I need one or two controls to be accessible at all times (an interrupt and an exit etc). The events themselves are based on calls to a queued state machine in a separate VI, so they are inherently interruptible, but of course whilst they're running the event structure loop is essentially "stuck" and wont respond to an interrupt. Would it be "bad labview" to include a second event structure loop which only responds to the "interrupt" type controls (this would then allow me to fire an interrupt command into the queue of the subvis "engine" doing all the work)? Or should I re-write my UI as (another) queued state machine, whereby the state machine runs the longer tasks and the event structure driving the UI state machine can also fire things into the engine queue for interrupts? Any thoughts or suggestions welcome! Cheers
  2. How do you "stick" an item in position?
  3. That's a bit of a shame... the only other useful thing I came across by accident was that strict type def'd controls do not resize with the pane... So if I want all my buttons to remain the same size irrespective of pane size, I can strict type them - although that seems a bit clunky... Maybe I should listen to my colleague and go for a more menu driven and less button driven UI - by for this application I think buttons are better... Ho hum! Cheers!
  4. Crelf wrote: The application I'm working on does vaguely follow this, in that I've written an "engine" VI, which is based on a queue driven state machine and I'm now writing a UI. The idea being that the UI vi (based on an event structure with the engine sitting in Parallel waiting for the UI to put commands into the queue) drives the engine and also tells the engine when to quit when a user hits the exit button on the FP. But the way I was going to send data back to the UI was via a second "uplink" queue, but might I be better off sending a control refnums for all of the controls on the UI and doing writing to the UI front panel like that? What happens then if I write a second UI which doesn't use all the same controls? Won't that cause problems? Anyway, now I think about it, if I've written the engine right, making multiple UI VIs for different screen resolutions should be doable simply by copying the existing UI and then re-arranging the front panel controls/indicators to fit and then saving it as UI 1024x768 or somesuch... Thanks for the thoughts! Paul
  5. Hi ShaunR, Thanks for the reply. The problem is, once you've selected one thing to resize with the pane, you no longer get that option on the other items. I can't find a way of individually selecting which items to scale and which ones not to scale. As far as I can see, I can either choose one item to scale with the pane, no items to scale with the pane or all items to scale with the pane. If you look at the 2nd example, I've only selected the waveform graph to rescale with pane. If you then look at the second page and reduce the window size, you should see the boolean control on there disappear. So that's somewhat useless. Anyone know different? I really want to control which items on the pane rescale and which simply move with the rescaled objects. Cheers! Paul
  6. Hoovah - I've wondered about a solution along those lines before, but have no idea how to implement it... Although I did see an openG Vi - write front panel to ini. I've not played with it, but I guess it dumps front panel positions to an ini file? In which case, it may be possible to build an ini file for each resolution and then use the read equivalent of that VI to set the positions/sizes on restart... Still sounds like it would take quite a long time to implement. I'm playing with using panes to achieve what I want at the moment, but even that's not easy - why can't decide on a "per control" basis which elements within a pane to resize?! I only seem to be able to select one, all or no items to scale with the pane! Ho hum... Any other suggestions welcome!
  7. Hi again, So, still looking at front panel design. Have been playing around with panes and run into a couple of problems. First up, the reason I'm looking at using panes is to deal with writing a front panel which will go relatively seamlessly between monitors with different screen resolutions. So, what I want on my front panel is a couple of controls/indicators which are always visible (status indicators, exit button etc), in the attached, these are arranged in a subset of three panes down the right hand side of the screen. This bit works fine. I can resize in any direction and still maintain the visibility of the controls/indicators. In the main pane, I want to put a tab control which will have different controls/indicators depending on the task the software is currently running (in this case its an acquisition and positioning system, so there'd be a tab for positioning and a tab for acquisition etc). The problem I'm having is getting the controls/indicators within the tab control to behave nicely! I don't want all of the controls to resize within the tab (and I think herein lies my problem). In this application, only want the graphical controls (i.e. waveforms etc) to resize but the other controls to remain fixed in size (as per the first example attached) how do I do this? If I set the tab control to scale with the pane, then I can't individually set the controls within the tab to scale. If I set the graph to rescale (meaning I can't set the tab to scale), the other pages of the tab get messed up. Any suggestions would be most welcome! Cheers! Paul Front panel 1 - no tab.vi Front panel 2 - with tab.vi
  8. Hi All, I'm sure the answer to this is out there somewhere, but I can't find it... I'm putting together the user interface for an application. We're currently writing it based on a resolution of 1024x768 (as my experience of resizing for different resolutions/aspect ratios is not good!). But I want to maximise the amount of real estate available within that - so there'll be no tool bar and no scroll bars when it runs. But I need to know what useable screen area that leaves me with. How do I find that? Its easy with the scroll bars and tool bar in place, but I can't figure out how much space they take up. Any one know the answer? Cheers Paul
  9. So, finally that was all relatively painless. Have moved away from using svnserve to "visualsvnserver" that I just stumbled across on the web. This gives us https access to the repositories off site and was remarkably easy to set up. My next question - backup. I've installed the respository on a windows small business server 2008 system which does a full back-up every night. But everywhere I've looked about backing up svn repositories it says to use "hotcopy" to make backups. Can I rely on the windows server back up to be able to rebuild my repository in case of a big problem? Or should I set up some kind of automatic "hotcopy" backup as well? Any suggestions welcome! Paul
  10. Thanks for the info, will give that a try. However, I discovered why we could no longer access the original repository from the client machines - someone had switched the old server off!! Having turned it back on I can now go back to my original plan! Thanks again! Paul
  11. Hi All, We set up an SVN repository on our server a while back and have been using it fine. We use SVNserve on the server so that to access the repository we use svn:\\SERVER\repository\blah. My problem is that we have just installed a new server and want to move the repository onto that. My initial plan had been to get all users (actually there are only 2 of us) to fully commit all changes, then use hotcopy to move the repository to the new server and setup svnserve on that. The problem is that I've been away and we can no longer access the old server (due to network issues). So I can no longer get to the repository to commit the changes which currently exist "in the wild". My new plan then was to move the repository anyway (using hotcopy), and then somehow update the local clients to look to the new repository location when updating and committing. But I can't see how to update where the repository is on the local machines. So any attempt to "update" simply fails as is says the repository is no longer there. Anyone know how best to deal with this? Cheers Paul
  12. Brilliant, had forgotten about that. Thanks!
  13. Hi all, I have a small problem I'm not sure how to deal with. I've written a subvi to control the movement of a stepper motor. The subvi sends the appropriate command to make the motor perform a movement and then monitors the stepper driver until the movement is complete (it's marginally more complex than that - it deals with limit switches on the drives and a hardware E-Stop implementation as well). What I want is for the top level VI which calls this subvi to know when the drive is in motion. I have a boolean control within the subvi, but obviously, the top level vi can't see that. I created a (boolean typed) control reference and property node within the subvi and hooked it up to the connector pane. This works as I expected, but I want this functionality to be optional - and if I don't connect a control reference to the subvi, I get an error saying "invalid reference". How do I make it not worry if I don't wire a reference in? Thanks in advance! Paul
  14. Hi All, Liking the look of the new site! I hope people are going to come flooding back here now its up and running again! So, my problem - I want to define a custom error code file which is specific to a new project we're starting. The project is technically "multidevelopper" so I want everyone to have access to the latest version. We already use SVN for this project in terms of source control. But the problem is how do I deal with the error code file? If it's just in the project and project's directory (so as to be included in the SVN "stuff"), labview doesn't see it - as it only seems to look in the userlib folder... But I don't want to have to SVN the userlib particularly as this is project specific... Is there a way to get labview to check the current project directory for error files when I run a VI from the project? Any other possible solutions? Cheers in advance! Paul (By the way I did post this question on NI.COM here as I didn't realise this place was back on line! Cheers!
  15. Hi All, Thanks for all the feedback. Just wanted to say we decided today to run a needs:lock based SVN, and we're going to use the JKI tool for integration into labview... If I remember, I'll post back here with any thoughts on how it works in the not too distant. For the mo, it seems to do exactly what it says on the tin - it integrates the tortoise svn commands into a menu within labview... which is just what we wanted! Thanks again! Paul
  16. Hi All, Thanks for the comments. The Jury's still out for me on the "lock-or-not" argument. I'm going to have a sit down with the other two guys who will potentially be working on the code on monday and we'll make a decision then. For the moment, I'm still just playing with SVN. I've got a project that only I will be working on as well, so I've set that up in SVN, currently for merge rather than lock, so I'll see how I get on with that too... While I'm here - I did try to use the pushok plugin to integrate into labview, but I ran into a problem, perhaps someone here can shed some light: So, I set up a labview project with a folder hierarchy and a few subvis for testing etc. I put that on my SVN repository. I then configured SCC within labview to use the pushok plugin and told it where the repository was and where to put the working copy etc. I then check out a working copy, open up the project and go to edit one of the VIs, it asks me to lock the file, so I do, no problems so far... Next up, I go to another PC on the network and set it up as above with the pushok/tsvn "stuff" and set up labview in the same way. I check out a full working copy, open up the project and then try to edit the same VI I have "locked" on the first PC. I get a dialogue asking me to get a lock, I click ok, then it tells me the file is already locked (good!) but then I get a couple of errors - When I click continue, the same error pops back up, and then the VI I'm trying to edit can be freely edited.... and saved... but then obviously I can't commit the changes from this PC since SVN sees it as locked by the first PC, which is good... but what are these errors about!? Anyone come across anything similar? Cheers again! Paul
  17. QUOTE (hooovahh @ Jun 4 2009, 02:32 PM) I was under the impression that, by default, SVN does not use a "locking" model, but rather a "copy-modify-merge" method... in which case I should be able to modify anything in my working copy without issue and then (subject to their not being any conflicts) simply commit my changes. At present, its not that I can't commit things, but I can't physically save them. If I open a VI from my working copy and then modify it, and then try to save it, I can't - it says the file already exists and that I don't have permission to over-write it. What I expected it to do was let me save it and then show me in the overlay that it was modified... I don't understand why the files are being set to read only when there is no "need-lock" property set on them, and even obtaining a lock doesn't appear to do anything... Any other thoughts? EDIT -- Ok, so I just deleted the working copy, and re-checked it out, everything now works as I expected it too... Cheers Paul
  18. QUOTE (ASTDan @ Jun 3 2009, 07:13 PM) Ok, So I played around a bit, set up a repository on our server which I can happily access via svn:\\. Now I have a problem though! I just moved an existing project into the repository by "importing" the top level folder into the repo and then checked out a working copy back onto my PC. Now, for some reason, every single file within my project has been set to "read only"... None of the files have any subversion properties set, I tried "getting a lock" on the file, but that didn't help either... I can manually (through explorer) set a file to read/write to save changes, but when I commit that file back into the repo and then update my working copy, it reverts to read only! What am I missing?! Any help greatly appreciated! Paul
  19. QUOTE (shoneill @ Jun 2 2009, 08:31 PM) Unfortunately, I think the perforce "trial/demo" is 2 users only, and we'd be 3... meaning an instant cost of abour £1500, not huge, but not easily justifiable either... Anyone point me in the direction of an easy step by step SVN setup? with the repository on a windows server machine? Cheers! Paul
  20. Thanks for the reply, I have just noticed that there's a whole forum section on this!! So have started to have a trawl through there - am downloading SVN/tortoise SVN as I type to try to set it up on the server whilst no one's here (so as to minimise disruption!) Paul
  21. Hi All, We're a small company doing a mixture of things, and we use labview to write control software for various automated systems that we supply to our customers. I'm actually relatively new to the company (but have labview experience from my PhD), but I know that source code control has often been mentioned, but never implemented (and, from the stories of my colleagues, it probably should have been!). One of the reasons for this is that, prior to my joining, there has only been one "major" labview application and it was maintained by only two staff members. Now I've joined the team there are 3 of us able to use labview, and we're about to embark on a complete overhaul of that one major application (a complete bottom up re-write of the architecture and a major cleanup of most of the processing algorithms and things that went with it). So, again the topic of source code control has come up. None of us has used it before (at least with labview) although we're familiar with the basic concept, and we don't know where to start - particularly in terms of what software we need. Bearing in mind we're a small team (and from within a small company), we don't want to be spending thousands on licensing of some super dooper massively complex system. What we need is something that prevents "code collisions", probably through checking in and out of code etc and maintains a decent backup of the projects code repository and revision history etc. Can anyone point me in the direction of where to start? Or recommend a suitable piece of software and how to go about starting it up? If we're going to implement source control, ideally I want it in there from the get go on this project, but we do have a pretty tight timeline so I can't spend months learning a whole new thing just to get this implemented... Anyway, as I say, if anyone can point me in a useful direction to get us going I'd really appreciate it! Thanks in advance for any help! Paul
  22. Hi All, Sorry to resurrect this thread, but I've just discovered something relevant which I wanted to add.... In short - Beware the DAQmx read property node when using a USB based DAQ card! The option for where to read from (i.e. relative to first read, most recent etc) does not work well when set to "most recent". In my application, I was acquiring data continuously at a fixed rate and then (at regular but not necessarily fixed intervals) using the "most recent" setting to try to read back only the most recent data point. I was then using this to provide feedback to control a 2nd device which would in turn influence what was read by the daq card. In essence, the daq device was providing data for a feedback loop. I found that my feedback loop, instead of providing a steady state for my system, was oscillating. After much testing and discussion with a colleague, we discovered that it was because the DAQ read was not actually providing the most recent data sample at all, but was always one iteration behind in the feedback loop! It appears that this arises from the way data is transferred from DAQ devices over the USB bus. The card buffers some data "internally", before sending "bulk packets" across the bus to improve efficiency (As opposed to say a PCI based card which uses DMA). When I set the DAQmx read property node to "most recent" and then read back the data, I was getting the most recent data from the DAQmx buffer, and then immediately afterwards DAQmx would go and get the next data from the card. So then, on the next iteration, I still only get what's in the DAQmx buffer which was actually sent from the card on the previous iteration of my feedback loop, meaning my calculations for control were not based on the most recent data at all, but were one loop iteration out - hence the oscillation! There's a thread over on the NI forum which confirms this behaviour for USB based devices. Anyways, as USB devices appear to be becoming more common for DAQ due to convenience, I thought I'd just post this up (not that this thread is really in the right forum for this anymore - any mods want to move it?). Cheers Paul
  23. I was just wondering... how does the "classes" approach lend itself to application building and distributing (i.e. generating exe files etc)? One of the reasons we're looking at using the "call by ref" plugin approach is that we want a top level architecture which (in the case of the new project I'm about to start work on, rather than the tuneable laser I mentioned above) would allow us to add support for new/specific hardware (function generators etc) further down the line and simply provide end users with a new "driver" set for the hardware they're using. If I were to use the classes approach, would I have to include the "drivers" for every type of hardware that might be used? Or could I just supply the ones most appropriate for the specific configuration? Cheers for the info! Paul
  24. Thanks for the hint. My only minor issue being that I've never worked with classes at all and don't really know where to start... I'm a physicist by training and a LabVIEW coder by need (although I enjoy it too, which helps!). Are there any tutorials/resources which explain how to use/write classes? this is something which may also prove useful for another project I'm about to start on, which involves writing control software for a measurement system which will have motion controllers, function generators, scopes etc etc which may also be different "system to system". But if its something that's going to take months to learn how to do properly, I may have to find a simpler solution for the short term. any advice greatly welcomed! Cheers Paul
  25. Hi All, I'm developing some software to control a measurement system comprising of (amongst other things) a tuneable laser. The slight problem I have is that I want the same software to be compatible with different lasers (at present I have 3 different lasers I may want to use with the system). I wanted to use a plugin type architecture, so that I can simply select which type of laser is currently connected and everything will work happily. I've started to implement this by having a set of "actions" that I want the laser to perform (such as switch on/off, set wavelength etc etc.) and having a generic VI for each action which calls the appropriate driver depending on which laser is being used, and this works to an extent. The problem is that I need to perform a rapid sweep of the laser channels, which is typically achieved by running the "set wavelength" vi in a loop with an incrementing input to the wavelength value. Doing this with the "plugin" type VIs takes much much longer than if the driver is "hard written" into the application. I presume this is because of the continual opening and closing of the VI reference, is there a way round this? Is the plugin architecture really the way to go in this case? Any thoughts would be greatly appreciated Cheers Paul
×
×
  • Create New...

Important Information

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