From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-05-2022 06:14 AM
Hello,
I am using 5 clones of the Main VI.
The main VI uses 3 FGVs(Fa,Fb,Fc) and 7 other SubVIs.
I need to seperate the FGVs for each of the 5 instances while maitaining the property of the FGV.
FGV within Clones is a Quagmire !
Is a DVR (Data Value reference ) using an In-place element a solution ? Can you suggest any example links ?
01-05-2022 06:19 AM
You could make your FGV preallocate-clone reentrant, have one reference/clone per main vi, and call the FGV by-reference.
01-05-2022 06:40 AM
Or you could use an SEQ (Single Element Queue) and maintain the Data in there.
you can then chose to use the 1 SEQ queue or duplicate for each instance of the clone launched as required - again pre-allocate.
is the FGV truly functional, or is it merely a data storage? - that could dictate your approach.
DVRs do work if used correctly. - but can be a headache as you need to delete all references to close them.
James
01-05-2022 07:07 AM
Thanks guys , will try the Preallocate option ..
03-07-2022 07:48 AM
Hello ,
I tried the FGVs with "Preallocated clone reentrant execution" , but this solution is not clean because the Main VI's which are clones are not able to seggregate the FGV's. I get data which is jumbled which is contraproductive.
Best
Akshay
03-07-2022 08:17 AM
Sounds like you didn't call your reentrant FGV by reference.
This link shows how to do that:
03-07-2022 08:19 AM
What exactly are these FGVs being used for?
My first instinct would be to go the DVR route as a replacement. I would need more details to think about to give other alternatives.
03-08-2022 03:23 AM
Hello Crossrulz,
What I have here is a Driver for single or multiple Testunits with CAN Interface.
The labview part "main_CAN.vi" is a State machine which accepts commands thr' a QMH and does the part.
The FGVs here transfer data (SDos PDOs and other Variables) throughout the main & subordinate VIs.
I have here 5 CAN Interfaces which call preallocated clones of "Main_CAN.vi".
The FGV is also a Preallocated Clone.
I expect the FGV clone to remain in its limit and only interact with the respective Main clone i.e.
Clone1_Main_CAN.vi < > Clone1_FGV.vi
Clone2_Main_CAN.vi < > Clone2_FGV.vi
Best
03-08-2022 03:49 AM
I would ditch the "Open VI Reference" part as that is unneeded (as you are just creating a second clone and never using the first one), but otherwise that should work.
A reference image for FGV by reference (no Open VI ref):
03-08-2022 07:36 AM
I would implement your FGV as a class (with your data as private data of the class) and pass the object wire around wherever you need it.
Each main VI creates its own version and from then on it's a wire. Implement DVR / accessors as needed.
Done.