07-26-2016 03:20 PM
I tried the method you have suggested. But I am getting an error. The camregv1.vi pops up, but i doesn't run. Please see the attachment of what I have done.
07-26-2016 04:33 PM
Right click on your error code and pick Explain Error. There is a whole lot more text there that might guide you to the answer about the way you open the VI reference.
07-27-2016 01:01 AM
Please read the option description here: https://zone.ni.com/reference/en-XX/help/371361H-01/glang/open_vi_reference/
-you might give 0x80 or 0x100 based on your requirements.
07-27-2016 07:33 AM
Well, you are still being "stingy" with your code -- the tidbits you deign to show us are missing so many pieces that the MainTest has broken arrows due to missing VIs.
I cannot "see" the problem you are having, but I can illustrate a variation on your code that Hooovahh was describing. Here is the Call-by-Reference code in MainTest using a Static VI Reference (I gave CamSetV1 an Icon, both because every VI you write should have an Icon, and because it helps make LabVIEW code self-documenting).
Several things note, here.
Bob Schor
07-27-2016 07:39 AM
In the example I linked to there was no front panel open, and no Run VI function and it worked, and the open had an option that is important to it working correctly. You should examine how that demo worked and make your setup work the same way.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-27-2016 03:18 PM
Hello , I gave the option field as 0x80 and everything worked fine. But I got an error code 1000. The VI is not in a state compatible with this Operation. What does that mean.
07-27-2016 03:31 PM
@skariaroy wrote:Hello , I gave the option field as 0x80 and everything worked fine. But I got an error code 1000. The VI is not in a state compatible with this Operation. What does that mean.
That means whatever you tried to just do is not allowed at that moment. Like trying to run a VI that is already running. What method or property generated that error and what state was the VI in when it was generated?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-27-2016 03:40 PM - edited 07-27-2016 03:42 PM
Got it working. The assynchronous call run the VI. There is no need for another RUN VI. Kudos to all. I am attaching the final working solution.