SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Run multiple SignalExpress projects concurrently in independent processes

Solved!
Go to solution

I tried to develop the following simulation: Concurrently run two SignalExpress projects with similar steps, but different configurations defined.

 

However, what actually happened was: The first *.seproj runs as expected. However, when I run the second *.seproj file, it uses the configuration of the first project, rather than its own.

 

File and folder (in bold) setup:

  • Project1
    • Project1.seproj: Contains a user step referring to a VI in VILibrary.llb of this folder.
    • Project1.ini
    • VILibrary.llb
  • Project2
    • Project2.seproj
    • Project2.ini
    • VILibrary.llb: Contains an identical user step referring to the VI in VILibrary.llb of this folder. (I copied the *.llb file from the above folder, and modified the user step to point to the VI in the current folder's LLB.) In the 'config' case of each VI, I have a 'One Button Dialog' displaying the path of the INI file to be read.

Steps taken:

  1. Double-click Project1.seproj in WIndows Explorer and run it. The user step mentioned above displays a dialog that it is ready to read Project1\Project1.ini as expected.
  2. Double-click Project2.seproj in Windows Explorer and run it. The user step mentioned above displays a dialog that it is ready to read Project1\Project1.ini! This is not expected... I expected the dialog to display Project2\Project1.ini.

Is this behavior correct? I expected the re-entrant nature of the VIs (developed from a SignalExpress template) would ensure that different INI files would be read.

 

Thank you.

0 Kudos
Message 1 of 8
(4,702 Views)

Hi Dhakkan,

 

Can I ask how you obtain the VI path? The Current VI's Path Function behaves a little different than you might expect when inside a built application as detailed here:

http://zone.ni.com/reference/en-XX/help/371361E-01/glang/current_vis_path/

 

If you try running Project2 instead, does the behavior reverse itself?

Dale S.
RF Systems Engineer - NI
0 Kudos
Message 2 of 8
(4,686 Views)

Hello Dale,


Thanks for your response.

 

I should have noted this earlier... When the scenario is reversed, i.e. Project2 starts before Project1; then Project2.ini path is displayed in both dialogs. So, the situation is reproducible in reverse as well.

 

"Current VI's Path" function is being used to re-construct the INI file path. I am using 'Strip Path' function to remove "VILibrary.llb" from the path as well. The situation described in the link you provided is similar. At the next interval sometime today, I'll trim up the whole thing into a simple set of code modules and attach it in my next post.

 

0 Kudos
Message 3 of 8
(4,681 Views)

Alright thanks I'll look out for that. I haven't had much succes trying to replicate what you are seeing unfortunately.

Dale S.
RF Systems Engineer - NI
0 Kudos
Message 4 of 8
(4,640 Views)

Hello Dale,

 

Here's an extremely simple version that appears to reproduce the issue in my computer. Environment details:

  • Win 8.1 x64
  • LabVIEW 2015 Professional 32-bit to create the *.lvproj and *.LLB.
  • SignalExpress 2015 to create the *.seproj.

Steps taken to create the attached ZIP file:

  1. Create folders Project1 and Project2.
  2. In Project1 folder, create a LabVIEW project called SomeLibrary.lvproj.
  3. Copy <Program Files x86>\National Instruments\SignalExpress\User Step Templates\UserDefinedStepTemplate.vi to Project1 folder and rename it to LibraryVI.vi.
  4. Add this VI to the *.lvproj, and fill its 'configure' case as done in the block diagram.
  5. Build an LLB source distribution as specified in the build specifications.
  6. Once built, save and close the *.lvproj.
  7. Open the *.LLB file fromt the build destination, make LibraryVI.vi a 'top level' VI within the library; and resave the *.llb file to Project1 and Project2 folders.
  8. Back in the Project1 folder, create a blank SignalExpress project, add a LabVIEW 2015 step, and point that step to LibraryVI.vi in Project1 folder.
  9. Save this *.seproj as Project1.seproj.
  10. Copy Project1.seproj to ..\Project2\Project2.seproj.
  11. Open Project2\Project2.seproj. Edit the LabVIEW step to point to LibraryVI.vi in Project2\SomeLibrary.llb. Save the seproj file.

Now execute as stated in the opening post (and vice versa).

 

NOTE: In my environment, as long as SignalExpress was never 'removed' from computer memory, the second seproj file will always show the path to the first folder even if the first seproj has stopped executing and closed! That is,

  1. Launch and run project2.seproj 
  2. Acknowledge dialog, stop execution.
  3. Launch project1.seproj, don't run it yet.
  4. Close project2.seproj.
  5. Run project1.seproj. The dialog prompt will still show the path to project2 for any number of run-stop repetitions...

The reverse is also true.

 

Thanks for any insight you may be able to provide.

 

Message 5 of 8
(4,628 Views)
Solution
Accepted by topic author Dhakkan

Thanks for the information!

 

I found that the issue goes away if you give the VIs different names. Would this be a viable workaround? The issue seems to be that SignalExpress will just use the first VI of a particular name without check that it's the 'right' VI.

Dale S.
RF Systems Engineer - NI
Message 6 of 8
(4,609 Views)

Hi Dale,

 

That's a very viable workaround. Thanks! for the tip.

 

That still leaves me to wonder why a 'reentrant' VI would work as demonstrated. It would be great to know if our observations indicate whether the software working as designed or not.

 

Regards,

Vishak

 

0 Kudos
Message 7 of 8
(4,595 Views)

I'm not entriely sure what causes this to happen. I believe that LabVIEW also has issues if you try to load two VIs of the same name at the same time unless they are placed in seperate projects.

Dale S.
RF Systems Engineer - NI
0 Kudos
Message 8 of 8
(4,590 Views)