Jump to content

MartinMcD

Members
  • Posts

    150
  • Joined

  • Last visited

Everything posted by MartinMcD

  1. I'm wondering how people handle dependent custom libraries with source control please. In each case I'm assuming that each library has its own repository (in my case Git) for the development of the library itself, and each project then has it's own separate repo. Here are a couple of options; 1. Take a copy of each library the project depends on and check it in to the project repository. Causes duplication but all the custom libraries needed for the build are then in one repo, with the right version. 2. Install the custom libraries to vi.lib/user.lib. There is less duplication but if someone checks out a project they now need to know to check out the dependent libraries. Plus, if different projects on the same machine depend on differnent revisions of the library it becomes more fiddly. Martin
  2. Hello, I'm in the process of setting up a server to serve all of our yet-to-be-created Mercurial repositories from. Given in Hg that each project will have its own repository it seems to me that a flat folder structure is the way to go ie: CodeBigApplication1 CodeBigApplicationN CodeSmallApplication1 CodeUsefulLibrary1 CodeUsefulLibaryN Although with all the applications and libraries that get created this will mean there are lots/hundreds of repositories with no sub-folder structure, I can't see the benefit of organising the repositories into sub-folders. In fact I can only see a benefit of not having them, ie simpler relative paths when an application uses a library, no funny grey areas on whether a library should fit into sub folder a or b etc. Any thoughts on this please? Am I missing something? Thanks, Martin
  3. Can anyone offer advice on successful naming conventions for libraries & classes and their members and properties please? Eg camel case, spaces, prefixes, abbreviations etc. I need to settle down into a better pattern not least to reduce the number of times I want to change the name and run into SCC problems. Thank you, Martin
  4. Hi there, I've been experimenting with using Mercurial for my SCC. I've come up against this problem and I'm wondering if anyone else has found a good way of dealing with it... If I want to rename a file that is in the repository then I would use the Mercurial Rename function so that all the history is kept. However, if I do this then the LabVIEW project doesn't know the file has been renamed and gets upset that it can no longer find it. If I do it the other way round and rename the file within the LabVIEW project and commit the changes, then Mercurial things I've jsut removed the old file and added the new and the history is lost. Can anyone help with this please? Thanks, Martin LabVIEW 2013 | CLA
  5. Great, thank you for that, hopefully that'll fix my problems.
  6. Also, is there a mechanism for sending an event to the service so it can stop gracefully? I'm having problems caused by not closing the VISA session for my serial ports when calling 'net stop', if an event could be passed I could close the port properly.
  7. Ahh great, thank you for the responses. I realised my error and it's working perfectly now - thanks for the encouragement! (Out of interest, the problem vi was based on my method for processing the raw data coming from the serial port. It reads a value from a text file on a network drive. I forgot about this - the service isn't allowed to access the drive so it was just returning zero.)
  8. I should have said, otherwise I think I will have to convert the PC to run as a real-time device, which is just a bit of a hassle time-wise.
  9. I've created a Windows service from an executable that writes a nonsense value to a network shared variable. What I want to do is read a number from a serial device and write that value instead. It doesn't seem to work and this link suggests it is not going to: http://digital.ni.com/public.nsf/allkb/38128C80B42DBB8486256F3A006DECFF Does anyone know of a workaround for this, ie accessing a port using VISA from within a service? I assume the answer is 'no' but it'd be so useful for my project that its worth checking. Its a continuously running thing and it needs to work when nobody is logged on - hence the service. Thanks, Martin
  10. Thanks everyone, I was a away for a bit and missed the replies to my question. I am going to progress with this option as it is really the quicker load time/less memory use that I'm looking for, I will just continue to roll out whole-program updates as fabric suggests.
  11. Ah-ha, thank you very much for that. So my image below would be the correct way of setting up a motorbike vehicle - calling the parent accessor to set the number of wheels? Also, I do use the 'Get LV Class Default Value.vi' quite a bit to dynamically load classes from disk as required. Am I correct that in this case we'd have to use a dymanic dispatch init method to set the object properties to the required values? I can't see how else I'd do it because the default class data won't have the correct values for the data inherited from the parent class - the number of wheels in this case. Thanks, Martin Setting up the object where some property is defined in the parent: Loading from file, calling dynamic dispatch init method:
  12. Hello all, Well I'm getting there with the whole OO thing but I now find myself confused again, if someone could help I'd really appreciate it. My example scenario... -I initially create a Motorbike class. Into the class private data I add the property NumberOfWheels and set the default value to 2. Now, whenever I drop a Motorbike object constant on to my block diagram or use the 'Get LV Class Default Value' I have a motorbike object with the right number of wheels. -I create a Car class and realise that it also needs a NumberOfWheels property which I create and set the default value to 4. - I realise I can create a Vehicle parent class which these 2 classes can inherit from. I recognise all my vehicles have wheels so I move the NumberOfWheels property up to the Vehicle class. I set the default value to 1. Now, whenever I drop a motorbike object constant on to my block diagram I will find that if I did nothing else my motorbike only has one wheel. So I create an Init method in Vehicle set to must override. Instead of dropping a Motorbike constant I instead drop the Motorbike override of Vehicle Init. This init function calls the Vehicle 'Write NumberOfWheels' accessor passing a value of 2. Every child class has to do the same. I'm just wondering if this is the right way of going about it please? What I mean is that before I set up the inheritance I could be sure that every motorbike object would have the right number of wheels. Now I need to rely on the init function to change the value to something sensible. My default class data for a motorbike is now no longer stored in the private data (and so can't be read in using the Get LV Class Default Value vi) but in an init vi. I can't think of another way of doing it so I'm thinking I might be worrying about nothing but it'd be great to check. Thank you, Martin
  13. Hello there, This might be a silly question but here goes anyway... I have a large modular data acquisition and sound & vibration analysis program. I have implemented it using the actor framework. I have ~5 main actors and then about 40 sub-actors, one for each analysis type. This means my executable is about 40MB and takes a while to start up. All the sub-actors/dependencies are included because are set as 'always include' in the build spec. This is a pain as most of the time a user will only want to use a subset of the functionality - the program takes up more memory than it needs to. To solve this I wanted to implement more of a plugin architecture according to this post https://decibel.ni.com/content/docs/DOC-19176 but got stuck doing so. I was wondering if there is another alternative to a packed project library which would allow the sub-actors to exist in such a way that they are only loaded when they are needed. I need to include all dependencies in the build somewhere as not all users have LabVIEW on their machines. Thank you for any pointers, hope this makes sense, Martin
  14. Hi there, I'd like my program to be able to notify a user on Microsoft Lync that there test is finished. At the moment I send an email. Does anyone know how to do this in LabVIEW or a pointer in the right direction? Thanks, Martin
  15. Thanks Greg, sounds like I am in the wrong area - thank you for clarifying for me.
  16. Thank you for that, For anyone interested I've made the error go away by 'preferred execution system' for the vi to 'user interface'. However I'm now having a value of NaN returned so I'm not sure if I've fixed it or not. Thanks, Martin
  17. Hi there, I'm trying to use the PresentationFramwork System.Windows.Controls.Border width property but without luck - I keep getting error 1172. Does anyone know what is going on please? Any help much appreciated! Thank you, Martin wpf border.vi
  18. Hello there, I was wondering if there is any performance benefit in spawning new processes by using a *.vit as the source, rather than a reentrant vi? Is there any other reason why I would use one method over the other? They both seem to work the same. Many thanks for any help, Martin
  19. Thank you very much for the help. I had thought it wasn't a font issue because my button only had an image not text. However, the boolean text was there on the button, just hidden. I've since been reading around the posts and now understand better, for anyone else here are a couple of posts: http://forums.ni.com/t5/LabVIEW/Font-size-on-Windows-7-with-LabVIEW-2009/td-p/1055114/page/1 http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Fix-font-behavior-between-windows-versions-platforms-amp/idi-p/965993 Is there a way I can set the font size but not the font itself in the ini file? Thank you, Martin
  20. Hello there, I have an application that I wrote on a Win XP machine. I tried running the executable on a Win 7 machine and I noticed that my system-style UI buttons have changed size, usually wider. I wondered if it was issue with the executable so I opened the vi itself on the Win 7 machine and noticed the same affect. I then resized it back to normal, saved the vi and opened it back on the XP machine - it had gone wider again. Has anyone seen this phenomonom before please? I will post back if I find a fix. Thank you, Martin
  21. Hi all, Wowzers, thank you for all of that, perfect. Thank you very much! Martin
×
×
  • Create New...

Important Information

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