The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: The Daily CLAD - Coding Challenge #4 - Application Launcher

SercoSteveB
Active Participant

Create an application that satisfies the following requirements:

  1. At the start of and throughout execution displays a Splash Panel. NOTE: Splash panel indicators must initialise to default values.
  2. Launches VIs in the order defined within the Launch Configuration INI file (see attachments below)
  3. Conditionally waits, as defined within the Launch Configuration INI file, for a launched VI to complete before progressing to the next.
  4. Updates the Splash Panel with the name of the VI currently being launched.
  5. Updates the Splash Panel with the overall progress, as a percentage, of the launch process. NOTE: The total number of VIs to launch is defined within the Launch Configuration INI file.
  6. Updates the Splash Panel with any error information returned by a launched VI. NOTE: Any error information from previous launched VIs must be maintained.
  7. When all VIs have been launched and have completed the application must hide the Splash Panel and end.

Attachments include:

NOTE:

  1. Launcher Configuration INI File – Defines the VI launch order and contains information detailing if the launcher application should wait for a launched VI to complete before launching the next VI. NOTE: This file has been populated with an example launch order and conditional wait information for VIs Test1-5.

NOTE: Test VIs 1-5 execute for random durations of between 1 and 5 seconds and return an error on 50% of executions.  Whilst a Test VI is running its Front Panel is displayed. Error strings are returned in the format “<VI Name> - Error Generated” when applicable.

 

  1. Test1.vi
  2. Test2.vi
  3. Test3.vi
  4. Test4.vi
  5. Test5.vi
Comments
ARL00000000000000
Member

 Hi Steve,

I'm enjoying these challenges, thanks for the effort!

I have a question regarding this one. I managed to get this project working, but condition #6 is proving to be a bit difficult for me. I am running the VI's by reference, using the method "Run VI", which has the "Wait Until Done" property which I set as per the config file (And Auto dispose Ref set to false).

 

The problem that I have is when the "Wait Until Done" property is set to false and I read the "Error Out" control of the running VI (using Control Value -> Get), there is not information present yet, as it is basically being skipped.

 

As a result I only ever get errors from VI's which run to completion before I check the "Error Out".

I've tried storing the references in a shift register, with the idea of checking the VI status. But when I loop back to check the status of VI's that have finished running I get Error 1026 (invalid reference), even though I have not explicitly closed the reference yet.

 

Please assist with some ideas.

 

Thanks,

Adrian

SercoSteveB
Active Participant

Hi ARL00000000000000

 

I think the key is that you can get the execution state and the values of controls and indicators on the front panel of your VIs called by Run VI even if it is Idle (after it has been run).  I think that you are trying to do this but are having issues with references?

 

The example below runs Steve1.vi and then looks at the execution state and Error Out value of the Steve1.vi.  Steve1.vi sets Error Out to error, after 20 seconds, and then ends.  The VI shown reads the Error Out state of Steve1.vi and ends as soon as an error is returned.

 

Example VI1.png

 

As for your missing/bad reference,  pop up an image of your block diagram and we'll see if we can see what is going on.

ARL00000000000000
Member

Hi Steve,

 

That is pretty much the implementation that I have. The reference error was a stupid mistake from my side where I had not saved it into the shift register properly.

 

I feel like my solution has cheated a bit on condition #4, but I had a version where I implemented the read from "Front Panel identifier", but I didn't like that version as much 😛

 

Launcher.png

 

Read config.png