Jump to content

Search the Community

Showing results for tags '.net'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Software & Hardware Discussions
    • LabVIEW Community Edition
    • LabVIEW General
    • LabVIEW (By Category)
    • Hardware
  • Resources
    • LabVIEW Getting Started
    • GCentral
    • Code Repository (Certified)
    • LAVA Code on LabVIEW Tools Network
    • Code In-Development
    • OpenG
  • Community
    • LAVA Lounge
    • LabVIEW Feedback for NI
    • LabVIEW Ecosystem
  • LAVA Site Related
    • Site Feedback & Support
    • Wiki Help

Categories

  • *Uncertified*
  • LabVIEW Tools Network Certified
  • LabVIEW API
    • VI Scripting
    • JKI Right-Click Framework Plugins
    • Quick Drop Plugins
    • XNodes
  • General
  • User Interface
    • X-Controls
  • LabVIEW IDE
    • Custom Probes
  • LabVIEW OOP
  • Database & File IO
  • Machine Vision & Imaging
  • Remote Control, Monitoring and the Internet
  • Hardware

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Company Website


Twitter Name


LinkedIn Profile


Location


Interests

Found 23 results

  1. I found this .NET example as a potential path to circumvent requiring to have Python installed to read PNG metadata: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q0000019lbVCAQ&l=en-US Unfortunately, I don't use 2022 (subscription). Would any one be so kind as to down convert it to 2021? Thanks!
  2. I know how to run .Net executable by MainWindow() constructor but I have some resources defined in App.xaml and MainWindow() doesn't run without them. How to run application starting with App() constructor? Also I need to pass some parameters into MainWindow().
  3. After a 20 year hiatus, I'm back to writing text code again. Not just any text code, but C# .NET assemblies. After about a day and a half of googling and self teaching, I've hit the wall. I've got a .NET assembly that was provided by a manufacturer that controls some hardware. We are calling the higher level .NET functions from Labview and they work. But we aren't getting acceptable performance for the high level calls, so we are trying to drill down into the lower level calls. One of the .NET methods requires an ICollection<T> input, there in this case T is a channel object that is created elsewhere. The ICollection function is described the in the MSDN article: http://msdn.microsoft.com/en-us/library/92t2ye13 For reasons I don't really understand, Labview doesn't apparently support a constructor to ICollection. Something about Labivew not supporting calls to .NET generics, but I'd be lying if I said I understood that. But it seems like it should be possible to create a .NET assembly that creates a reference to an ICollection .NET object that can be passed to Labview. But I can't get it to work. I've written a simple program that contains two methods. The first method GetUInt32 simply returns an input integer and was written as a test to see if I could write and assembly and call it from Labview. It works great. The second method, GetICollection, is a test case to create a collection of UInt32 integers. Should be really simple, but it generates a compiler error. I suspect I'm doing something really basic incorrectly, but I'm at a loss to understand what. Can someone point me in the correct direction?
  4. Hello all, I am currently trying to create an HTTPS server with LabVIEW. I have been using the built in TCP VI's for communication with the server and client, however I would like to use SSL or TLS in order to encrypt the data that is being sent across the connection. I know that I can point to either the self-signed cert that comes packaged with LabVIEW, or the certificate that we have for our server on-site. I'm fairly certain that I can achieve this by building an assembly in .NET, and then using it in LabVIEW. I have looked around for TCP with TLS libraries for LabVIEW but could only found some out-of-date ones that didn't work with the newest version of LabVIEW. Do these libraries exist somewhere? And if not, is the .NET approach a solid idea? Thanks, Brandon Jones
  5. I need to access Aerotech A3200 data with LabView. The Digital Scope in the A3200 software has the capability to record data at 1kHz for 8 seconds in dedicated batches. We use LabView for all functions surrounding the motion control and have the Aerotech LabView package. Using the LabView vis we can only access data a single data point per call and I don't see how to set up a FIFO to Windows LabView. Someone must have looked at this problem lately. Can anyone steer me in the right direction? Thanks!!
  6. So this just happened to me and I'm quite confused by it. As it turns out, the .NET Constructor Node not only provides terminals for error in, error out and the reference, but actually two more "hidden" terminals: Notice: I left the error terminals untouched and none of the wires are connected (try it yourself). This never occurred to me. Only now, while hunting a null reference exception I found the constructor node looked "off", like this: The strange part is that the terminal doesn't actually carry the reference (which is why I receive the null exception). It only specifies the type. The upper left terminal is a void type input, so the wire is always broken. Does anyone know why these extra terminals exist? They don't seem to be part of the specification as far as I can tell. Any fancy things we can do with this?
  7. Edit: I'm asking primarily if there is a reason why/when I should/shouldn't use .net functions in my LabVIEW development. The example below is just to demonstrate a case of my question. _________________________________________________________________________________________________________________________________________________________ I recently found a custom library that calculates SHA256 hash algorithms However, in this post I see that the same thing can be done with .net My main question is: Is there any reason to build or use a custom library for something where .net functionality already exists? Are there any disadvantages to offloading work to .net ?
  8. Hello, I am trying to copy multiple cells in LibreOffice, using the UNO API. I encountered an issue in the XCellRangeData object. The object's method returns an array of array of any() type. it seems LV can't compile this, even though the wire appears not to be broken. If I try to parse the array of array into a single dimension and then rebuild, the code is broken. See the attached files. Is there a solution for this issue? The alternative would be to copy cells one by one, which is a much slower solution.
  9. Hi Everyone, Most of the time I am able to find solutions to my issues just by reading this forum but I wasn't that lucky this time. So, i got an issue when i'm trying to install my build. I got the following message: "This distribution is built with an older version of winMIF that is not compatible with .NET 4.6.2 upgrade to 17.0" When googling this error message or even "winMIF" i can't find anything that match my request I tried to uninstall the .NET framework and then reinstall the 4.0 (and 3.5) and I got the same issue. (Exactly the same error even if it's .NET 4.0 or 3.5 ...) The computer used to build is a Win7Pro with Labview 16. The target computer is a WES7 (but I got the same issue on my dev computer ...) In advance thank you, Piet
  10. Hi I am developing a LabVIEW based vision system. Though the front-end is to be developed in C#. The processed images should be displayed on the front-end. Has anyone experience in how to convert, pass and display IMAQ images in C# Thanks
  11. Now that it looks like Microsoft deprecated ActveX Automation interface in Excel 2016, the only other interface left is .NET interop assemblies. I have tried to reproduce Excel - Write Table.vi using .NET instead of ActiveX. The result of the effort is attached. There is a big problem though: The Range.value2 property could take 'anything' without a problem when using ActiveX (it was taking any variant)! But now it wants a .NET object. And the 'To .NET Object.vi' doesn't accept a 2D array of variants! So, say getting a recordset from a database (which is returned as a 2d array of variants) and then writing it, as it is, to a new Excel workbook is no longer possible as far as I understand. This is really sad. A 2D Table of strings or doubles is still OK. So, if you need to use those, you can with the attached code Write Table to Excel with DotNET.vi
  12. Hi all, I have been trying to use VIPM to distribute drivers that rely on a .NET framework that is unsigned (i.e not in the global assembly cache). My issue is that after the package is installed, none of the VIs will work because LabVIEW cannot locate the .net assembly. However, if I launch labview by opening the library VIPM installed, all of the VIs will work, and LabVIEW is able to locate the the .Net framework and it appears in the main application instance. I need to be able to use the installed vis all the time, not just when LabVIEW is launched in this particular way. Here is a link to all the all the files I used: https://www.dropbox.com/sh/yjt2a0t8msxhgfn/AAC4VVW-hPawwXtGMrZ6wuIra?dl=0 Here are the steps I went through: 1) We put all the .NET dlls and the LabVIEW.exe.config file in the Labview directory. 2) We installed the package on our computer. 3)We closed everything and relaunched Labview from the start menu. Then accessed the BioRobotics/Vicon palette. 4)We placed the Get Ref subVI on the block diagram, opened it up, and ran it it. 5) We got the following error: We also get a similar error for any VI that uses a method associated with the .NET dll. 6) However, if we again start with everything closed and launch Labview by clicking on the VICON.lvlib located in the vi.lib 7) Then repeat steps 3 and 4. We do not get any errors in the VIs on the palette, and the .Net assembly loads fine. We can even close the library and everything still works. Somehow opening the library first makes LabVIEW know to load the ViconDataStreamSDK_DotNet assembly when using functions on the Vicon palette. If anyone does attempt to build a new package, it is worth noting that I included the dlls in the source files, and in the same folder as the vipb: Thanks! Callan
  13. Hi all. I am trying to call a VB .NET application develloped in my company. The Construtor node returns no errors. However when I use the Invoke Node to call the Show() method, the following error appear: "DragDrop registration did not succeed" The application I am trying to call uses drag and drop menus. But, shouldn't LabVIEW be able to let those run? Is there a work arround for this? I am using LabVIEW 2014 32-bits and .NET framework 4.5. Thanks in advance for all the help. Regards, Diogo Ribeiro
  14. Hello, I have a .NET/C# library which was written by a 3rd party. Calling methods in it works perfectly from the LabView development environment (2013, 32bit) when using the .NET constructor and Invoke Nodes. Calling methods in the .NET library also works perfectly when I build my LabView program into an executable and run it without the development environment. HOWEVER, when I build the LabView program's functionality into a .dll instead, and then call functions in this Labview-built .dll via a CLFN instance in a higher-level VI, the underlying functionality of the .NET library doesn't work and the development environment subsequently hard-crashes and must be restarted. ARGH!! Any thoughts why this might be happening? I've had no problems calling non-LabView C++ .dlls inside of LabView .dlls, but calling C# .dlls inside of LabView .dlls appears to be a no-go for me right now. Am I missing a compiler setting or is this basic paradigm just not possible? Or is it a known bug with LabView. Thanks, Nate
  15. Hi,I am using a .net DLL in LabVIEW, that generates some events. I am registering for those events at the start of the application and then waiting for those events in the Event Structure.All this is done in a re-entrant VI and I am using 'Start Asynchronous Call' node to launch the VIs dynamically.Everything is working fine. But when I run the VIs for long, the memory is continuously piling up. I am not sure it is happening because of LabVIEW or .net DLL.Does anyone has any idea about this ? Any help would be greatly appreciated.
  16. Hi, I wanted to make this post in case it helps anybody else with the same problem, or to remind myself how-to fix it when I forget in a few months time. I recently had the very embarrassing situation in front of my customer, a large EMS.I had just transferred a test solution that had been working for several months on my local site to a volume EMS, this transfer included the same PC and test fixture, the same software, written in LabVIEW 2012 and build into an executable. When I ran it up on the EMS’s site, some of my dynamically loaded VI would just hang for a time; the whole application would show not responding for a while and then it would suddenly spring into life and work OK and if loaded again they work fine with delay. But every time the executable was exited the same effect would occur. It was not the sort of impact I was hopeing to make. After some investigation I found out it only affected my VI’s that had calls to .NET components within them, I called NI support, who at that time could not suggest anything and in the end I had no option but the replace the .NET calls with other methods to achieve the same functionality. So I created a very small stand alone executable with a single .NET call in it and found it worked on all my PC’s in my local factory but not on the PC’s in the EMS. All the PC’s were running the same .NET framework. As I had no idea what was going on and at that time NI support still did not have an answer to the problem I had no option but to stop using all .NET calls with all my software, I could not risk having a similar problem going forward. Finally I realised that the one main difference between the PC’s was that my PC’s had direct access to the Internet, but the PC’s in the EMS were connected to a firewalled off Intranet. Following further conversations with NI support in the UK, with this new bit of information they came back with the following information. and then a proposed solution followed I have played around with this solution and it does solve my problems, I am not sure at this stage what the implication of these security changes are, but as the machine is not connected to the interent anyway I am not to worried. So thanks NI for the support , I am now feeling happier about moving back to .NET solutions. I hopefully this may help sombody out there.
  17. Hi, I want to implement the SSL Begin Read method in LabVIEW with the System DLL using the .net construtor nodes.I am successful in doing so for the synchronous Read method. But when I am trying to modify my code with the Asynchronous methods, it asks me to wire reference for a Asynchronous Callback node. I haven't worked with Event Callbacks in .net before , so I dont have much clue about the dataflow and other things.Can anyone please help me regarding creating callbacks in this particular case.Regards,Runjhun.
  18. I am trying to export a class in LabVIEW 2013 to a .NET Assembly. According to this I can just select the members of the class that I want to export and it will generate a .NET class for them. http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/building_a_net_assembly/ I am able to export the individual members of the class, but when I run the code in .NET it starts searching for mydllname.dll/myclassname.lvclass (the file of the class that the exported members belong to) and can't find it. My next step was to add the class to the the Always Included list, but it seems that when I do that some of the members that I have in the Exported VI's list don't show up in the .NET assembly. The class I'm trying to export is inhereted from another class, so I tried adding both classes to the Always Included list and all of the base class members to the Exported VI's list, but I still have members missing in the .NET classes. Thinking it could be something releated to exporting LVOOP classes, I tried ditching the LVOOP class altogether and rewrote the labview code to use generic VI's and a cluser typedef to store the member data. However, it seems like the labview builder doesn't recognize that the control and indicator clusers that I use to pass the member data belong to the same typedef, so it exports a different .NET class for each control and indicator cluster. This creates a problem because I have no way of passing the output of one funtion to the next in .NET since I cannot convert between the two .NET types. Has anyone had problems like this/know how to fix it??? I couldn't find much online about building a .NET interop assembly beyond the basic configuration steps, so any help would be much appreciated! Thanks
  19. Hi lava, I hope you can help me with my problem. The problem that I want to solve (in a proper way) is the following: I have a list of all the *.dat files in a folder. I want this list to update every time a new *.dat file i created in that folder. I don't want to pool the folder constantly so I have solved this problem by using a dynamic event from a .NET action. This is all nice and great. My problem is, that if I change the folder, my dynamic event does not execute when a new file is added to the new folder. I have attached two snippets of the main part of the code. In the mainVI, I first setup some events. The events are then written to a global variable. It is this global that I use when broadcasting the event. In the watch_dir.VI the .NET event is setup. I look for files that are created, deleted, changed or renamed. (Most of the code is from Steve Chandler's nugget: http://forums.ni.com/t5/LabVIEW/My-First-Nugget-Directory-Changed-Event/m-p/1407552) I have tried initializing the different events when the folder is changed,but that does not seem to fix the problem. I hope I have made myself clear, but please dont hesitate in asking questions. I could off course just pool the number of files in the folder or something like that, but that doesn't seem right to me. I hope you can help me. -Jørgen
  20. Hi everyone, I posted this over in the NI forums as well, but maybe I'll have more luck over here. I just ran into an issue this morning after building an executable version of my program, which uses the Actor Framework. It contains a .NET control (version 3.5) on one of my front panels. There's a function that I call to pass some XML strings to the control, which then handles filling in the data. This works just as expected in the development environment, but when I build an executable and run that, the control just sits there without being properly filled in. I attached an error indicator to the invoke node, which is showing me this error: Error calling method InstrumentDataGridView.InstrumentDataGridView.LabVIEW_FillTableFromXML, (System.ArgumentNullException: Key cannot be null.Parameter name: key) <append><b>System.ArgumentNullException</b> in Experiment UI.lvlib:Experiment UI Panel.lvclass:Actor Core.vi:1->Actor Framework.lvlib:Actor.lvclass:Actor.vi:4->Actor Framework.lvlib:Actor.lvclass:Actor.vi.ACBRProxyCaller.D140000E I then ran DebugView to get some more detailed information on what was happening and here's the log that it spit out: 00000006 80.98936462 [3404] Created new AppDomain: ICAS-EPR.exe for Reflection 00000007 82.80818939 [3404] Created new AppDomain: ICAS-EPR.exe for Run 00000008 85.75064087 [3404] DNError: Error calling method InstrumentDataGridView.InstrumentDataGridView.LabVIEW_NotifyAcquisitionStopped (1172). System.ArgumentNullException: Key cannot be null. 00000009 85.75064087 [3404] Parameter name: key 00000010 85.75064087 [3404] at System.Collections.Hashtable.get_Item(Object key) 00000011 85.75064087 [3404] at NationalInstruments.LabVIEW.SyncInvokeTable.LookupControl(Object key) 00000012 85.75064087 [3404] at NationalInstruments.LabVIEW.DNRuntime.InvokeMethod(Int32 invokeType, Type type, ObjectId objectId, String methodName, Type[] parameterTypes, Int32[] parameterFlags, ObjectId[]& parameterIds) 00000013 85.75064087 [3404] 00000014 114.37963104 [3404] DNError: Error calling method InstrumentDataGridView.InstrumentDataGridView.LabVIEW_FillTableFromXML (1172). System.ArgumentNullException: Key cannot be null. 00000015 114.37963104 [3404] Parameter name: key 00000016 114.37963104 [3404] at System.Collections.Hashtable.get_Item(Object key) 00000017 114.37963104 [3404] at NationalInstruments.LabVIEW.SyncInvokeTable.LookupControl(Object key) 00000018 114.37963104 [3404] at NationalInstruments.LabVIEW.DNRuntime.InvokeMethod(Int32 invokeType, Type type, ObjectId objectId, String methodName, Type[] parameterTypes, Int32[] parameterFlags, ObjectId[]& parameterIds) 00000019 114.37963104 [3404] 00000020 133.64822388 [3404] Destroying AppDomain: ICAS-EPR.exe for Reflection 00000021 133.68054199 [3404] Destroying AppDomain: ICAS-EPR.exe for Run As you can see, I get a "System.ArgumentNullException: Key cannot be null." error when calling both LabVIEW_NotifyAcquisitionStopped and LabVIEW_FillTableFromXML. Neither of these functions throw that type of exception. I thought that maybe the constructor wasn't being called, but I added some code to the constructor to write to a file and that functioned as expected. Then I wrote a new function that wrote to a file and called that when the VI loaded. That function worked fine and didn't throw any errors. I am completely stumped as to why this is happening. Both the development environment and the executable use the exact same DLL code. I appreciate any help I can get!
  21. This took a decent amount of debugging and headscratching to figure out why a particular .NET call kept failing. I inadvertently discovered and wired a "vestigial" output terminal that exists on .NET Constructor Nodes in LabVIEW 2012. Interestingly, this output terminal returns the same datatype as the "real" output terminal, yet does not return a valid ref. Pretty sure this is a CAR-able bug, but just documenting behavior here just in case someone else runs into this. (Can you think of possibilities to exploit this as a feature??) Here's a 47sec YouTube video with no sound; Vestigial Terminal at 25sec: ...and for the sake of organic search: Error 1172 - "LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation." And in case the resolution for this "error" and my "bug" was not clear: I just had to rewire the terminal to the "correct" output. Further, my choice of .NET assembly, constructor and property for the demonstration was arbitrary; this appears to affect all .NET Constructor Nodes.
  22. I was thinking it would be cool to write an API that would allow programmers to customize the thumbnail popups in windows 7, especially with the ability to add buttons (see http://dotnet.dzone....ndows-7-taskbar and attached image). From what I can tell, even after taking the knowledgebase steps on NIs site to make .NET 4.0 available in LabVIEW, the necessary namespaces are not available in LabVIEW. Even if they were, I'm not sure how I'd get this to work because it requires xaml files. I suppose I would have to write a .NET wrapper, but then I don't think this would be dynamic enough to make into a standard API for LabVIEW applications that need more or less buttons without modifying the wrapper text code. Unless, somehow you had all buttons fire a single event to be captured by LabVIEW in which the event data had the name of the button pressed, allowing you to determine what to do on that button press. Suggestions, or is this just not going to be possible?
  23. I am trying to open shell32.dll with .NET but an exception is being thrown. I'm seeing this type of exception all over when I search google but really not much related to LabVIEW (mostly vb.net, c#.net etc). I have tried loading shell32.dll from system32/shell32.dll and SysWOW64/shell32.dll and both fail. I am running 32 bit LabVIEW on Windows 7 64 bit. I'm guessing it has something to do with that. I am going to try on a coworkers 32 bit computer when I get a chance, but does anyone have suggestions? Thanks. Edit: Tried on 32 bit labview on a 32 bit machine and it still fails.
×
×
  • Create New...

Important Information

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