Jump to content

PA-Paul

Members
  • Posts

    139
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by PA-Paul

  1. Hi All, I've been developping an app based on a plugin architecture for device drivers and I've run into a problem. The basic idea is that we have one central application and then we can drop the appropriate intstrument driver packages (.llb) into a directory which then gets queried at run time. It's all been working fine, both in source code and from an executable application. Now, all of a sudden I have one plugin llb which refuses to run from the executable application. It runs with no errors when I run the app from source code (calling the exact same llb file as the plugin). when I try to run my exe, I get an error saying : Error 1390 occurred at Open VI Reference in ME Initialise hardware system.vi->Measurement Engine.vi->UMS Project Library.lvlib:UMS_Main.vi LabVIEW: You attempted to open a VI Server reference to an out-of-scope VI. A VI can open VI Server references only to other VIs that it could call as subVIs. After the reference is opened, that VI can return the reference to other VIs that could not normally open the reference. VI Path: C:\Program Files\UMS 3.0.2\Device Plugins\Gimbal-PA MK1.llb\GIMBAL-PAServo1-Plugin interface.vi But calling that exact same llb file from the source code version of the application runs fine. There are other plugins which are called (and written) in an identical fashion, and they work fine. It seems to just be this one. Has anyone come across anything like this before? The only thing that makes this plugin different is that it calls a dll file inside it, whereas the others are purely labview based, but from the error I'm getting I can't see that this should be causing the problem?! The error seems to be being generated when labview tries to open a reference to the plugin VI (which is the top level vi of the llb), not when it subsequently tries to run that vi... I really don't understand this issue, so if anyone can shed any light, I'd be most grateful! cheers! Paul
  2. Hi all. I'm putting together a UI that uses a tree control which should always display only two columns. I'm suing Panes to control the layout of the UI if the window size is changed. IF I set the tree control to scale with pane, the outer size of the control scales, but I end up with loads of empty columns. If I then reset the number of columns back to 2 using a property node, the width of the entire tree control shrinks back to the original size leaving me lots of empty space. Does anyone know a way to make the colums of the tree control automagically resize - i.e. they should grow if I only have 2 columns displayed and i stretch the control width-ways... Any help would be greatly appreciated! Cheers Paul (This is in LV 8.6 btw)
  3. Hi all, I have a system which measures sound intensity as a function of position over a 2D plane and I want to show the results on the front panel of the software which controls said system. I'm using an intensity graph (As there's no need to use the chart facility for this) and the results are "ok" so far. The problem I have is getting the X and Y scale labels correct and the markers in the right positions. The data is obtained with over a user selectable number of points with a selectable increment. So the X and Y scales should vary from plot to plot. I've found out that I can change the values using the "offset and multiplier" property of the scale so that the scales start at the correct position value and increment correctly. The problem for me is that the scale markers occur at the edges of the colour blocks in the graph. For me, it would make more sense if the values crossed the mid points of the colour blocks (since those are the values at which the data was obtained. Is there a way to do this? I think I should be able to do it using the scale "Range" properties, but I can't get it to work at all reliably. Has anyone managed to do this before? Any help would be gratefully recieved! Cheers Paul
  4. Basically, we have a low level "engine" VI which deals with low level commands for the system we're controlling. We then have several "intermediate" level vis which call this engine to perform specific tasks made up of multiple use of the low level commands. Above this we have the UI which as well as being able to call the low level stuff, calls the intermediate level VIs to perform the automated tasks. I need to be able to interrupt the engine (from the UI), but at present since the code in the UI is within the event structure, when one of the intermediate VIs is called, it "blocks" the event structure loop until it completes, meaning that I can't interrupt the engine as my UI won't do anything until the intermediate VI completes. The way I see it there are two solutions - the simplest is to add a second event structure loop which is only triggered by 2 or 3 "interrupt" type controls. This structure can be used to send interrupt commands down to the engine level (via the queue setup we have in place) even if the main UI event structure is waiting for an intermediate VI to complete. The alternative is to shift to a queued state machine in the UI, so I have one event structure which, when triggered, fires instructions into the state machine which can then deal with the intermediate VIs - leaving the event structure free to fire interrupts down to the engine if necessary. The disadvantage here is that I need to recode what I've already done, and you add yet another state machine to the mix (the intermediate VIs calling down to the engine are largely queued state machines, as is the engine itself!). Hope that clarifies what I'm trying to achieve! Cheers for the comments Paul
  5. Thanks for that. I realise each and any event structure would need to be in it's own loop. I was just curious if it was considered a "bad idea" to have two event structures in one UI VI... It does feel a bit strange/dirty having essentially two loops dealing with user interface events, but it does mean I don't end up writing another queued state machine to control a queued state machine which in turn is controlling another queued state machine!
  6. 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
  7. How do you "stick" an item in position?
  8. 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!
  9. 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
  10. 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
  11. 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!
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. Brilliant, had forgotten about that. Thanks!
  18. 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
  19. 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!
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
×
×
  • Create New...

Important Information

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