Subvi as a parallel or called proceeding?

Hello.

I'll put up a QFSM. The basis of the example in https://decibel.ni.com/content/docs/DOC-32964, there are a few vi (procedures 1 and 2) that run in parallel with the vi main.

These vi have their own QFSM.

My question is this: is it better to use this type of parallel vi or do I have to implement an architecture that will call the vi to run when necessary?

I'm afraid that the parallel vi are not not going to be effective, is this correct or is it just is not serious?

I hope my question is clear. Please forgive my poor use of the English language.

Thank you

Vasilis.

There are very few fresh performance General in Subvi calls and because LabVIEW is designed around data stream, it is perfect for parallel processing.

It is a very common architecture to have several loops QFSM (one for each "module" of your software) and then ask them to send you messages between them to perform their tasks etc. at the same time.

It makes the code easier to maintain because each QFSM is dedicated to each task. Yes, there is an additional overhead of having to deal with several loops but it is very small and compromise is almost always worth because you can have tasks run in parallel (e.g., access to material).

Tags: NI Software

Similar Questions

  • What happens when two parallel process call the same VI in an FPGA?

    Hi all

    I was wondering, what happens when say two parallel processes call the same Subvi in an FPGA? I think that the FPGA would create two instances of the Subvi, not sure. Any point of view?

    Thank you

    Altras

    I don't know if the FPGA adds any ordinary special, but in LabVIEW rule and in LabVIEW Real-time, a VI by default is not reentrant.  Therefore, a process that is called when it is already in use is blocked and must wait.

    If the VI is reentrant, however, then you have two (or more) for the VI dataspaces, so that each can run independently.

  • Two parallel executions, calling a DLL function

    Hello

    Since this test takes about 6 hours to test my USE, I plan to use the parallel model to test 2 UUT at the same time in parallel.

    I implement the test code as a DLL of CVI.

    However, to my surprise, it seems that the steps that call a DLL function actually traveled in one series, not in parallel:

    Test 2 power outlets if one enters and executes a DLL works, the other waits for the first to complete its operation and return. While the other runs on the same copy of the DLL, so that the DLL global variables are actually shared between executions.

    So if a DLL will take 5 minutes to complete, two executions in the running at the same time take 10 minutes. This isn't a running in parallel in every way.

    What I want and expect also TestStand, was to completely isolate the copies of these two executions DLL such as test two casings could run at the same time the same DLL function by arbitrary executiong their copy of the function, completely isolated from one another.

    So they separated globals, discussions, etc., and two parallel jacks take 5 minutes to run a step, instead of 10.

    Such a scenario is possible?

    If not, how can I use my test in parallel (in truly parallel) when the use of 2-socket test?

    (1) Yes, he'll call the multiple executions in TestStand calling into the same dll in memory the same copy of this DLL. Thus dll called in this way must be thread-safe (that is written in a way that is safe for multiple threads running the code at the same time). This means usually avoiding the use of global variables among other things. Instead, you can store the thread shows in local variables within your sequence and pass it in the dll as a parameter as needed. Keep in mind all the DLLs your dll calls must also be thread-safe or you need to synchronize calls in other DLLs with locks or other synchronization primitives.

    1 (b) even if your dll are not thread-safe, you might still be able to get some benefits from parallel execution using the type of automatic planning step and split your sequence in independent sections, which can be performed in an order any. What it will do is allow you to run Test a socket A and B Test to another socket in parallel, and then once they are then perhaps test B will take place on one and test one run on the other. In this way, as long as each test is independent of the other you can safely run them in parallel at the same time even if it is not possible to run the same test in parallel at the same time (that is, if you can not run test on two Sockets at the same time, you might still be able to get an advantage of parallelism by running the Test B in one take during the tests in the other. See the online help for the type of step in autoscheduling for more details).

    (2) taken executions (and all executions of TestStand really) are threads separated within the same process. Since they are in the same process, the global variables in the dll are essentially shared between them. TestStand Station globals are also shared between them. TestStand Globals file, however, are not shared between runs (each run gets its own copy) unless you enable the setting in the movie file properties dialog box.

    (3) course, using index as a way to distinguish data access are perfectly valid. Just be careful that what each thread does not affect data that other threads have access. For example, if you have a global network with 2 elements, one for each grip test, you can use safely the decision-making of index in the table and in this way are not sharing data between threads even if you use a global variable, but the table should be made from the outset before start running threads , or it must be synchronized in some way, otherwise it is possible to have a thread tries to access the data, while the other thread is created. Basically, you need to make sure that if you use global data which the creation/deletion, modification and access in a thread does not affect the global data that the other thread use anyway in or we must protect these creation/deletion, modification and access to global data with locks, mutex or critical sections.

    Hope this helps,

    -Doug

  • FDM batch Loader - error 5: Invalid procedure or augument - parallel process call

    Hi guru FDM.

    I am using FDM version 11.1.2.1. I try to use the function in the FDM of FDM batch workbench and received the following errors:

    * Start the journal entry for the Runtime Error FDM [2013-06-18 18:32:54] *.

    -------------------------------------------------------------

    ERROR:

    Code............................................. 5

    Description... Argument - parallel process ID or 0 = Invalid procedure call

    Process... clsBatchLoader.ExecuteProcessShell

    The component... upsWBatchLoaderDM

    Version.......................................... 1112

    Thread........................................... 42428

    * Start the journal entry for the Runtime Error FDM [2013-06-18 18:32:57] *

    -------------------------------------------------------------

    ERROR:

    Code............................................. 1000

    Description... Parallel process [1] shell could not start

    Process... clsBatchLoader.mFileCollectionProcessParallel

    The component... upsWBatchLoaderDM

    Version.......................................... 1112

    Thread........................................... 42428

    -Lot controls in the FDM workbench are as follows:

    Batch type - Standard

    Level of process - import

    Process method - series (I tried both serial and Parallel)

    Filename delimiter - _ (underscore stroke)

    -Batch file names follow the instructions in the Administrator's guide - < version > _ < location > _ < category > _ < period > _RR.txt (e.g. 1_TESTING_ACTUAL_Q1 - 2012_RR.txt)

    -J' also checked and the FDM data in the shared drive folder comes with a complete access control (read/write).

    -Batch files have been moved to another file sibiling as OpenBatch with a unique name, but the data could not import into the locations.

    -J' also created and launched the script from a web client and the batch workbench.

    I look at what has gone wrong... I want to ask you expert advice. Any help would be appreciated, thanks in advance!

    Hi all

    Thanks a lot for all your response. This issue is resolved as soon as possible and I want to just share what we have done and close this post.

    By my team, the FDM Task Manager has not been configured properly for the loader commands to run. Therefore,.

    1. to configure the FDM Task Manager

    For the file name, such as we would use the description for the period (e.g. T1 - 2012), so

    2. we need to enable the setting "Allows a description custom period." (in the Admin--> Configuration); and

    3. put the spaces between Q1-2012 in file naming for batch loading (for example, we cannot put ___Q1 2012.txt, must be ___Q1 - 2012.txt)

    The batch charger works fine now.

  • Lack of SubVis error 1003 when VI called Via a server VI

    I have a Labview application that 12E DAQmx functionality to acquire data and uses analysis contained in records vi.lib Labview vi.  The application is compiled in a Bachelor's degree in law with a high-level vi model. I used successfully the VI server technique to launch and control the high level vi using Labview 7 and 7.1.  This technique allows me to open, run, and the façade of access control during execution.  In fact, we have compiled the functionality of separate (implemented in vi) VI in a DLL server and applications such as VB6 to launch the VI, control and he abandoned. This technique worked very well for many years for us.

    Now, we have improved our Labview 2009 application and implemented NI Scope to acquire data from a digitizer PXI-5922.  We use the same functions of analysis like the previous version.  I can run this as a standalone VI, and I can also write another 'Launcher' VI which uses the VI of my VI server solution to launch the application (open, execute, and control).  The problem comes when I try to run the application outside of the Labview development environment. With the help of VB6, I can open the VI, but when I use the VI server to run it I get the error code 1003 (VI not executable). The vi appears with a broken arrow.  By clicking on the broken arrow gives me an error "Missing Subvi.

    To eliminate the 'my' application of the problem, I copied one of the models OR simulated (GenerateDisplay.vit), moved to a test directory and renamed.  I can start and run this vi of the environment of Labview development, as well as using my server VI 'Launcher' mentioned above when running in the Labview development system.  However, I get the error of missing VI again when my new test VI is launched using another application.  I have compiled my application launcher in an executable file (using project folder) and can run the executable file.  However, when my application launcher tries to run my test vi I get the same error of VI missing.  The missing vi is \vi.lib\express\express input\SimulateSignalBlock.llb\subSigGeneratorBlock.vi.

    Thus, it seems that the VI server runs the OK application executing in the Labview development system.  However, when it is launched, apart from that the vi launched test cannot locate its dependencies, which leads me to think there must be a connection problem during execution when executing.  I see all the dependencies in the project file, and these are listed in their correct location.

    Has anyone had a similar experience, or had no idea what goes wrong.  As noted above, this technique worked ok in Labview 7.x using DAQmx so I'm wondering if something changed in the way the runtime throws the dependencies?

    Kind regards

    David

    HI Vivek,

    Thanks for your suggestions.  Solution 2 of the first link (creating a source distrubution) allowed me to create a LLB containing all the dependent inside vi.  I am now able to open and run my test vi without errors by using Server VI of VB6 functions.  I have rebuilt my main application, but have a huge file (> 40 MB) when you include all the dependencies, the vi.lib, the instr.lib and user.lib files.  The application can run ok, but I am now working to optimize its size.  His looks as if I have a good working solution.

    Thanks for your help,

    David

  • The call of a Subvi without stopping the execution of the main thread

    Hello everyone, I have a rather simple demonstration VI, which opens a menu where the user can call a few screws, signal generation, reading and analysis, each contained in a Subvi and with their own front panel and chart controls. The idea is user just click a button and the required Subvi is in charge, I use a structure of the event to ease.

    Problem is, after I opened an option, said Subvi hogs the thread of execution and does not allow for new bodies until it is closed (this is inside a while loop it is so logical, I guess), the queue of events and the next before Panel charges only after that I have stop the Subvi. I would like to be able to simply open the front panels and let them run in parallel, without them in the meantime another at the end, is it possible?

    natasftw is right.

    A high school is a "hole" in your main panel.  You "insert" a separate VI in this 'hole' and then you see the Panel of VI inserted through the hole and mouse clicks through the hole of the Subvi below.

    You will need to run the Subvi separately, even if - by inserting just can't run.

    Aynchronous call will begin a Subvi running and then return to the calling thread with the Subvi running in parallel.

    You can then insert the Subvi in a secondary, or let it have its own window, as you choose.

    There are examples of both techniques.

  • Someone help me please understand what is this block? -Call Subvi

    Hi all
    During playback of a sample project a block stopped me. I could not understand what it is... once I click it (offline), it opens a Subvi, while runing the labview, it is clear that he will automatically call the Subvi. My Info is the one to call a Subvi VI main, you must use a static reference of Vi. Can someone help me understand what about this block?
    I am attaching the picture of her and a container VI she also well... Simply open the block diagram of the file: "Caller.vi"... The Subvi associated with this block is fixed as well: "Config.."

    I would like to know what is this block name, how it is related to the Subvi and how the Labview call it automatically. .. I really appriciate any suggestions.

    Thanks in advance

    Concerning


  • Parallel loops in a Subvi RT in real-time and not

    Hi all

    I seem to remember learning (obviously not well enough) on a cRIO (vxworks) that if there were a Subvi with two parallel loops and loop fell asleep due to a wait function the other loop also be forced to sleep as they are executed in the same thread.

    I have a 2 questions:

    (1) is this completely wrong?

    (2) is also true on a normal windows OS and if so how can I test it because I tried and couldn't seem to see this behavior?

    Kind regards

    Steve.

    Hello

    (1) is this completely wrong?

    Not completely. If you have to screw (or loops) set up as a time critical (priority) and the other goes to sleep, the entire wire goes to sleep, so also the other VI (or loop) goes to sleep. But notice that it is only when configured as critical moment!

    (2) is also true on a normal windows OS and if so how can I test it because I tried and couldn't seem to see this behavior?

    Lol if a standby under Windows, just the loop loop sleeps.

    Christian

  • SubVis computer - which is compiled by calling Vi and who are not

    I have a request in which a compiled exe dynamically load a Subvi (sub-VI-A).

    The Subvi then statically calls a Subvi (sub-VI-B) who calls statically another Subvi (sub-VI-C)...

    All the SubVis are part of a source distribution is copied on the remote computer with the executable file.

    If I change the Sub-VI-A or sub-VI-B on the remote machine, I see these changes when sub-VI-A is called.

    However, the changes in the Sub-VI-C (on the remote machine) are never seen when sub-VI-A, B... are executed.

    In fact, I can delete sub-VI-C on the remote computer without any problem.

    However, if I delete sub-VI-B, sub-VI-A raise an error because it cannot find slot-VI-B.

    I'm completely confused.   Why is sub-VI-C compiled in sub-VI-B, but sub-VI-B is not compiled into the Sub-VI-A?

    Sub-VI-C is also used within the executable itself?

  • How can I dynamically load and execute a different VI in parallel to my main VI?

    Hello

    This question is supposed to be answered here.

    http://digital.NI.com/public.nsf/allkb/CB109EC8325252A18625735B0049830B

    where it points to the sample file

    Sample program: using VI server call SubVIs this run parallel and independently of the call of V...

    However, this file is not there the link above. If you would be grateful if anyone can share this program with me or any other tips.

    Thank you

    Pulkit

    I enclose a VI that does this, if you provide the path of the VI you want dynamically (LV 8.5).

    HTH.

    PS: If the VI is already open, it just brings it to the front (you can which, otherwise, just remove this case and the corresponding test).

  • Efficiency call DLLS in Labview

    Hello

    I'm working on a labview program for the treatment of the data in real time.  Thus, code running efficiency will be critical.  I wonder how about the cost of calling DLLs.  Similarly, what the call cost of the subprogrammes.

    To implement the same function, the call of a Subvi will be faster than calling a DLL?

    If I can develop all screws Sub in the main program and delete all the calls, which will be much faster?

    Can someone give me any clue or guideline?

    Thank you.

    CRXX wrote: [...]

    I'm working on a labview program for the treatment of the data in real time. [...]

    What is the OS you are using?

    Since you ask in general, I answer in general:

    This question cannot be ansered. This is a case-by-case-thing and must be assessed individually.

    Most of the effect will be the memory management: which allocates the amount of memory? When it's done?

    Memory of ESP. allocation mess up determinism, if a DLL can perform worse than pure code LV (given a BONE of RT LV). But it might be preferable for some algorithms encapsulated... no one can say in general.

    Perhaps the most important question is:

    How many times is that the code (DLL vs Sub - VI) called and how short is its runtime? If the load of execution: calling code relationship is very low (-online 1:1), it is best to "solve" the subcode. SubVI Inling is a valid way in pure BT (from 2010).

    If the code is called rarely, this whole discussion is somehow obsolete as the overload of calls will be negligible, even if it would be quite high...

    And no, C is not faster as LV by definition. It also depends on the task and how you implement it...

    hope this helps,

    Norbert

  • Préallouée VI environment in paralleled for loop

    Hello

    I searched a bit and couldn't find that everything about this specific issue.

    If I have a Subvi in a parallelized for loop and the Subvi is set upon reentrant preallouee clone, the Subvi register also several characteristics of memory depending on the number of loop iteration For? My specific application is a Subvi containingvibration Analytisis screw using the previous data in their spread and filters.

    Thank you!


  • While the loop and the passage of a string to a Subvi problem

    Hello world

    My problem is this: I have a MainVI and a Subvi, the MainVI is running a while loop in which the Subvi is called and goes to 2 parameters, 1 bool and 1 chain. the problem is, inside the Subvi the chain should be placed in a text box so that the user can see before pressing ok.

    Background of the present: normally "Get_DMC.vi" opens with just the text box and a button cancel, means to scan 10 characters of big entry. It still works fine. If the user selects the DMC model in the MainVI, it should only copy the dummy DMC of the MainVI (the above string) to the show, and Subvi in the text box as well as allow another button 'OK' for the opportunity to control themselves (Advanced) users.

    The Subvi is reloaded on every call because he'd be stuck in the while loop, I had not done that. Not quite sure why, if someone has an answer to that aswell please tell me.

    Many thanks in advance,

    Kind regards

    Pedro

    It might be that the writing of the DMC to "Value DMC" model that happens before the "reset DMC by default".  Try the error off DMC Reint default wiring to the value DMC error to force the order of execution

    Ken

  • Reference of the called VI VI call

    Hello

    I have a main VI which calls one under VI. I'm using call in Subvi chain to get the reference of the main VI but sends output as a Subvi. Is this so call chain works because I had the feeling that call the string returns to the caller name Vi.

    Please help me if someone knows something about it or guide me in the case have another solution to make better since adding a terminal and passing the reference to sub - VI is not our requirement.

    Thanks in advance

    Kind regards

    Vivek

    Hey Vivek!

    Is this something like that you try to do?

    Concerning

    / Thomas

  • Specify which variables a void VI will return to calling VI

    Hello.  I think it's probably a relatively easy question to answer, but I can't seem to understand about mine.

    I want to call a Subvi a main VI and the Subvi return values to the calling VI for some data.

    How can I flag or specify a signal wire as an output variable should be returned to the caller of VI.  In this sense, how can I name something in the Subvi as appellant VI input?

    Thank you

    Thank you, Dennis.  The magic word, you gave me to point me in the right direction has been "Connector component.  I searched that term on the Web site of NOR and found the information I needed.

    http://zone.NI.com/reference/en-XX/help/371361G-01/lvconcepts/building_connector_pane/

Maybe you are looking for

  • constant of Yahoo mail message "session expired" even in safe mode

    Everything started this morning Se ' session expired... re - enter the password ' popup every few seconds. -With the help of FF26-Don't occur as well in Mode safe-Does NOT occur in Internet Explorer-Only occurs on the accounts of the old and new acco

  • Equium A100-549: burn your own movies on a disc

    Hello someone knows how I can playridebikehike movies on a disc? I can get them on Windows movie maker nut, then when he tries to burn it says an unknown error occurred when recording on a disc, and it's a whole new disc can someone help please?

  • Laptop 17 HP envy flickering screen? (in fact some troubleshooting)

    It flashes when I click on an item or open a folder. Also, he goes crazy when I put on a video. Things I've done: Updated drivers. "Hold down the power button / stop" method. I have clues: 1. I remember when I received the laptop, he would always spa

  • Need help upgrading my old computer

    I have a Compaq Presario sr1103wm and I want to run a little faster and may be able to start a game. The specifications are:http://support.hp.com/us-en/document/c00191902 I did nothing to him so far. Advice of what to do to run faster and if it will

  • Can I connect two monitors desktop Dell Inspiron i660-5041BK?

    I am looking to buy desktop Inspiron i660-5041BK but need to connect two monitors to it.  I think I can with the HDMI and the regular monitor port.  What do you think?