LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Implement Start/Run/Stop Tasks in a DLL Without Using Loops in LabVIEW?


@thesara wrote:

I needed to create a single block VI in LabVIEW that behaves like a MATLAB S-Function:

  • Iblah blah blah


Somehow, your single-sentence cryptic question just turned into a tome! 😮

 

This is just getting silly again, as we had in your earlier question.

 

If you want to implement it in LabVIEW, why are you constantly talking about DLLs? Who writes these requirements?

What step of these instructions are causing you problems?

0 Kudos
Message 11 of 18
(163 Views)

Implementing something simmiliar to s function on labview so that we have three tasks 

Strating ( run once) 
Runing( run forever) 
Termination task ( run after hitting the abort excution button )
The excution of tge starting protocol is done via cliking the run button of labview itself there isnt a trigger input or something 
The whole thing should be one configurable subvi( just one block )
0 Kudos
Message 12 of 18
(123 Views)

Implementing something simmiliar to s function on labview so that we have three tasks 

Strating ( run once) 
Runing( run forever) 
Termination task ( run after hitting the abort excution button )
The excution of tge starting protocol is done via cliking the run button of labview itself there isnt a trigger input or something 
The whole thing should be one configurable subvi( just one block )
0 Kudos
Message 13 of 18
(122 Views)

Hi Thesara,

 

please keep your discussion in ONE PLACE!

No need to post the same question in several threads…

 

You should also start with answering our questions instead of repeating your requirements again and again!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 18
(120 Views)

@thesara wrote:

Implementing something simmiliar to s function on labview so that we have three tasks 

Strating ( run once) 
Runing( run forever) 
Termination task ( run after hitting the abort excution button )
The excution of tge starting protocol is done via cliking the run button of labview itself there isnt a trigger input or something 
The whole thing should be one configurable subvi( just one block )

If you hit abort button, then no code can run after that. You are stopping ALL execution, with no exception. 

This is a very bad idea to stop code. 

When you close Word, do you stop it in Task Manager? 

0 Kudos
Message 15 of 18
(107 Views)

@dkfire wrote:

@thesara wrote:

Implementing something simmiliar to s function on labview so that we have three tasks 

Strating ( run once) 
Runing( run forever) 
Termination task ( run after hitting the abort excution button )
The excution of tge starting protocol is done via cliking the run button of labview itself there isnt a trigger input or something 
The whole thing should be one configurable subvi( just one block )

If you hit abort button, then no code can run after that. You are stopping ALL execution, with no exception. 

This is a very bad idea to stop code. 

When you close Word, do you stop it in Task Manager? 


The abort execution button in the LabVIEW toolbar is for use during development and debugging. It should never (never ever!) be visible to the end user. (Let's assume that you don't also have your own button labeled "abort execution" on the front panel.). I typically re-use the [X] in the upper right and capture it with a "panel close?" filtering event, discard it, and then do whatever needs to be done.

0 Kudos
Message 16 of 18
(87 Views)

Since we are not "getting through to you" (you've not shown us any of your code, not given an adequate description of what you want to do, not sufficiently described your environment (hardware platform, OS, software platform, the "constraints" and the real reason for them for your task), and thereby don't provide us a "handle" to point you in the right direction, here is a suggestion:

 

A well-known and well-described protocol that seems to answer the "general" question of "How to Implement Start/Run/Stop Tasks" in LabVIEW (forget the DLL, and the ridiculous and crippling condition "Without Using Loops in LabVIEW") is to do the following:

  • Open any recent version of LabVIEW (say 2019 or higher)
  • Start a New Project based on the Queued Message Handler
  • Study the code and the accompanying documentation
  • Pay close attention to communication between/among loops running concurrently (in parallel)
  • Pay close attention to the orderly "Start up" and "Shut down" of all the loops

A more advanced and newer framework is the Delacor Queued Message Handler (DQMH), easily found by searching for DQMH.  I believe it has good "Getting Started With" material.

 

Since your lack of response to our requests hasn't you allowed us to help you, I hope pointing you to other sources for you to learn proves helpful.

 

Bob Schor

 

0 Kudos
Message 18 of 18
(17 Views)