Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation


About MartinMcD

  • Rank
    Very Active
  • Birthday May 2

Profile Information

  • Gender
  • Location
    Gloucestershire, UK

LabVIEW Information

  • Version
    LabVIEW 2014
  • Since

Contact Methods

  • Twitter Name

Recent Profile Visitors

1,899 profile views
  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
  • Create New...

Important Information

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