Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Yesterday
  3. Unfortunately, this extension had to be dropped. It's broken in MediaWiki 1.43. I'm investigating a fix.
  4. Happy New Year! This is great! It certainly feels more responsive and modern. File deletion now also works, which means that we can finally get rid of old inappropriate files The TreeAndMenu extension is missing, however, which breaks certain pages: LabVIEW VI Analyzer Toolkit - LabVIEW Wiki Events - LabVIEW Wiki
  5. The LabVIEW Wiki has received an update. Hopefully, it responds with fewer errors.
  6. Last week
  7. Can you please provide an up-to-date solution to the question?
  8. I'm currently working on building a LabVIEW library, and every time I update it, I find myself redoing the entire design process. This includes hiding VIs I don't want the user to see, adding icons, and other design tasks. This has become quite time-consuming, and I believe there must be a more efficient way to manage this. I've read a bit about .mnu files and how they can help organize and manage the appearance of VIs in the LabVIEW palettes, but I'm not entirely sure how to use them effectively. I think using .mnu files might be the solution to my problem, but I'm stuck on how to properly implement them in my library design. Could someone please guide me on how to create and use .mnu files to manage my library's palette structure. Thank you in advance for your help!
  9. The examples you provide are invalid JSON, which makes it difficult to understand what you are actually trying to do. In your VI, the input data is a 2D array of string but the JSON output is completely different. Your first step should be to define the types you need to produce the expected JSON output. Afterwards you can map your input data to the output data and simply convert it to JSON. The structure of the inner-most object in your JSON appears to be the following: { "Type":"ABC", "IP":"192.168.0.0", "Port":111, "Still":1, "Register":"Register", "Address":12345, "SizeLength":1, "FET":2, "Size":"big", "Conversion":"small" } In LabVIEW, this can be represented by a cluster: When you convert this cluster to JSON, you'll get the output above. Now, the next level of your structure is a bit strange but can be solved in a similar manner. I assume that "1", "2", and "3" are instances of the object above: { "1": {}, "2": {}, "3": {} } So essentially, this is a cluster containing clusters: The approach for the next level is practically the same: { "TCP": {} } And finally, there can be multiple instances of that, which, again, works the same: { "EQ1": {}, "EQ2": {} } This is the final form as far as I can tell. Now you can use either JSONtext or LabVIEW's built-in Flatten To JSON function to convert it to JSON {"EQ1":{"TCP":{"1":{"Type":"ABC","IP":"192.168.0.0","Port":111,"Still":1,"Register":"Register","Address":12345,"SizeLength":1,"FET":2,"Size":"big","Conversion":"small"},"2":{"Type":"ABC","IP":"192.168.0.0","Port":111,"Still":1,"Register":"Register","Address":12345,"SizeLength":1,"FET":2,"Size":"big","Conversion":"small"},"3":{"Type":"ABC","IP":"192.168.0.0","Port":111,"Still":1,"Register":"Register","Address":12345,"SizeLength":1,"FET":2,"Size":"big","Conversion":"small"}}},"EQ2":{"TCP":{"1":{"Type":"ABC","IP":"192.168.0.0","Port":111,"Still":1,"Register":"Register","Address":12345,"SizeLength":1,"FET":2,"Size":"big","Conversion":"small"},"2":{"Type":"ABC","IP":"192.168.0.0","Port":111,"Still":1,"Register":"Register","Address":12345,"SizeLength":1,"FET":2,"Size":"big","Conversion":"small"},"3":{"Type":"ABC","IP":"192.168.0.0","Port":111,"Still":1,"Register":"Register","Address":12345,"SizeLength":1,"FET":2,"Size":"big","Conversion":"small"}}}} The mapping of your input data should be straight forward.
  10. Glad to hear you got it working! The reason it doesn't update is explained in the documentation: https://www.ni.com/docs/en-US/bundle/labview/page/loading-net-assemblies.html#d62572e60
  11. @LogMAN Thanks for the example - was able to get it working! Yes looks like when updating the DLL only way for me to make it work was to shutdown Labview, restart and then add the DLL again otherwise it appeared to somehow get the stale copy.
  12. Welcome to the LAVA! Wire your struct to a Property Node to access public properties and fields. You can set it to either read or write a value. Please be careful when changing signatures. LabVIEW does not automatically detect when the type of an argument changes. You'll have to manually update all calling sites to match the new signature which can lead to bad behavior. That said, calling by ref or by value both work. Here is a complete example for both of them: namespace DemoLib { public struct MyStruct { public string Message { get; set; } public int Number { get; set; } } public class MyClass { public string GetMessage(MyStruct data) { return data.Message; } public int GetNumber(MyStruct data) { return data.Number; } public string CreateMessageByRef(ref MyStruct data) { data.Message = "Hello from CreateMessageByRef"; return data.Message; } public int CreateNumberByRef(ref MyStruct data) { data.Number = 42; return data.Number; } } } Example.vi
  13. I am creating a .net DLL for a customer who will be using it in labview The method signature that I would like is int RequestData(ref myStruct[] data1) The customer who might not be very familiar with .net dll's is unable to figure out a way to invoke this... so I have been trying to figure it out using the labview community edition. Step 1 was to just see if I could pass a "ref" struct back to Labview... and here's my dll code for that and the labview sketch... using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace clusterPassing { public struct myStruct { public string myStr; public int myInt; } public class myClass { public int myMethod( ref myStruct data1) { data1.myInt = 21; data1.myStr = "test string"; return data1.myInt; } } } The labview sketch is attached In the dll code if I change the input to myStruct data1 (without the ref) I am able to invoke it but once I make it ref (as shown in the code) I get an error - 1316 Question: Is there a way to allow for labview to exchange a struct and get the value back from the .net method? I have been reading up on clusters in labview but am not sure if this is possible yet...
  14. Earlier
  15. Your mixing and matching two very different things. The 2GB RAM is the physical RAM that the CPU and the Linux OS can use. But the RAM in the FPGA that is used for Lookup Tables is a very different sort of RAM and much more limited. The 9043 uses the Xilinx Kintex-7 7K160T FPGA chip. This chip has 202,800 Flop-Flops, 101,400 6 input LUTs, 600 DSP slices and 11,700 kbits of block RAM or BRAM, which is what can be used for the LUTs. If you really need these huge LUTs, you'll have to implement them in the realtime part of the application program, not in the FPGA part.
  16. First of all my device is a CRIO-9043. I want to use one dimensional lookup table for interpolation in FPGA.vi, I am using U16 data type and one lookup table can store 40960 data and I need to store 7 million data. Currently I have inserted only 16 tables and the RAM resources are not enough. My compilation tells me that one lookup table takes up 19 RAM resources (my device has a total of 325 RAM resources). But on the lookup table it shows that one table uses only 80KB of storage, while on the official website the CRIO-9043 has a RAM size of 2G! I don't know how to solve this problem. Attached is my program, sorry it's only in Chinese! 15.vi
  17. You are probably getting a permissions error on the Open (windows doesn't ordinarily allow writing "c:") which will yield a null refnum and an err 8 on the open. Your err 5000 becomes a noop as does the write. You're then clearing that error so when you come to close the null refnum it complains it's an invalid parameter - equivalent to the following. Is it expected behaviour? Yes. Should it report a different error code? Maybe.
  18. I just checked, and it doesn't close teh file reference, but it does pass out a null reference. The original reference is still valid. This is still unexpected behavior, though.
  19. @hooovahh thank you very much for your answer. The problem was I was using Labview 64 bit. Now I can see CAN palette
  20. Hi, So I had a bug I couldn't figure out. The setup is according to the attachment. The Close File function kept throwing an error (code 1) and I couldn't understand why. But then I finally understood: if there is an error in to the Write to Text File the file refnum becomes invalid. The reason I am starting this thread is that I always thought that there is always a case structure in a sub VI, even for the primary functions, so that if there is an error the function isn't executed BUT any refnum passes the VI unaffected. But that isn't the case? Is this an expected behaviour?
  21. I create a VI to do that, but i'm not getting success My actual structure is on this formact: {"EQ1": { "TCP": { "1": {}, {"EQ1": { "TCP": { "2": {}, {"EQ1": { "TCP": { "3"{} } }, "EQ2": { "TCP": { "1":{}, "EQ2": { "TCP": { "2":{}, "EQ2": { "TCP": { "3":{} } } I'm trying to do the folowing thing (the correct structure for json): {"EQ1": { "TCP": { "1": {}, "2": {}, "3"{} } }, "EQ2": { "TCP": { "1":{}, "2":{}, "3":{} } } Could you help me assemble my json into this structure? BuildJSONtoForum.vi
  22. Your JSON has patterns in it that infer lists/arrays of data that could be of variable length. This would be difficult to create with the native JSON functions in LabVIEW. I would suggest using the JSONText Toolkit - https://www.vipm.io/package/jdp_science_jsontext/?utm_source=vipm_desktop
  23. Probably. Again NI-CAN drivers, which you need to use your 8473, only work on LabVIEW 32 bit. Do you have LabVIEW 32 bit installed? Do you have the NI-CAN drivers installed? Do you see the "CAN" palette under Measurement IO? If not then you need to resolve this. Sorry.
  24. No you can't. This lets you use XNet hardware (which I don't think you have) but use the older NI-CAN drivers. This was intended to help developers transition to the newer XNet hardware but use their old software. You cannot use any XNet sessions on the 8473 hardware.
  25. Is it possibile that I can't see the NI CAN library examples because in MAX I have only 64bit Labview Runtime?
  26. In the Example finder, I tried to use the option "Limit results to hardware" selecting USB-8473 but the result is an empty list. Why? I can see NI-CAN 18.5 in NI MAX tool.
  27. I already installed these drivers. Can't I use the XNET examples if I install the NI-XNET Compatibility Library for NI-CAN? Installing the NI-XNET Compatibility Library for NI-CAN - NI
  28. I can't open it at the moment it is new too of a version. But based on the name it looks like it is again using the XNet drivers not the NI-CAN. You need these drivers for the USB-8473.
  29. On the other site - Report showing measurements in table (wanted) AND in-line (unwanted) - NI Community I want to remove content from my TestStand report but can't figure out how. I've looked at the NI.com references for customizing the report and understand that I can change properties, change the style sheet or roll my own report. I can't find a property (property browser->advanced->edit flags?), don't feel that it's an issue with style and really don't want to roll my own. Can you direct me?
  1. Load more activity
×
×
  • Create New...

Important Information

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