Jump to content

Rolf Kalbermatter

Members
  • Posts

    3,837
  • Joined

  • Last visited

  • Days Won

    259

Everything posted by Rolf Kalbermatter

  1. I only usully install LabVIEW about every 3 years when the old labtop starts to show signs of going soon death. But then I usually do it for at least about 5 or more LabVIEW versions. HAve recently resolved to put rather old versions on a seperate VM as they tend to get tricky to run on the newest OSes and also newer LabVIEW installs tend to trample more and more on older installations.
  2. I thought it was not relevant when trying out things as I did various trials to get this working (The Control Editor has "particular" behaviour and controls easily can get in a weird state where for instance some of the parts end up in places where they seem not selecatable anymore in the customize mode, they still are but the position where you need to click to select them doesn't match the position on the front panel where they really appear.) 2) Right click on it and select Advanced->Customize (or double click) => The path control opens in the control editor 2.5) Change to Customize mode (click on the Allen key which then changes to a pincer) 3) Right click on the browse button and select Advanced->Customize Double click on the Browse button => The browse boolean control opens in the control editor For step 2) double click and step 3) you might need to have the option enabled to open the custom control editor on double click, which is one of the first things I always enable when installing a new LabVIEW version, right after disabling auto tool and auto wire routing 🀒.
  3. Why would you need an Open Sourced LabVIEW for something like that? This was possible in the Control editor since LabVIEW 3!!! (Discloser: the Browse button in the Path control was not added before somewhere around version 6 to 8 but the principle worked in LabVIEW 3). 1) Place a path control on your front panel 2) Right click on it and select Advanced->Customize => The path control opens in the control editor 3) Right click on the browse button and select Advanced->Customize => The browse boolean control opens in the control editor 4) Save this as your Browse Boolean.ctl file or whatever you want to call it. 5) Use as you wish and enjoy that it automatically adapts to the platform style for the system you run it on Browse.ctl
  4. You realize that the Enque Element in the Run VI part is not guaranteed to be executed before you close the VI reference itself? In the CBR case you guarantee to call it before you attempt to close that VI reference.
  5. The root loop is definitely per process. It’s simply the primary thread started up by Windows for a process in which the GetMessage(), TranslateMessage(), DispatchMessage() Windows API calls are made over and over again, with minor LabVIEW specific adaptions. This thread is associated with a hidden window whose window procedure then translates everything into a Platform independant message infrastructure that very much resembles the Mac classic message loop. This is basically the famous root loop with the message procedure in the hidden window being a sort of platform wrapper around it. Under Windows there comes in a potential extra complication as the OLE marshalling hooks into the process GetMessage() API, completely outside the control of LabVIEW. So if you interface with OLE/COM/ActiveX and to some extend even .Net compenents things can get interesting,
  6. Yes that is inside the unzip.c code from the minizip program, so there should be no need to do that again in the caller. Will check how this code executes, as there are conditionals for the execution of this with raw format being one exception as it can’t be checked at that point and password protected entries have a different code path as the crc is also used as encryption seed.
  7. That is what supposedly happens and fast file format should not have any influence on that. The LabVIEW exe is instantiated as OS process and loads very early on the lvrt.dll into the process space and then hands over control to the runtime dll. The runtime being a dll is mapped into the process space and the data segments (where globals are located) are copied into newly created memory areas inside the process and from there on the runtime dll is operating as an independant entity from any other LabVIEW exe that may use the same dll. No data sharing between the LabVIEW exes is possible except through explicitly created IPC channels (network, pipes, shared memory, etc) or if you happen to use a zero day vulnerability in Windows process space separation.
  8. I'm not sure what is happening exactly but the crc32 is calculated wen extracting the data with unzReadCurrentFile() and then checked when closing the file entry with unzCloseCurrentFile(). If the crc32 doesn't match, this function should return UNZ_CRCERROR (-105). The only time this check is not done is if you do raw extraction, but the OpenG ZIP library only uses that when deleting a file entry from an archive as it needs to create for that a new archive and instead of inflating each of the non deleted file first and then deflating it again, which would require the password if a file entry is password encoded, it simply retrieves the raw data stream and copies it over into the new archive, without unzipping,decrypting and then encrypting/zipping it again.
  9. Without seeing more of the DLL it is hard to say for sure. But if you talk about two different LabVIEW programs (EXEs or different IDE instances) the DLL is loaded into each instance seperately and no normal global variables will be shared between them. They have no way of accessing each others global variable space as that is what process memory separation is all about. So if two different instances of a process block somehow inside the DLL there must be something else going on. It could be explicit shareing through IPC (network, shared memory, etc) or it could be through access of a kernel device driver that is of course not running in the process itself but in the kernel and might somehow block resources that the DLL tries to access from the other process and somehow locks up. That would be of course bad programming of the DLL programmer. The DLL should detect that the resource is not available and return with an error instead of just blocking.
  10. As far as LabVIEW is concerned, yes! LabVIEW simply uses the Windows API LoadLibrary() and that only distinguishes based on the DLL name itself. If a DLL with that name is already loaded into the process, even from a different location than what you request at that point, Windows will simply return a handle to that DLL and increment a reference counter for that DLL. However there is something like SxS (Side by Side Assembly) loading, that despite its names not only works for .Net assemblies but really any DLL. A DLL when compiled can add a manifest to its resources that specifies a specific version for one or more of its dependent DLLs and when Windows loads that DLL it will attempt to honor that version compatibility even if another version of that DLL with the same name is already loaded. The specifics of how to make that yourself is kind of badly documented and IMHO, while invented to help battle the so called DLL hell (different modules inside an application process having been compiled with different versions of dependent DLLs such as C runtime libraries that are binary incompatible to each other) it usually replaces DLL hell by DLL chaos.
  11. It's your right to do the homework for other people, but don't be upset about other people not wanting to do that :-).
  12. Try to add dialogEditor=true to your LabVIEW.ini file. This worked at least in the LabVIEW 7.x days and still might be present. See here https://labview.brianrenken.com/INI/ for some details about this.
  13. This is a reference to Monnie Anderson who worked at NI long long ago. Not sure where he is now.
  14. No idea how they did it specifically but as you saw in the other thread in lvdialog.rsc this frontpanels are simply dialog resources that can be loaded as templates by LabVIEW C code. There is a hidden File menu entry that allows loading these resources to edit them and technically they are VI Frontpanel resources. A neat way to use the already existing UI elements from the C code too.
  15. The nodes are actually not private anymore but rather part of the scripting extension. Look for New VI Object and then there is an enum where you can select the object to create. The owner refnum obviously has to be the correct frontpanel or diagram refnum depending if the object is a diagram node or a frontpanel object and the object class refnum has to be compatible with the object too. Lots of preconditions that must be correct and therefore it's not really a tool for generic use at all. The enum for the PixMap has the same (warning: dangerous) message appended. Basically you are working here in the attic of LabVIEW and should accept that there are rusty nails that can stick out of the floor and walls and on which you can hurt yourself pretty badly if you don't watch out carefully. And don't run to mommy and rant about the evil LabVIEW engineers who left those rusty nails in there. You are not supposed to be in that attic at all, and if you go anyways assume the risks yourself! Basically any bug report about such features will be silently dropped in the round binder, you know the one where you also drop your dirty paper handkerchiefs and such stuff. πŸ˜ƒ
  16. This existed back in LabVIEW 3 already (although you only could create it on a frontpanel with some super private nodes that came available with the new VI server interface in around LabVIEW 6 and crashed LabVIEW back then quite quickly too if you got that far) and I"m pretty sure it is from the Mac only version of LabVIEW alrady (2.x). In fact it seems like the bitmap edit control in the old icon editor, which looks exactly like that, but that icon editor was a dialog written in C inside the LabVIEW core. So while it is functional enough to be used with the LabVIEW internal C dialog API it obviously never received any extra love to adapt it to the property node interface that was later created and to make it useful as a generic LabVIEW control. Since the old default icon editor is still an option to choose, I'm sure that removing it from LabVIEW at this point is also not an option. But making it a fully public control is definitely also not going to happen. For this it is to limited in functionality to even spend half an hour to make it more functional.
  17. Which card is that? If you use one of the Comsoft (Kunbus) cards that NI resells, you should already have received a driver medium with it that you can install and will put the necessary LabVIEW VIs in the correct location for use in your program. If it is a different card you will first have to find out what LabVIEW support the manufacturer provides if any. For a Hilscher card there exist some community examples but Hilscher themselves doesn't seem to feel comfortable with LabVIEW. So you would end up having to interface their cifX DLL API through the use of LabVIEW Call Library Nodes. The mentioned community examples tend to be fairly badly working minimalistic examples without a proper implementation.
  18. That's pretty much how it all works. Of course that doesn''t mean that you can't bend the system if you have particularly deep pockets to buy the necessary lawyers to get a court ruling that may sound and feel like the opposite of this. Generally however the money involved is not high enough for such things. The only real problem if flarn would want to sue someone using that VI is of course to find out about the illegal use first and then to proof that that other person didn't invent it themselves independently of his posting. But that is an entirely different story. Having right doesn't always mean to get that right. Who knows, Oracle might buy his rights some day and then go and sue everybody. πŸ˜ƒ
  19. Legally that is indeed how it works, unless you live in a banana republic maybe πŸ˜ƒ Copyright is gained automatically when a work is created. At least in the US, works first published after March 1, 1989 need not include a copyright notice to gain protection under the law. It legally prevents anyone from copying it, unless it is accompagnied by a license that specifically allows that.
  20. The difference is that Mouse Down is generated first for the control that the user clicks on, then if that processes successfully the Key Focus is changed to the new control which commits the value to the control that had previously the Key Focus, which results in the Value Changed event for that control. So at the time the Mouse Down event is processed, the Value Change event for the previous control has not been processed yet. When you use the Value Change event for the button instead, it is guaranteed that the Value Change event for the string that is a result of loosing the Key Focus for that control, has been already processed.
  21. Very nice tool. I don't generally customize wires but this looks like a fun project. πŸ˜ƒ
  22. We use our internal SVN services so this might not be the answer you look for. But I generally refrain from adding the build executables to the repository and prefer to set tags for each release. Yes this means that I might have to go back to a specific tag and rebuild the executable, which is time consuming and has the potential to not create exactly the same executable anymore depending on driver installations that happened in the meantime for another project. But this happens very rarely as most times you want to have the latest and greatest software version. Obviously if you develop a product that might be sold to different customers over the years and might require you to be able to reproduce old versions frequently to support a specific client, this might be something that makes this approach very unusable. And I definitely never ever add the Installer to the repository. That is going to mess with your repository big time, no matter what.
  23. Why do you post this in the LAVA Lounge and not in the LabVIEW->External Code forum? You really need to give more information. You mention .Net, C++ and CLI. That is all possible to combine, though not necessarily the most common way. You talk about native pointers and managed memory in a somewhat ambigous way that makes it very hard to know what you really have. A memory pointer is not simply a memory pointer. It is important to know how it was allocated and with which exact function. That determines if a simple pointer is still valid when accessed from a different managed environment or not. Generally memory allocated in one of the involved managed environments (.Net or LabVIEW) can only be accessed through functions of that managed environment, otherwise you need to do marshalling, which LabVIEW does automatically when you use the .Net functionality in LabVIEW. If your C++ code explicitly allocates memory through Win32 API calls or Standard C runtime calls (C++ allocations could be trickier especially in combination with compilation as .Net assembly), this memory is not managed by .Net but by your code. If you pass this pointer to LabVIEW and make sure that the pointer remains valid (no realloc() or free() calls at all ever between passing the pointer to LabVIEW and trying to access it in LabVIEW) you can simply use the function MoveBlock() as mentioned in those linked articles. Of course you need to understand the difference between a pointer and a pointer reference in order to be able to correctly pass this pointer to the MoveBlock() function. Show us your code and what you think is not working there. One other question is why do you use C++ when you want to create a .Net assembly (or the opposite, why create a .Net assembly when you want to use C++). It is not the most logical combination as your .Net assembly still contains non IL compiled code, so is equally binary platform specifc as a normal DLL. Creating a real DLL instead might be more straightforward.
  24. If you install it in instr.lib or user.lib and do a menu refresh (application property node) it should be added anyways although with a default icon but what else would you want to add there? Creating a nicer default icon?
×
×
  • Create New...

Important Information

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