BBL Posted April 25, 2016 Report Share Posted April 25, 2016 Hi All I have a program written in LabVIEW 2015 that works well enough in the dev environment but I'm having an issue when it is built into an application and i can't see why. I use 3 different DVRs in order to ensure that the data I capture over a CAN bus in my main application is available and correct for use in a sub vi launched in one of the panes of my main Vi. This is with a view to having different sub vi's for different applications. The DVR's are registered and created in the main vi and I have tried initially using run VI methods and Ctrl Val.Set properties to send the reference value to the vi in question, then i tried using the reference and storing it in a global for the vi to see and in a test case I've tried to pass it directly to a test vi via a connector/control on in the vi but in all instances, it works in the dev environment but not when in an application. Does anyone have any advice on whether i have some bad build settings or whether these references cannot be passed between vi's (which i thought was their purpose). Either way, i've been scratching my head for a while and haven't got anywhere Quote Link to comment
eberaud Posted April 25, 2016 Report Share Posted April 25, 2016 First thing to make sure of is that whatever code creates the DVRs stays alive across the whole application's lifetime. Is that the case? 1 Quote Link to comment
BBL Posted April 25, 2016 Author Report Share Posted April 25, 2016 Hi The code that creates the DVR is always running. The main portion creates the DVR's, reads in data from CAN bus and other sources, places them into the DVR controlled memory and repeats. The other code in a separate vi then looks at the stored data by taking the DVR reference and finding the appropriate data and then displaying it or whatever it needs to do. Problem is this works fine in the dev environment but the reference or some other cause stops the other vi from accessing the data using an in-place structure when it is part of an application. Quote Link to comment
Michael Aivaliotis Posted April 26, 2016 Report Share Posted April 26, 2016 What makes you think the DVR is not working? Is there an error message accessing the DVR like it's invalid or something? What's the message? Quote Link to comment
BBL Posted April 26, 2016 Author Report Share Posted April 26, 2016 (edited) Here is a screenshot of the basic test i am doing. When running in the dev environment i can see all the data in this DVR that has been set up in the main application, but when i run it as an exe, it is blank and no errors are generated. Is there a way to prove that a reference has been successfully established, can i view it? I can then see if it is being transferred to this vi or not. Edited April 26, 2016 by BBL Quote Link to comment
Michael Aivaliotis Posted April 26, 2016 Report Share Posted April 26, 2016 21 minutes ago, BBL said: but when i run it as an exe, it is blank and no errors are generated This is strange. If the DVR is invalid there will definitely be errors. Based on what you've told us and the code above. I'd say that there simply is no data in the DVR. Is it being written to the DVR correctly? The above code shown is not good for debugging. You need to put the IPE structure in some kind of loop. It only executes once as shown, right? Quote Link to comment
BBL Posted April 26, 2016 Author Report Share Posted April 26, 2016 Thanks for your reply. It triggered me to search further into my code and I did discover that the path to a configuration file was not correctly being modified to suit an exe rather than dev environment and therefore, as you correctly said, did not populate the DVR data as required. It easy to get convinced it is one thing only to discover it is something completely different. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.