Jump to content

MartinMcD

Members
  • Posts

    150
  • Joined

  • Last visited

Everything posted by MartinMcD

  1. Hello there, I am trying and failing to set up a call to the kernall32 function GetFullPathName, I keep getting stuck on these things. Would anybody be able to help me please? I've attached what I have so far but the call just crashes LabVIEW straight away. Thank you very much as ever, Martin
  2. No way that's fantastic! Thanks so much for the help with that, I've spent all day trying to sort this out. I had scheduled in to bang my head against a wall all of tomorrow as well, I'll have to find something else to do now Thanks so much, Martin
  3. Hello there, I have a tricky problem I'm hoping somebody might be able to help me with... I have a vi which runs as a child window within another vi window which I created using the SetParentWindow() method in user32.dll. This works great. The result is as in the image below where the excel document exists as a child window within Excel: I then use a property node to check the child panel bounds. This works fine normally. However, if I move the parent window (and hence the child window within it) then the child's panel bounds are not updated, which they should as they reflect global screen coordinates. If I move the child window just a smidgen then the child panel bounds are correctly updated to reflect the actual global position of the child. (I'm happy the property node doesn't update in my scenario, it's just I need a solution) I thought a way round this would be to get the size of the child window by using a windows api call instead. So, I'd like to use the the user32 GetWindowRect() method. However, I am not sure how to set up the main part of the call, namely the RECT structure pointer - I've done basic dll calls before but I've not passed in a pointer and I don't know how to create a structure of the right type. I have the window handle ready to pass in. If anybody can help me set this up it would be fantastic. I will keep trying myself and post back if I figure it out as well. Below is a screenshot of the setup: Thank you, Martin
  4. Ahh great, thank you. I was being silly and trying to find the property in a channel node. Thanks very much, that's saved me loads of time.
  5. Hello there, I have a large data acquisition application. When I create a voltage input channel to add to a task I use custom scales. Now, this means that the possible Min & Max value (in scaled units) will depend on the custom scale and on the input range of the card. I need to work out what I can set these two values to at runtime. I can call the AI.Min property once the task timing has been set up, which is no use as by then I have potentially already generated an error. Does any body know if there is a quick way of just checking what the input range of a device/channel is at run time, so I can work out what my scaled unit min & max values need to be? Thank you, Martin
  6. Thank your for all the help on this, it makes better sense now. The only thing I'm left wondering is when I would use the default implementation of an override method (ie call parent method), it doesn't seem to be any use apart from as a placeholder.
  7. Hi again, Thank you for the replies. To make sure I understand I've made another screenshot...I've created a class called Vehicle and a child class called car. - The car:addone method just calls the parent method which does a simple increment on a numeric. - The value on the probe after the action shows that the behaviour I wasn't expecting - it has two values of Numeric, one for the vehicle and one for the car class. I was expecting it to increment the car class Numeric value not the Vehicle class. - Does this mean the way I'm doing the override at the moment (from my first post) is the right way of doing things? Thank you, Martin
  8. Hello everyone, I think I have a fundamental misunderstanding of what the Call Parent Method does, specifically in an override method. Please can someone help make it clear to me? The first part of the image below shows the contents of my override method when it was created. I thought that this would call the parent's implementation of the method (Close Settings Window) but pass in the override method's class data. However, it doesn't work - it calls the parent method but then seems to use the default parent class data - ie in this case the wrong vi ref. The seconds part of the image shows what I have ended up implementing in the override method which works fine - it calls the same function that the parent implementation calls. However, it now means I have to edit every override vi to be like this which is duplicating code and adding the risk of errors etc. I'm guessing I'm missing something or misunderstanding the OO process. Any help would be great. Thank you, Martin
  9. Thank you for that, I've resolved it now and I've learnt my lesson.
  10. Hello there, All of a sudden when I open one of my projects it is including a whole list of classes from another project in the dependencies. When I remove the main vi then the dependencies list is cleared and when I use the 'Find Items Incorrectly Claimed by a LIbrary' function it agrees with me that all the included dependencies should not be there. Does anybody know why this happens please? I am not deliberatley referencing any of the included files and they never used to be there, and I haven't changed the code. Can anyone help please? Thanks Martin
  11. Thanks, it turned out to be a schoolboy error - one of my variables had reset to zero with the end result (after a division) that I was trying to read a massive number of samples from my DAQ task. Doh!
  12. Hello there, Well, this is strange. I have a program that runs fine in dev mode and has always run fine as a built executable as well. Now I'm getting this strange error which I've not seen before. (The location of the error is valid, one of my vis). I don't suppose anyone else has come across it? I'm in LV2011. A long shot but it'd be great if anyone can help, Thanks, Martin I take that back, I can generate the error in dev mode. Should make life easier. I'll post back once I figure out the issue.
  13. Done it. By using the /3GB option in addition to /pae then I am limited to a 640x480 16 colour display but it gives me the extra memory I need to do the build. Excellent!
  14. From looking around the NI site it seems getting a 64-bit setup would not help as the executable would then only run on 64 machines, plus most of the toolkits I use aren't available either. I've looked at packed project libraries but I keep getting stuck with them. My app consists of multiple dynamically loaded child windows within a main app window, communicating via queues/notifiers and user events - I'm wondering whether it would make sense to create an exe out of each child and then call that instead of the vi. Does anybody have any comments on whether this might be a good/bad idea please? Ahh, I suppose the sticking point would be communicating user events across executables. Hmm... Thanks Martin
  15. Hi all, thank you for the tips. I tried upgrading to LV2011 and I no longer get an executable that won't run (as in my first post) so it looks like that was a bug. However, I do still get a failed build due to the Out of Memory condition. I tried monitoring the number of GDI Objects and also increasing the maximum to 30k in the registry, unfortunately to no avail. Thanks Martin
  16. Hiya, Yep I did back-to-back tests with the LV2010 and LV2011 versions of lvsound2.dll and it does seem to be a new bug in LV2011 - I've reverted to using the old version of the api for now. Thanks Martin
  17. It seems to occur in the situation when error -4823 would normally occur - not reading the data quickly enough.
  18. Hello there, Just wondering if anyone has come across this - since upgrading to LV2011 I now have the issue where the dll call within the Sound Input Read (DBL).vi hangs resulting in me having to kill the LV process. The code worked fine in LV2010. Has anybody else experienced this/found a solution? Thanks Martin
  19. Thanks for the tips. I've tried closing everything I can down, I'm now going to try putting LV2011 on a new machine and check if that helps or at least gives more info on the error. Thanks Martin
  20. Out of interest, If I don't shutdown my computer before starting the build then I get the error below... (I have a decent i5 processor and 4GB RAM)
  21. I should say, I've just tried again and it worked okay. Each time I try I first restart the computer, have only LabVIEW open and do not touch the machine during a build. In the last 4 times I have tried it has worked once. Thanks, Martin
  22. Hello there, I am tearing my hair out with the application builder at the moment.... I am building a large app and I have come across memory errors where the build fails. I realise this can be because of the limitations of a 32-bit OS and contiguous memory space etc. I have enabled the Physical Address Extension option in Windows. I now have the annoying situation where my build completes apparently successfully, it takes half an hour or so, bun then when I try and run the exe I get the error message below. Has anybody else seen this and does anybody know a solution please, or would moving to a 64 bit OS be the only solution. I have read up on the forum about the different options to reduce the exe size and therefore the amount of memory to build it but to be honest none of them seem to be that great. Thank you, Martin
  23. Thank you both for the advice, it was just the one file and I ended up redoing the changes from the old version. I haven't used the "separate compiled code from source" option yet although I will take a look at it. Thank you, Martin
  24. Hello there, I'm running LV2010 SP1 and I have a file which seems to have become corrupted - whenever I try and open the file LabVIEW just shuts down with no warning or message, it just disappears. My backup/svn file is a couple of days out of date so I was just wondering if there are any known ways of trying to repair a file before I have to start redoing my work. Thanks, Martin
  25. Crikey, thanks very much Yair for the post, I hadn't realised that a new reference was called each time (I now see it is written in the help, I just hadn't read it). I am busy implementing your proposed method at the moment... Thank you, Martin
×
×
  • Create New...

Important Information

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