Jump to content


  • Posts

  • Joined

  • Days Won


ShaunR last won the day on October 26

ShaunR had the most liked content!

Profile Information

  • Gender

LabVIEW Information

  • Version
    LabVIEW 2009
  • Since

Recent Profile Visitors

23,626 profile views

ShaunR's Achievements

  1. StrLen doesn't allocate anything. It just scans the string until it reaches \00 and returns the length minus the \00 char. It does the same as your match pattern above if you were to look at the Offset Past Match (-1). With StrLen + Moveblock, you are finding how many bytes you need to allocate to hold a *copy*, then copying from s[0] to another location (the initialise array in the VI I posted). The memory of the source string you are copying must already exist, somehow, otherwise bad things happen.
  2. Ditto what Rolf said about corruption. Here's the PtrToStr VI with Rolfs suggestions. PtrToStr.vi
  3. I think I may know what's going on here. char *s; /* If a string user is responsible for * allocating memory. */ The "v" in your cluster is actually a pointer to char so v in your cluster should be an array of bytes which *you* will initialise with n bytes. i.e. You have to create the pointer. The function obviously copies data into your string (byte array) which is why you have responsibility for allocating the memory, rather than the function allocating the memory and you copying the data into LabVIEW. So you are going to either something like this: or this What are you doing? The second one?
  4. Yeah. Didn't think I'd get a definitive answer since size_t is only guaranteed to be greater than 15 bits. For MS it is UINT_MAX, which could be anything. The only way to know for certain is to test the compiled environment but even then it depends on things like if functions use 32 modular arithmetic. I don't think it can be resolved conclusively in LabVIEW but the choice is only unsigned pointer sized integer or a conditional case for target bitness. I guess you are alluding to the conditional for "most likely not to fall over in most circumstances" That's what they said about disk drives and look what happened
  5. Is that regardless of Application bitness? Should this be a unsigned pointer sized integer or is a more complex solution required to ascertain the OS (target) bitness?
  6. If you are tryin g to dereference a string pointer then try this. PtrToStr.vi
  7. From your project image you seem to have many conflicts. It's likely that you are picking up another version or VI's in a different location in your project. You need to resolve the conflicts before any troubleshooting can occur.
  8. There's a UI User group over on the Dark Side. If you hunt through it there are a few UI's like Star Trek, Media Interfaces and iPhone simulations.
  9. It seems the biggest problem you have is the axis grid colours. Try a dark grey! Splitters can't be placed on native tab controls-just one of the reasons we don't tend to use them. The other main reason is they make a mess of your main VI trying to control them. The tab xControl above uses VI panels (the tab panel is a subPanel which loads a VI when you click a tab) so you can use splitters on the pages and also means each page is self contained and doesn't pollute the main VI's event structure. It's things like you are highlighting which are the limitations of the LabVIEW UI. It's fairly easy to have nice graphics that make your Application look nice but as soon as you try to use it, the aesthetics generally falls to pieces. A lot of the time it's like in Windows 10 when you suddenly get a Windows XP dialogue when you've spent ages creating a theme... but worse. Really worry when your manager insists on all file dialogues being the same as the Windows 10 ones
  10. Splitters are your friend. This is one app that I've had for a while. Splitters are used to segregate the different sections and most controls are just default ones. There are no issues with maximising etc. The hard part is the button bars and Tab Bar which are actually xControls. (this is the example for the buttons bars xContol) (This is the example for the tab xContol) The most annoying for me is the things you said you don't care about. lol.
  11. "The software you are refactoring had one and it is too costly to change the training materials". How's that? It is likely that a great deal of pressure had to be applied to even allow a rewrite and the manager probably had a hard time arguing for a budget to do it. Getting hot under the collar over a button isn't a hill I would die on. I would concentrate of making my life easier supporting it going forward than what it looked like-which was decided a long time ago.
  12. The glib answer is that LabVIEW is a tool for engineers who generally prefer function over form. The actual reason is that the LabVIEW UI is limited, difficult and clunky to modify from the defaults. Just pop up a menu for example (no icons, can't change the background etc). The ability to create our own controls is also fraught with issues and extremely time consuming. The the only real option is XControls - which are a bit hit-and-miss. Give on-the-fly theme changing a go and you will quickly run into trouble with many controls. Making a pretty UI can double or triple the project time in some cases. There is also the subjective nature of "good looking". I hate the flat, monochrome icons that are all the rage, for example. What I may think is "cool", you may think is ugly.
  13. I vaguely remember some beautiful UI's. It might have been a coding challenge since there were quite a few - can't really remember now. I just remember thinking "wow, I'd never have the patience for that, but that is awesome". Mine tend to be very utilitarian with the occasional lip-service to aesethics.
  • Create New...

Important Information

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