Jump to content

Neon_Light

Members
  • Posts

    33
  • Joined

  • Last visited

Profile Information

  • Location
    Netherlands

LabVIEW Information

  • Version
    LabVIEW 2018
  • Since
    2010

Neon_Light's Achievements

Explorer

Explorer (4/14)

  • One Year In Rare
  • Collaborator Rare
  • One Month Later
  • Week One Done
  • Dedicated Rare

Recent Badges

0

Reputation

  1. Thank you Shaun for the reply 🙂 Today the best of the day is gone, I hope I will have time soon to give it a try.
  2. Hello Rolf, thanks again for the great help! It's kind off busy here so I was not able to reply earlier.. Well I am in a bit of luck this time I did find some documentation and the compiler used is "MSVC2019". It is written in C++ and it: "exports a pure C interface", I like the word pure as it reminds me of clean air, oceans without plastic and being young, in this context however I can not really understand what is meant. maybe you can give a global idea? If I read this text I think it might be wise to turn error handling off? At this time I did set it at maximum, hoping to get some information about things that might went wrong. Thank you for the remark, In the real code I do check if the handle is not 0 if it is zero I return a error code to Labview. If the pointer is 0 I also return a error code to Labview Thank you for the remark. I need to read this remark again when it is not too late, my energy level is kind of low now at the end of the day. I will try to find the example I started with to go with your remark. I think I understand what you write. The dll I wrap in my own dll uses a callback to send error and status massages. I can see them in Labview now 🙂 . I think however it is better to use this info in the C code eventually e.g automatic stop logging when there is an error related to the logging. I need to find out the best way to do this though. And even if I can use the error and status messages it would be really helpful if there is something going horrible wrong with the dll, something I did not think about, the dll will not be able to make Labview crash, I rather would have a message telling something like: "Unknown error at dll, program halted.." , better to have a ugly way of telling something went wrong than a crash-ing way which closes down Labview. If this would be possible please let me know. Maybe I can at least use some kind of exception handling when loading / running the functions of the dll I try to wrap? Thanx for the help!
  3. Hello all, background A while ago I wrote a dll wrapper to get data from dedicated test-hardware. For this hardware there is a dll available. To use this dll you need to use an callback function. If you need to use a dll in Labview which needs a callback you need to write the callback in C code and use a Labview C lib to get the data into Labview, basically my dll takes care of this problem . Enhance the code and way of working more efficient The code I wrote code works fine. However I did not use / test it for hours on a row. And sometimes If I make a mistake when changing the code I run into problems. I was able to fix all the errors and problems however it was not the most efficient way of working. For instance If there is a serious error in the code the dll I need for the hardware can crash, it can make my wrapper crash, which will in return make Labview crash. This makes the way of coding inefficiënt and it will not enable me to read my C++ book etc etc. Example pseudo code I did try to extract some main points of intrest from the code, I did add some comment in the code. I hope someone can give me some general guideline or advice what to read. At this time I am reading: Unhandled C++ exceptions I think I might be able to use it, I did not use this before so advice would be welcome. Thank you all for the help ! // .. // This is a part of the code only intended to have a talk about how to catch errors // It is not complete and intended as Pseudo code // .. int __stdcall MyDriverLoads(const int NumberToInitialise,const bool enableAnotherOption , const char *const path , LVUserEventRef *rwer) { // loads the dll // Q -- I can check if (F_functionname !=0), if it is not 0 then I can proceed if the function returns 0 I can return an error to Labview Extern_dll = Load_Extern_dll(); // Get the functions I need from the dll p2_ExternDriver F_ExternDriver = (p2_ExternDriver)GetProcAddress(Extern_dll, "_ExternDriver"); p2_Initialise F_Initialise = (p2_Initialise)GetProcAddress(Extern_dll, "_Initialise"); p2_AdapterCount F_AdapterCount = (p2_AdapterCount)GetProcAddress(Extern_dll, "_AdapterCount"); p2_StartLogging F_StartLogging = (p2_StartLogging)GetProcAddress(Extern_dll, "_StartLogging"); p2_StopLogging F_StopLogging = (p2_StopLogging)GetProcAddress(Extern_dll, "_StopLogging"); // When there are adapters found I tell it in Labview adapterCount = F_AdapterCount(); // Get the callback function adress, if adress == 0 I can see something is wrong void(__stdcall *p2_CallbackFunction_t) (pt2Obj , const LogData & ) = &CallbackFunction; // Q -- I could use try {} and catch {} however I do not have acces to the source code of the dll so, // I do not know if they used // trow "The Blue error" , or // trow "The Red error" ret = F_ExternDriver(adapterCount, enableLogFile, path, *p2_CallbackFunction_t, pt2Obj); // This tels the dll to start logging before this command you will not receive data in Labview ret F_StartLogging(1,2,3); // Labview is receiving data thats great !!! return ret; // Q -- Labview has been receiving data for a hour what happens if the used extern dll crashes ?? // If the dll crashes when return is passed I can not use try() and catch anymore. // } extern void __stdcall CallbackFunction(pt2Obj , const LogData & ) { // There is a lot to do here // do stuff!! // I did not write everything here err = PostLVUserEvent(*event_ref, &tmpEvent); }
  4. Hello RolfK, Thank you again for the great help. The terminology is not completely clear to me. Although the 9074 does not run Linux but VxWorks, I try to make a quick compare between Linux to make it easier to understand for me. In this screen from MAX I did click next and did install the recommended software. Is this what you mean with "the base system"? This is the same in linux as apt-get upgrade? I did not update the BIOS with the button on the left. Updating the bios would be going from Ubuntu 20 to Ubuntu 22? Do I need to do a BIOS update to install and test the new version of RT Main ?
  5. Hello I try to compile a FPGA clicking the right mouse button on Build specifications -> click the Test FPGA --> build. It starts. But it ends with this window: then in the compile status I can click details, which shows me: I did use windows search to find the first file in the list. I can find it. I did try build and rebuild they both result in the same error I did clear compiled object cache did not help also added the directory at options --> Paths which did also not work I am using Labview 2018, the project was previous build in Labview 2017 which is not available anymore. The cRIO type is a 9074 Hope someone can help me! thank you all Eddit: I did previously use version 2019 of Labview this version worked fine. I did find this link: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9KGSA0&l=nl-NL I did try to run the "FPGA Compile Worker" it did not start so I did go to the directory where the exe file is located. In This directory I can also find a file with the name: ".NI.LV.FPGA.2019.CompileWorker.lock" This makes me think there is some software left behind from the 2019 version causing a conflict. Can I remove the LOCK file without serious consequences ?
  6. Hello all, At work there is an Old 9074 which is running test software. There is also a 9148 connected to the 9074. I did change the old software tested it in simulation in simulation it works fine. What I already did do: I got RAD working, so I can restore the old software I did install the packages needed for Labview 2018 I did find I can use MAX to install new software clicking the cRIO --> software --> add remove software gives me the option to install Labview 2018 recommended packages I did this it removed some files and added a lot of new files Now I do need to deploy the new RT main to the cRIO there are a lot of actions I do need to perform. Can someone please tell me the basic steps I need to take to deploy the new software and test it on the real hardware? Is it as simple as hitting the run button or do I need to stop the old RT main first? Is action 3 above enough or did I had to remove old software? hope someone can give me an overview, thanx !
  7. This might be a little bit of-topic but I think you also use Matlab code in Labview? I see a lot of files with the name Mathscript is this the software needed to use Matlab ? or is it something completely different ?
  8. Hey ShaunR, most of it did work, the only thing the install complained about was: "Install National Instruments Device Drivers Now?" Are these also on one of the files you linked to? Or do I need to download them seperately? Thanx for the help ! Now I am happy again I hope I can build some nice things and convince my managers etc. to buy a new license ...
  9. Hello hope you can help, (did edit this text to make it better to understand) Normal testcode (If I have more time I can try to include this code) I try to simulate the real time main in a cRIO test project. All goes well I can run the real time main on "my computer" target and use the FPGA in simulation mode without the use of real hardware. when I add an extra loop to the real time main with new shared variables which are not used in the simulated FPGA, I can not deploy anymore. In that case I can only deploy when I use the option disable auto deploy variables (right mouse on RT compact RIO target) and make the variables absolute (right mouse on the variable in the blockdiagram code). but when I run with this option I get an error -1950679035 when I want to use the shared variables which are *not* used in the FPGA. I Use a desktop execution node to change data on the simulated FPGA this works fine. Smaller code without the FPGA I made the code smaller and easier to understand to have focus on the shared network variables, this code is included below . There is a screenshot and the real code. When I use the small program and try to load the *non* FPGA shared variables, I get the same error -1950679035. when I only use the shared variables which are previous used in the FPGA vi and remove the non FPGA shared variables all is okay, I can also see the FPGA variables in the in the Ni Distributed system manager. Although the other program simulating the total cRIO code with FPGA has long been stopped. What I want is to open a library with a link to the file e.g.: C : \folder with *.vlib . But I am unable to open a direct link to the harddrive e.g.: C:\Users\noob\Documents\labview projects\cRIO\My Control Application\Shared Variables\Noob Shared Lib.lvlib I get the error -1950679035 again. I only do not get errors when I try to acces network shared variables I did previous use in the test with the FPGA simulation and where where used in the FPGA code. I think the desktop execution node only adds shared network variables from the FPGA code to the Ni variable server and does not do this for the shared network variables in the Real time main code. I am able to see the old FPGA shared network variables when I use the NI Distributed System Manager which can be found at the tools menu. I think I must load a variable library into the server before I can acces it with the code below is this correct? Can anyone point me in the correct direction to do this? hope you guys can help and I hope this text is easier to understand compared to the text I wrote last night 🙂 at nights it tends to be late and my texts show that. If the question is not clear please let me know then I will try to solve it. Hope you guys can help thanx! Enable Debug modus.vi
  10. I think they are willing but hard to convince, its like chicken egg, chicken egg, chicken egg. etc and then they go like lets have carrots we understand that! What I mean is you need a team to build up knowledge and experience. That costs money like a few licenses. When they, the managers can see what can be done with it then they are willing to pay. That is the same as with software as Altium, Matlab, other CAD software, etc If I cant get the software working I am certain the chicken or egg will die.
  11. OW well I have got until 23:59 to use this license ... hope I can install the other 2018 after that. I know some big companies have got volume licenses would be happy if my work had one of those. that would be a relaxing thought. They are relative cheap compared to the licenses which only enable a few to people to work with. but then you need 5 or more employee's who use Labview I think.
  12. Can you even get a maintenance support contract on old versions? Or can you only get it on the new versions where you need to pay every year?
  13. Thanx, I did already download the files. Hope they work. So these files are the same as on the DVD? Or the ones you can get with a package manager? Any tips for keeping the old Labview install (which is a newer version) undamaged? thanx again
  14. Hello Rolf, I am afraid this time I have to disagree. Agree Dont get me wrong I think it is okay to pay for Labview, I really "value" the software. I did work with other testsoftware and although it is the price was lower or even free, the time needed to get to a working test-setup without bugs etc. made it more expensive. Thats only the price and with Labview you can do so much more than other testsoftware etc etc. So Yes I see there is a price tag and I think it is justified. Dont agree Now for the parts I do not agree with. Some testmachines can be complex expensive, much much much more expensive than the Labview license. These machines need to be reliable. They are used a lot and you can not simply change your software when you want to. For machines like this I would rather use the Old Labview version thats already running on the machine and use a new version when the total machine is being replaced. The decision what version to use should be up to the company who did build the machine and did buy the license. Not up to NI. If I take a look at the Ni website they are simply making it hard for you to download an old version. They should not do this. Introducing risk in expensive equipment is not wanted. Dont get me wrong I rather build new setups but a lot of times it is not wanted. And Yes I know you could ask cash for install files etc of old versions, but would this make my manager happy when I need to spend extra time on that? Will my manager be extra willing to pay for a new license when I need to spend a lot of time on ridicule subjects like this? Think not. If you add that a lot of managers simply are not able to understand advantages of a good product as Labview. Then you can get to the sum where the manager tells to quit using Labview. Sorry to say but what I write it is realistic. btw the last time I did install MS windows on a laptop I did not even need a license key. It was already in the EEprom of the laptop. To be clear, I understand you need to pay for capable software and support, but downloading a old version you already paid for? This time I think the sales and marketing department of Ni dont get the point of selling software. And yes I understand installing old software can be annoying but if I dont pay for it is not up to Ni.
  15. Hello Sam, Did you manage to solve your problem? I aks because I am running into the same problem. Have got a valid serial number but .... one DVD is missing Same software etc. If you managed to solve the problem can you please tell me how you did solve it? hope you can help, thanx !
×
×
  • Create New...

Important Information

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