Jump to content

Neil Pate

Members
  • Posts

    1,179
  • Joined

  • Last visited

  • Days Won

    109

Everything posted by Neil Pate

  1. Hi, sorry I just saw your post now. There is no tutorial I know that mixes LabVIEW and SDL. I basically used lazy foos SDL tutorial (http://lazyfoo.net/SDL_tutorials/) which are done in C, and just ported the logic to LabVIEW, wrapping the SDL DLL as needed.
  2. Hi, Strange behaviour I am seeing in LV2015 32-bit (Win10). For some reason I cannot create a DAQmx task in a Virtual Folder in the project, only directly under My Computer. I am pretty sure I used to be able to do this. Any ideas what is going on here?
  3. Smashing! That method does work, but it looks like the FP containing the control should not be open when this occurs, so it does not seem to be like clicking "Apply". Dunno, maybe I am still doing something wrong. Anyway, although this is a bit of a pain I think I can make this work now. Thanks Shaun
  4. It is a strict typedef. Something like this? Does not seem to work for me. I can get it to work if I open the typedef, change it from strict to plain, apply changes, change back to strict and re-apply changes. Then everything is in sync.
  5. Hi, I have created some code to programatically replace the pictures in a boolean. I am applying my logic to a strict typedef and it works nicely. However my changes to this typedef do not seem to be propagated properly to a VI that uses the control. In my solution the front panel of the VI with the control is open, and I have a reference to the control I wish to modify. From there I get the typedef control, and then update it using the LabVIEW resource functions. After that I update call the Update Typedef method. In the project I sometimes get a message that the file has changed if I then try and open the .ctl, and if I allow that the new skinning is indeed working, however in the original FP the control still contains the existing pictures. In the typedef I cannot apply changes as this menu operation is disabled. I have tried mass compiling and it to does not seem to pick up the new changes. Any ideas what I am doing wrong?
  6. I definitely do not recommend the way I demonstrated. It is a terrible developer experience and I only prototyped it to see if my hunch was correct... Your method sounds much better
  7. I don't think it is possible to just change the source. However, as the .lvws is just an zip I was able to create a quick and dirty application (source and build attached) that can be run after any changes have been made to the source files and re-create the .lvws file. I ended up not using the LV web service to host the web pages, so did not use this application it in the end, but I believe it works but don't blame me if your PC bursts into flames. Web Service Resource Combiner.zip
  8. Hi Rolf, Any update on this? I have a project coming up which requires a scripted test sequence, and was thinking this could be a good opportunity to try this. Do you have a idea on pricing? Neil
  9. I remember seeing something around about 2010 about this. If memory serves me correctly forum member jgcode did some digging into this and had a usable example, but there were some things preventing a complete solution. I also think there is a NI community page dedicated to this, but cannot find it either. Sorry!
  10. Thanks for the info dhakkan and LogMAN. I was able to copy my files to SysWOW64 and LabVIEW-32 bit was able to read them, even though in the code there are hardcoded paths of c:\Windows\System32.
  11. Happy new year everybody Now, onto this year's first conundrum. I am trying to get some customer code running on my PC, and am getting a bit unstuck with some strangeness that I cannot explain. In particular this application reads and writes to files in a directory, lets call it ABCD that lives in c:\Windows\System32\ (As an aside, I am well aware this is not exactly a Windows "best practice" to put stuff in System32, but that is how it has been done in the application (which is quite old now), and that is what I have to live with given that I have inherited ownership of the project) The trouble is, on my Win 10 dev PC LabVIEW cannot even "see" that directory. If I try and open any files in it I get error 7 (File Not Found), and in fact when I browse to the System32 directory from within LabVIEW the ABCD directory is not even visible. Clearly this some Windows permission problem, but I cannot figure out how to work around it. I have messed about with all the permissions of that directory, and according to Windows my user should have full access to that directory. I have even tried starting LabVIEW as an Administrator but still no joy. Strangely, even from within Windows I can create a new text file in that directory but cannot save it. Any ideas what is going on? Edit: perhaps this has something to do with 32-bit/64-bit compatibility? If I open LabVIEW 64-bit I can see the directory if I browse there and the same LabVIEW code then is able to open and read the file contents just fine. I really did not know directories and files could have a "bitness" assigned to them...
  12. And you forgot the sentence termination character. ;-)
  13. Ouch. I suspected that could be the case, but was too lazy to google it as I didn't think anybody would be as pedantic as I was being I will try and make better jokes in 2016...
  14. Rolf, will this run on versions of LabVIEW greater than 2? My Windows 3 PC is quite dusty. <ducks> Jokes aside I am looking forward to seeing this, thanks for the update.
  15. Hi All, I am trying to get a list of files out of a particular build script. I think I am mostly there, but stumbling at the last bit. Attached is my attempt so far. I can get the source tags for the build, but don't know what to convert the variant to. I know it is a reference of some type, but have tried a few things and none of them seem to work. Any tips? Nevermind, figured it out The RefNum is type ProjectItem, converting the variant to this then allows the Path to be read
  16. I think booleans in LabVIEW are stored as bytes, not bits. All bits clear is a false and any other pattern is true. This can lead to some interesting tricks you can play when typecasting in between boolean and characters.
  17. Not sure if this is of any help to anybody. It is a comparison of a blank VI saved in 2015 32/64-bit Test 1 - 32 bit.vi Test 1 - 64 bit.vi
  18. I still don't really get who you are trying to secure yourself against. This seems like a lot of work for very little real reason. I suppose in response to your OP, I am in the don't care category. All my systems that have some kind of network comms are on an intranet, and if somebody else on that network is trying to maliciously ruin my day it really is not my problem. Where I need to expose things to the Internet I would never use raw tcpip. In those circumstances I use Web Services with their built in security features.
  19. Years ago I did some embedded programming with pretty basic micros like the 8051, and they had a hardware stack that you would push to and pop from. Maybe this is where I am getting confused, I do not have any formal CS training so have just cobbled together knowledge over time.
  20. Jack, this may be obvious to you, but you say the data is posted on the stack (and not the heap). Is that because interruptStruct_t interruptStruct; is declated as a local variable in the function and so automatically uses the stack? I thought the stack was physically a different "type" of memory, more like a L2 cache inside the CPU. A bit of googling tells me not that this is not the case. Computers are complicated...
  21. It's discussions like this that make me happy that I do not have to deal with these kinds of situations very often. Luckily for me most of these issues raised probably will not affect my project if I am careful (which I definitely will be!). Really good insight here, I am quite envious of the technical grokking that you fellows have on these quite arcane issues.
  22. Shaun, that is in line with the conclusions I reached from my research, so thanks for also confirming it. The code I am interfacing with is not going to change. However if it t does we will just have to rebuild my DLL. Jack, I have gone through some sample code where the two callbacks are implemented. In the Receive callback the function calls malloc/memcpy on the data it is passed in. My plan for my wrapper is to allocate some memory for LabVIEW to use, once in my Init function. Then I will copy the data structure into that memory and PostLVEvent using my copy.
  23. Thanks Rolf, This project is a one off. One PC, manually installed once, tested on the final hardware etc. So those software bugs would be found very early in the dev lifecycle and once fixed should never present themselves as a problem. Static linking it is
  24. OK experts C experts :-) My goal is to write my wrapper DLL with as least fuss as possible, as my C skills are not great. I have access to the .lib files, it seems to me that life would be easier if I statically linked the additional libraries as then I do not need to mess about with loadlibrary, GetProcAddress etc etc. Is this sensible? Note the code I am going to interface to is quite old, and in all liklihood is not going to change.
  25. Thanks for the info everybody. I am going to start looking into this today, I will keep all your suggestions in mind.
×
×
  • Create New...

Important Information

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