-
Posts
3,903 -
Joined
-
Last visited
-
Days Won
269
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Rolf Kalbermatter
-
NI Stuff takes up too much space on my SSD
Rolf Kalbermatter replied to Neil Pate's topic in Development Environment (IDE)
Yes I installed all my LabVIEW versions into the C: SSD. But then I got a 500GB SSD Mini-PCI card in my notebook besides the 500GB hybrid HD Sorry guys, but couldn't let this pass! -
NI Stuff takes up too much space on my SSD
Rolf Kalbermatter replied to Neil Pate's topic in Development Environment (IDE)
Actually NTFS supported symlink like features since its early inceptions, but there were only a few very obscure Windows APIs that allowed to create them properly. Recent NTFS versions improved on that a bit and Microsoft also added support for them into the shell. For all practical purposes support for symlinks in anything earlier than Windows 7 and 2008 most likely isn't of any interest anyhow since they are all unsupported OSes by now. The remark about supported OSes for a certain functionality is anyhow often misleading in MSDN. For one the documents tend to get outdated (notice the absence of Windows 7 which is more or less simply Vista but in a usable form) while on the other hand Microsoft tends to also update the documentation regularly changing support information to only mention the latest versions, even though that API or functionality really existed already much earlier. Most Windows APIs on MSDN claim to be supported since Windows 7 by now even if they already existed in Windows 95. -
Labview Multilingual text read support
Rolf Kalbermatter replied to Sharon_'s topic in LabVIEW General
How do you read the characters from the Excel file? What Excel file is it? Basically xls files use binary OLE streams for data which stores strings as OLECHAR which is basically UTF16. xlsx files use xml with UTF8 encoding. But your problem is most likely that you use the ActiveX interface to Excel. Here LabVIEWs own smartness likely plays you some tricks since the strings provided by the Excel ActiveX interface are automagically translated into whatever is your current default mbcs codepage that you have configured for your Windows account. While LabVIEW can support Unicode in its string controls with the unsupported ini file setting, it's very much possible that this support does not extend to the ActiveX interface in LabVIEW and ActiveX being designed as idiot proof interface doesn't allow you to change that behavior. -
MoveFileWithProgress problem from kernel32.dll
Rolf Kalbermatter replied to Houmoller's topic in Calling External Code
While that is generally true it is IMHO a pain in the ass with no real advantage other than not requiring you do write a little C code and run it though a C compiler. Of course for someone who has no C knowledge, this option is all that is available to them, save from hiring a C programmer, but it is a bad choice for a lot of reasons. First, you need to know quite a bit about C programming anyhow to be able to make this work reliable. Second, the DLL will for all practical purposes not only run in a separate application instance but many times in a separate process. When you upgrade your LabVIEW code to a new LabVIEW version, the DLL needs to either be recompiled too every time or it will run in a separate LabVIEW runtime process that has to be the same version as in what the DLL was created. So unless you upgrade your DLL too, you will have to remember to install the runtime version for your DLL and the one for your application. Consider an app using more than one such callback functionality and you easily end up having to install several LabVIEW runtime versions after some progressive development of your app. And moving platforms (eg, Windows 32 bit to 64 bit) will most likely have every other user of your callback solution stumped, since the LabVIEW created DLL is somewhat unintuitive for most casual LabVIEW users (and illogical for more advanced programmers). -
"Sort Using Other Array" XNode
Rolf Kalbermatter replied to Sparkette's topic in Code In-Development
While NI goes to pretty extreme lengths to mutate code that has changed between versions when upgrading to a newer version the reverse is not as thorough. It possibly can be considered a bug, but the save for previous has never and won't ever guarantee that code will backsave without broken arrow in the older version. -
Labview Multilingual text read support
Rolf Kalbermatter replied to Sharon_'s topic in LabVIEW General
Basically using the calls to MultyByteToUnicodeString() and UnicodeToMultiByteString() Windows APIs you can do every possible conversion from and between an MBCS encoding known to Windows. These functions accept as one of their parameters the codepage that the MBCS text is in. By default, one passes the CP_ACP constant there, which tells Windows to use the current user codepage, but if you know that your text is in another different codepage you have to pass in the according constant for that parameter to MultyByteToUnicodeString() and end up with UTF16 encoded string in the output. -
Never having tried to look at the Project Provider Framework at all I can't really say for sure, but I would assume that in order to verify that a PPF is valid this check is done on every load, so is in the provided PPF base framework. With flarn having admitted to have broken password protection before it seems not so hard to guess how it all went. And yes, PPFs have the potential to wreck a LabVIEW installation completely and even worse modify code on the fly in a way that is very hard to detect. So this "signing" business is most likely much less about NI not wanting developers to be able to add plugins, but rather safeguarding those customers who have VERY stringent requirements about approved software running on their systems. They are out there and they have rules that even forbid to install OpenG VIs since they are not from an officially approved source.
-
The link gives an error and the main site is found suspicious by McAfee.
-
Can I download a "config file" from Git at run-time?
Rolf Kalbermatter replied to nitulandia's topic in Source Code Control
The easiest is most likely to use the command line tool of whatever GIT client you install. I do the same for SubVersion calling svn.exe with svn status --show-updates --verbose Parsing the return string is some work but easily doable in a generic manner that will work well. I'm absolutely sure that GIT works the same and this will give you a very flexible and easy to do interface without any need to go .Net, etc. Most of the tools you would otherwise integrate take the command line approach too in the end. -
VI Server is meant to work between LabVIEW versions and platforms transparently. There shouldn't really be anything that could break. Well there used to be properties such as for platform window handles that used to be 32 bit only until LV 2009. They are now depreciated but still are accessible and if you happen to use them you could run into difficulties when moving to 64 bit platforms and trying to access them, remotely or locally.
-
Some of these objects have existed in LabVIEW for a long time and never done much more than crashing it! I assume they are cruft left over from some experiments that either were abandoned at some point or the guy who sneaked them in had suddenly left and nobody ever noticed it. The whole LabVIEW code base is huge and no single person on this world has a complete overview of everything that is inside it.
-
No, private nodes are yellow LabVIEW nodes that are not available in the standard palette (but can be generated with your "Generate VI Object method"). The idea is that your external shared library somehow creates an object reference somehow (usually a pointer to whatever your shared library finds suitable to manage your object) and then this object reference needs to be assigned to the user tag reference. This can be either done on the LabVIEW diagram with such a node after the call to the shared library function to create the object reference or inside the shared library itself by calling undocumented LabVIEW manager functions. Consequently there are matching LabVIEW diagram nodes or manager API calls to deregister an object reference from a user tag. But again unless you intend to start writing shared libraries (C/C++ programming) to allow access to some sort of device, or other functionality, this really isn't interesting at all to you.
-
It's a generic user tag refnum. The functionality behind it is relying on information found in the resource/objmgr directory inside LabVIEW. Basically the rc files in there can define an object hierarchy and for each object type you can define methods, properties and events that map to specific exported functions from a shared library. Once the generic tag refnum has been selected to represent a specific object type from one of the object hierarchies it is not generic anymore and you can not select other object types anymore from other object hierarchies. Also flags in the object type inside the rc allow to specify if the user is allowed to even select any other object type within the object hierarchy. It's all pretty involved and complicated (a single error in the rc file usually makes it completely useless and you can go and start guessing were the error is. To interface in a shared library to a LabVIEW VI user tag refnum you also either need to use some private diagram nodes to register the session handle returned from your shared library to a user tag refnum and also one to deallocate it, or use internal LabVIEW manager functions to do that. But unless you write drivers for some kind of interface in external shared libraries, the user tag refnum has no practical meaning for you at all. And it requires your shared library to be explicitly written to work with LabVIEW, it's not a means to interface LabVIEW to standard shared libraries at all.
-
If it seems limited to your PC then the most likely suspect would seem the network card and according driver in that PC. Wouldn't be the first time that network card drivers do buggy things. Maybe it has to do with jumbo frame handling. Try to see if you can disable that in the driver configuration. As far as I know cRIO doesn't support jumbo frames at all, so there shouldn't be any jumbo frames transmitted, but it could be that an enabled jumbo frame handling in the driver does try to be too smart and reassemble multiple TCP packets into such frames to pass to the Windows socket interface.
-
It's pretty common to have the male connector on the base board and the female part on the daughter board. I definitely have seen mostly this setup (and yes I talk about professional products here) if they didn't use some other special connectors altogether. One of the reasons probably is that the male connectors cost less and have to be always soldered on the board, while the daughter board is only sometimes necessary. They are not alone, look at the Raspberry Pi for instance which uses a male connector too. Both solutions have their advantages and disadvantages. As far as connecting cables, if you don't use flatband ribbon cables with IDC connectors, the male connectors require more expensive test lead cable connectors but unlike when pushing normal wires into female connectors, they won't damage the contact spring in the female connector. EDIT: And another reason is that the according male IDC connectors for flatband ribbon cables used to be not only exessively expensive but also often very hard to find.
-
I took a short look at your solution. While I can't determine if you have included all requirement tags (something you should definitely attempt to do as much as possible) the overall architecture looks certainly good enough. There is always something to say about a cleaner and more structured architecture but considering the time constrains of the CLA exam, you have to compromise and faster is certainly better than neat and clean in this particular case, although without some architecture you would fail too. Did you do all this in 4 hours?? If so, I think you are set for the CLA exam. If you needed significantly more time than 4 hours you may want to exercise some of the subsystem template implementations a little more to get them in as short a time as possible. As a pointer you may decide to actually do even less coding (not much more than the actual case and loop structures) and put a bit more prosa text in there instead. It may not seem to make a big difference but it's usually faster to write a short text than finding the correct node in the palettes and placing it on the diagram and wiring it up, often having to write some kind of comment anyhow too. And if you are familiar with Quick Drop set aside two minutes at the start of the exam to configure it to your likes. Also take the time to recreate your personal configuration as much as possible on a new LabVIEW install, exercise where the settings are beforehand so you don't loose time when configuring your machine on which you do the exam. An unfamiliar palette view, or auto-wiring or auto-tool setting can be a major pain in the ass when you are scrambling for time to get your CLA done, although it may seem only fractions of seconds you will loose each time.
-
Definit Definitely! They have been there since a long time. One of the possible reasons for the threaded "Insane VI" error messages in earlier LabVIEW versions. Your disk just isn't as reliable as you would like it and LabVIEW using a binary format for older files is very sensitive to even the slightest error there.
-
If you are going to write a wrapper anyhow I would forget about the stupid cluster and make it something like: void LV_some_func(char* data, int length, long start)  declare the struct in your code and copy the elements into it then call the API function.  void LV_some_other_func(char* data, int *length, long *start)  Here get the struct with the API function and then copy the contents into the parameters. Make sure to pass in "length" the actually allocated buffer length in the caller (your LabVIEW diagram), and to not copy more than that into the buffer. Then update "length" and "start" and return to LabVIEW. Something along these lines± void LV_write_block(const char* data, int length, long start) { datablock block; block.no_of_bytes = length > 10240 ? 10240 : length; block.start = start; memcpy(block.data, data, block.no_of_bytes); write_block(block); } void LV_read_block(char* data, int *length, long *start) { datablock *block = read_block(); *length = *length > block->no_of_bytes ? block->no_of_bytes : length; *start = block->start; memcpy(data, block->data, *length); deallocate_block(block); // This depends how the block is allocated. // If it is a static memory then this would be not possible. } But as pointed out before, the struct containing fixed size arrays being passed by value is likely a problem when not using the same compiler for your wrapper DLL then what was used for your library DLL you want to interface. And just for your information, long is only a 32 bit integer in Windows, even when using 64 Bit Windows and LabVIEW. long is only 64 Bits in 64 Bit Linux (and similar unix environments)!!!
-
This prototype seems very awkward. Passing a cluster by value means usually that all the elements in the cluster are normally passed as individual parameters over the stack. BUT there are several issues with that! First the fixed size string obviously can't be passed over the stack as individual bytes as that would blow your stack immediately. So it's likely that the C compiler would pass it as C string pointer anyhow, but likely means it is just an assumption from my side, I don't really know, and likely different compilers might think different about how to do that, so you are dealing with an API that is most likely not even compiler independent in this way. But the more interesting thing is that the function seems to return a pointer to that structure. However since the structure was never passed into the function as such, the C compiler would have to allocate it somehow. And now you have another problem to know how it does it. Is it a static memory area that is reused with every function call, causing nasty multithreading issues, or is it mallocing the buffer relying on the caller to properly deallocate it after each call?? And if it is using malloc, which one does it use??? Basically this function signature causes so many questions, und ambiguous answers that most likely will depend on the used C compiler too, that it is simply a stupid idea to even do in C, lets not talk about trying to call it from anything else. The only way to answer these questions properly is to dissassemble the DLL and check these things out specifically in the assembly code and then hoping that the DLL developer won't release a new DLL version that is compiled with a different C compiler version. If you don't find this worrying enough, I'm not sure there is anything that would worry you in this world! Well I now see that it is your DLL!!!!! Forget it and change that signature immediately!!! 1) Pass this structure as a pointer parameter, then Adapt to Type will generate the correct parameter passing. 2) Do NOT use malloc in a function to return memory buffers to the caller UNLESS you also provide according exported functions to the caller to deallocate those buffers. The malloc/free used by your DLL is only guaranteed to be the same malloc/free used by the caller, if both are compiled with exactly the same C compiler and the same linker settings and those linker settings don't include the static C runtime library into you DLL. Something you generally NEVER can assume when using DLLs, and in your case anyhow not true, since your DLL is generated using gcc while LabVIEW is compiled using Visual C. And various LabVIEW versions are compiled using different Visual C versions, with each having a different C runtime library. But don't believe gcc is better in that respect!
-
Man you must have a lot of idle time. As far as documentation goes for the binary VI format, all I know is that it basically follows the Macintosh resource format from the good old Mac OS Classic times. That knowledge allows to identify and access the various resources in a VI but of course is just the container format not the understanding of the individual formats of each resource type. While some of them used to be fairly similar to classic Mac OS formats, others and that is the majority of the VI resources, are very LabVIEW specific and the LabVIEW developers more or less threw together whatever they felt was necessary into a C structure and then flatten that to the resource stream. Without access to the LabVIEW C++ source code it is basically impossible to decode these resources in a meaningful way and even more difficult to modify them and write them back into the binary VI structure. VI Explorer really doesn't seem possible to do without access to the actual LabVIEW source code, which would have to be gained either illegally or caused by a preachment of at least some non-disclosure agreement. Also many of the bigger resources are currently ZLIB compressed which adds an extra complication layer into this all. Personally I think your best (and almost only) bet to get at these informations is to apply as LabVIEW developer within NI, but expect them to require you do sign some NDAs before you start, and they will do a good screening and some of your posts in the past may be a bit of an obstacle for that.
-
Well the next step in debugging this, would be to enable another mode on the read side and see what data actually arrives. Then comparing that data with what you think you sent on the cRIO side.
-
I can't be the first one to have tried this. XD
Rolf Kalbermatter replied to Sparkette's topic in LabVIEW General
With your arguing about this being a failure of LabVIEW, all guns would come with a protection that they can't fire at all, so nobody can get harmed. -
You use buffered mode, This mode only returns: 1) once timeout has expired, without retrieving any data 2) whenever all the requested bytes have arrived Seems your communication somehow looses somewhere bytes. With buffered mode you return with a timeout and the data stays there, and then gets read and interpreted as anothere length code sending you even more into the offside.
-
I can't be the first one to have tried this. XD
Rolf Kalbermatter replied to Sparkette's topic in LabVIEW General
Same as JKSH. Just because I can make a super-mega-prontosaurus cluster (and have seen some people do that) it would never ever come into my mind to do that myself. Same about C++ object hierarchies that are cascaded over umtien levels! Your example simply points out that LabVIEWs datatype handling is not only highly recursive, but also able to handle that. As far as practical usage for such a beast, it ranges even lower than my super-mega-prontosaurus cluster mentioned earlier.