-
Posts
3,903 -
Joined
-
Last visited
-
Days Won
269
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Rolf Kalbermatter
-
How to contribute to OpenG Package
Rolf Kalbermatter replied to eisenwr's topic in OpenG General Discussions
For the distribution and archiving of the source code I rely on sourceforge. No need to provide my own download page for that (just yet). Admittingly, sourceforge is heading into a direction that may at some point pose a problem for this. If and when that happens I will bother with it at that time and not let it deprive me of my sleep at this point already. In the worst case I have to move it to Github or some other place and exchange the ease of SVN with the pericles of GIT. I might also loose the SVN history in that process, if sourceforge just gets taken out of the air by übercommercial Geeknet Inc without a chance to properly export everything first. -
How to contribute to OpenG Package
Rolf Kalbermatter replied to eisenwr's topic in OpenG General Discussions
Basically, I have yet to see anyone bother with the C source at all. Until that happens I see no reason to change anything on the license. There is absolutely nothing evil about LGPL when the resulting binary is anyhow dynamically linked, as is the case with all shared libraries. It doesn't contanimate your LabVIEW application in any way with anything GPL related. -
How to contribute to OpenG Package
Rolf Kalbermatter replied to eisenwr's topic in OpenG General Discussions
Testing and more testing. The code as it is does sort of work for the things I tried, although I do have an occasional hang where the initial connection seems to not go through, but trying a second time then always seems to work. The pipe idea in Windows is a powerful feature but at the same time also something that I feel they didn't entirely go through with. It definitely is a niche feature that gets seldom used by real code, unlike under Unix (Linux) systems where pipes are more or less the infrastructure many applications use for all kind of interprocess communication. And when you look at the C code of the DLL you will notice that the code to do standard IO redirection looks pretty complicated in the Windows case. It certainly has a flair of an additional API that got tacked onto the existing Windows process model in order to provide Unix like features. I'll go and create in the next few days a thread here and attach the latest version of an OpenG package for lvpipe here. If I get some good feedback about it with more than just "it works" or "it doesn't work" and preferably some easy to reproduce (it shouldn't involve installing other software) unit tests, I might be tempted to actually create a real package and add it to the sourceforge download repository so it is then available from within VIPM. -
How to contribute to OpenG Package
Rolf Kalbermatter replied to eisenwr's topic in OpenG General Discussions
What LogMan already said. Most people who were active in OpenG have moved on, either into other non-LabVIEW related work, or more into management where the daily coding has been replaced by other tasks that don't involve as much direct LabVIEW programming anymore. There are still some watching the list and trying to keep up with the things that are OpenG related, but other paid work usually takes precedence before something like OpenG. Also many have families now, so when away from work and at home, they often spend their time other than behind the computer. The canonical code repository for all OpenG related stuff has been and still is on https://sourceforge.net/projects/opengtoolkit/. Look for the SVN repository, the CVS repository is an old version of the Toolkit before sourcforge supported SVN. However while there haven't been any new packages released since 2011, I still am actively working on some of the pet projects that are mine. Mainly the lvzip library and to a lesser extend the lvpipe and labpython library. I also have committed one or two other bug fixes to other libraries in the past, that users have posted here, but didn't go through the trouble to release a new package for them as there were in fact other areas that I would have liked to improve on for those packages, but with absolutely no other feedback in those years, it does also feel a little bit like pulling a dead horse. While I have been a member from the beginning on sourceforge and still am, I do not believe that I have administrative privileges to add other developers to it. And I don't think it is very common to just add random people to open source projects without a little track report of commitment and code style by them. So the best approach would be in my opinion to try to post some improvements here in this subforum. If they look reasonable, I'm willing to commit them to the repository with proper credit. After a few such patches I think we could convince the project admins to add that person with commit access to the repository. Adding new code to the repository is however only half of the work. You also then have to create a new OpenG or VIPM package of the library and then get the people from JKI to update the list of available packages on their servers, so that VIPM can show them properly for all users. Of course, nobody can prevent you to simply fork the repository and start your own as long as you honor the existing licenses. Notice that most of the LabVIEW related code is BSD style licensed, while the C source code for the binary shared libraries that I have developed in the past is all under the LGPL license. Changing that license to any other license for any of the code without full approval by all of the previous authors is basically not an option. I would however find the forking of the repository the absolutely last measure. It would most likely rest in an obscure place, with no way to add its released packages to the VIPM list, so most users would never be aware that it exists and be able to install it on their systems. -
Optimizing a serial instrument driver for memory leaks
Rolf Kalbermatter replied to Stobber's topic in Real-Time
Unflatten from String happens to consume as many bytes from the stream as make up complete outgoing data elements. It even creates error 74 if the string happens to be to small to create an array with at least one element. It all depends on the orginal endianess of the data stream. If it comes from a big endian device then swapped is the same as little endian. It's the classical problem of definining what is swapped in respect to the source (device) or the target (LabVIEW), which is always debatable. Your new code has one big problem, it doesn't swap the 16 bit entities anymore, and in both versions another problem. Double floats are 64 bit values and depending on the target they can be swapped in the 32 bit entities too but LabVIEW doesn't have a Swap 32 bit element. There are two Big Endian standards for 64 bit integers, one where only the bytes per 32 bit part are swapped and one where the 32 bit elements are swapped too. Depending which of the two the device is using, Unflatten from String may not be the correct one, but it should be consistent to the full reversal as used in the original code. (your first version doesn't swap the 32 bit values, and your second one doesn't even swap the 16 bit elements). -
Optimizing a serial instrument driver for memory leaks
Rolf Kalbermatter replied to Stobber's topic in Real-Time
-
And that is neither guaranteed to work! Depending on gateways and other limitations on the everchanging interweb of IP, an IP packet exceeding the minimum MTU of 576 for IPv4 may be dropped for any reason that any router device on the way may feel like, including scarce internal memory or CPU resources, or just a temporary mood of the day. And a single dropped or corrupted IP fragment in a complete UDP packet will cause the entire UDP packet to be refused (dropped) by the receiving UDP endpoint. Since the IP packet also needs to contain the IP and UDP header, the actual "safe" minimum maximum UDP packet size is really more like 508 bytes (accounting for extra IP options in the header). The maximum size of an UDP packet of 64kB is a Windows feature. Other socket implementations can use lower limits. The 64kB is also the theoretical maximum limit, since UDP only uses a 16 bit length indicator in its header, so it can't really transmit more than 64kB in a single packet. And UDP itself does not provide for a mechanisme to fragment and reassemble bigger packets. So I'm pretty sure all the socket implementations out there, simply cap any attempt of a user application to transmit more than those 64kB. You could argue that LabVIEW as high level programming environment should produce an error if you try to send more, but that is a pretty fuzzy idea. Nothing in the UDP implementation guarantees the transmission of any packet size across the network, so why bother to create an error? Also, if the entire route from sender to receiver is guaranteed to be IPv6, all the above changes considerably. The MTU changes to about 2000 bytes and by using IPv6 jumbograms, UDP can transmit larger packets than 64B. So above limitation doesn't apply but since the LabVIEW network nodes currently only support IPv4 anyways, this is of no concern in terms of LabVIEW programming.
-
Stale VI Server Connections
Rolf Kalbermatter replied to John Lokanis's topic in Remote Control, Monitoring and the Internet
Well that's the problem of using layered software. Standard socket operations are normally synchronous and don't have a timeout parameter themselves. In order to program asynchronously, one has to first set the socket into O_NONBLOCK and then use select() or poll() before attempting to do a read() or write(). And the timeout for most synchronous socket operations is an option that can be changed for each socket through the setsockopt() call. VI Server might use internally asynchronous sockets but it is designed as a synchonous interface to the user. The reason is obviously ease of use, since asynchonous interfaces are usually pretty hard to use and debug. And unfortunately nobody thought ever about adding a possibility to add a timeout property to the VI server refnum class. But that's understandable since the VI server refnum is not generally a network connection, it just can be routed over a TCP or ActiveX connection, but just as much be a LabVIEW process internal protocol layer. A timeout property would only be meaningful to the TCP protocol layer but wouldn't apply to the other two classes. It's the classical problem of abstraction where you can't and don't want to expose all the lower level details to the higher level interfaces, especially when they are not universal for all the lower level implementations. -
Connecting two OPC UA servers through Labview?
Rolf Kalbermatter replied to pato7's topic in LabVIEW General
Not sure about OPC UA details but generally server to server doesn't make much sense and simply makes setup of the system more complex. Possibly OPC UA allows for some hybrid configuration where a server can be configured to relay data from another server as some sort of gateway between differently secured network segments, but other than that I see no real benefit in complicating the server configuration by adding the possibility to let a server relay data from another server. -
The issue is a little more complicated actually since NI Linux RT isn't a single platform but really two (x64 and ARM). There is no easy solution to provide a virtualized environment for testing on the ARM platform (but with the myRIO you do have a fairly accessible platform for testing). So far we have these variations of platforms for LabVIEW RT: x86 Pharlap ETS PPC vxWorks 6.1 (LV 8.2.1) and vxWorks 6.3 (>= LV 8.5) ARM NI-Linux RT x64 NI-Linux RT For all but the Pharlap ETS system virtual machines for testing are only theoretically feasable for the NI-Linux RT for x64 platform. All the others already fail because of a very different CPU architecture and adding Bochs or something similar to the virtualization effort is definitely creating an even bigger problem. Still remains the issue that without an NI sanctioned way of creating an NI-Linux RT (x64) image, it's not only legally but also technically pretty impossible to create a fully functional LabVIEW RT target for virtual machine execution. There are simply to many runtime libraries that need to be copied to the right locations, that are not part of NI Linux RT itself but additional components with specific NI license restrictions. There are also possibilities for some of the x86/x64 systems to run Windows Embedded but for testing purposes of libraries they are really the same as a standard Windows systems if you don't access very obscure features.
-
I can't speak for others, but for me the NI Linux RT virtualized hardware system would be mostly for testing and debugging LabVIEW software on one of the x86 based cRIO targets without having to always be connected to the actual hardware target. Yes it doesn't allow for full hardware access such as DAQmx, RIO etc. but it would allow some easy testing of the general RT application and in my case especially shared libraries on these platforms.
-
It's not that easy. You do not pay for a runtime license of the Linux kernel. That is open source and NI provides all the sources to recreate it, if you wish. But NI Linux RT while a full OS is simply that! No LabVIEW runtime, NI-VISA runtime, NI-488.2 runtime, NI-DAQmx runtime, NI-RIO, NI-this and NI-that. And for these things, and especially the LabVIEW runtime, NI is free to define whatever license conditions they like and they decided that running these on non-NI hardware generally will require a paid license from them. You are free to build your own NI Linux RT OS for whatever hardware you like, but you are not free to put any of the NI software even in runtime form on it without a license from NI. And no, just because you can redistribute a LabVIEW executable including the LabVIEW runtime on a desktop system without additional runtime licenses does not mean that you have the right to grab a LabVIEW runtime from an NI Linux embedded target and copy it to your own hardware , even if it would be technically possible, which for most targets is not easily possible even if they use the same CPU architecture. NI Pharlap isn't that different really. They probably have a royality free source code license from Pharlap for this (which would cost A LOT of money, which of course has to be incurred somehow and probably comes with a similar expensive yearly maintenance contract for them). The license cost for the NI Pharlap system on your own hardware is for the most part the same as for the NI Linux software. It's for the LabVIEW runtime and all the other necessary software drivers, not so much for the Pharlap OS. NI makes quite a bit of money with their realtime platforms and they want to protect that somehow. And being the copyright owner of all the NI developed software drivers and LabVIEW, they have every right to do so in pretty much every way they find ok. That you and me would rather have it different isn't really a valid argument against that.
-
I haven't really looked into this and I'm not aware of such a specific guide. My guess is you have to setup a linux cross compile setup on your PC, then download the NI Linux RT source code and go through the configuration settings of the linux compilation, selecting everything that would make sense for your (virtual) target hardware. That gives you in the end a hopefully working Linux RT kernel that is compatible to NI Linux RT. Now, NI Linux RT is of course a nice thing but completely useless as a target for LabVIEW RT without also the LabVIEW runtime engine, NI-VISA, NI-DAQmx, NI-half a hundred other software libraries and drivers. And here you start to bite in the dust. You can't just recreate them for your target system and you are not allowed to copy them over from another LabVIEW RT system without expressed consent from NI and in the case of the LabVIEW runtime engine an actual license payment too!
-
Presentation About Forums :: Looking for feedback
Rolf Kalbermatter replied to Norm Kirchner's topic in LAVA Lounge
In my experience almost all forum searches suck badly in comparison to the standard set by Google. So I would say: Disable it!! -
NI's stance on such things (and basically any company in the US and most other places) is: We do not comment on internal developments, plans for development or lack thereof or whatever, unless we are at a stage with it that it is ready for prime time. It may sound dissatisfactory for us mere users, but reality is that there are simply to many legal and other implications in our modern system, that speaking before the fact can have far reaching consequences. Basically every employee knows that commenting on unreleased products or technologies without approval from higher management might be the signature under a resigning letter that has no possibility for reappeal. So you can hope for a reaction from someone from NI about this, but unless they have it ready to be announced at coming NI week you can keep waiting until the hell freezes over. Even then it is not likely that they will react here.
-
Presentation About Forums :: Looking for feedback
Rolf Kalbermatter replied to Norm Kirchner's topic in LAVA Lounge
I think he was refering to using Google. Wouldn't know what the extra keyword "site:lavag.org" would otherwise help in the search on this site. If you want to limit your google search to that extend is of course another question but generally you can always extend it later if you find you get to few hits. -
Write table to Excel using .NET
Rolf Kalbermatter replied to styrum's topic in Calling External Code
While ActiveX is already a legacy technology according to MS, they won't just chop it off like that from any of their products without a really strong reason. Depreciation will happen eventually, first by prominent remarks in the documentation, then by removing the documentation slowly from all Microsoft servers but removing it from the applications itself? No way! Windows still supports many technologies from its 16 bit protected mode times, such as DDE, just to name one and while MS says: Don't use it! it's still part of the shell interface to all normal Windows applications. -
I don't think you need to write the data twice each time. You need to shift the data once whenever you wrap around the end of the buffer on write, but that is all. The one drawback I see with this is that it could make the write operation pretty erratic in execution time and therefore unsuited to be called directly in a time critical or realtime loop.
-
The address is whatever IP address the computer has on which the IDE runs, or localhost if it is on the same computer. The port number is configurable in the LabVIEW Options, and you need to enable the TCP/IP interface to VI Server in there too, in order for it to work (but if you ever have used VIPM to install some software package into LabVIEW, that is probably already enabled).
-
Have you checked out the BLT Toolkit? It's already done and readily avialable on the LabVIEW Tools Network.
-
Well I misunderstood you there then! But for Linux you have inotify() or the older dnotify() to do something similar than with FindFirstChangeNotification() under Windows. inotify() is present since around kernel 2.6.13 and glibc 2.4 and working from glibc 2.5, so nowadays there should be no reason to have to use the inferior dnotify() functionality.
-
See here: http://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg53058.html It comes from the fact that SQLLite is a file based database, not a server based one. The SQL Lite shared library is the entire SQL Lite database engine, but as DLL it gets loaded into each process seperately and does not share any state from another SQL Lite shared library engine in another process. It does use file range locking (when enabled in the build) in order to maintain some kind of consistency even if two processes happen to modify the data concurrently. And it apparently does at least under Windows (when enabled in the build) use file notifications to get informed about changes from other processes but in order to detect what has changed it then has to read in all the data again and update its internal management information so I'm not sure why it would work under Windows like Shaun claims. Basically the fact that SQL Lite is a file based database more or less makes what you want pretty impossible. The solution most people have come up with is to add an extra table which stores records about changes to tables and then query that regularly, possible with a file change notification callback mechanisme to avoid to much polling.
-
Either way to make this useful you would want to have this translated into a user event and that will require the creation of an external shared library which can install that callback which then is translated into a user event through the LabVIEW PostLVUserEvent() C manager API function. As the current interface goes to great lengths to avoid having to create an intermediate shared library this is not a trivial addition to the library but a very significant change, especially since every supported platform will require the creation of its own shared library (Windows 32 and 64 bit, Linux 32 and 64 bit, and MacOSX 32 and 64 bit makes already 6 different shared libraries not to mention the extra at least 4 cRIO flavours). And I might be misreading the documentation for that function but it does not call the callback for a specific table but for any row update, insert or delete in any rowid table for the current database connection. But not for tables without rowid.