LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VIs with different inputs and same functionality.

Hi everyone

 

I need to know how to implement a single VI (without using the copies of that VI) which takes different inputs at different instance but the inbuilt functionality being same.

For example, I need to write data of COM1 to one excel at time instance T1

                      I need to write data of COM2 to another excel at time instance T2. (T1+n)

                      

According to above example the functionality is same i.e writing to excel file. But inputs are taken from different Port outputs. I tried concept of Polymorphic VIs but i found it id restricted to variation in data types. 

 

Plese let me know whether I can use concept of Polymorphic VI in any way to solve this problem? Or completely different solution is there?

 

Thanks in advance! 

0 Kudos
Message 1 of 3
(2,022 Views)

I understand your request to fit to "reentrant VI settings".

But depending on the content of the VI, this can create race conditions and other hard-to-debug things....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(2,015 Views)

Hi divyaa,

 

split functionality into several VIs:

- one VI to communicate with your COM ports (one for each port?)

- one VI to save data "in Excel"

Call each subVI when needed (according to your T1/T2 parameters).

 

I don't think polymorphic VIs will help you here!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,013 Views)