LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can Abort Execution be handled? (CLD function)

A friend of mine wrote the CLD recently where one requirement was to handle an abort execution. I know the Abort Execution is purely for development purpose but the application states that a device is considered to be plugged into power socket if the run is pressed and disconnected if the Abort button is pressed. The disconnect event should write a condition to a configuration file that the device was not properly shutdown. I am aware of the Panel Close? where I could do this but how could I handle an Abort execution.

 

Goku

0 Kudos
Message 1 of 4
(3,259 Views)

I may be wrong here because I rarely use Event structures but...

 

I would guess that is what "Application Instance Close" would to?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 4
(3,236 Views)

@GoKu25 wrote:

A friend of mine wrote the CLD recently where one requirement was to handle an abort execution. I know the Abort Execution is purely for development purpose but the application states that a device is considered to be plugged into power socket if the run is pressed and disconnected if the Abort button is pressed. The disconnect event should write a condition to a configuration file that the device was not properly shutdown. I am aware of the Panel Close? where I could do this but how could I handle an Abort execution.

 

Goku


I think you misunderstood something. I imagine that CLD exam project refers to an "Abort" button on the Front Panel. Simply you handle the Abort in your state machine, when you capture the button was pushed.

The CLD exam for sure not referring to the red Abort button in the top of the VI window, since this is a NOT TO DO. A finished LabVIEW application should never show this button to the end user (hide it), plus you need to handle (discard then programmatically shut down) the Panel Close event as you mentioned!

 

edit: so this part should never be visible to the end user:

edit2: check with a VI how it looks like when you set its "Window appearance" to "Top-level application Window". Do you see the red abort button?

 

hideit.png

0 Kudos
Message 3 of 4
(3,234 Views)

The run and abort button simulated the socket connect/disconnect. There was another boolean slide switch that simulated power on/off for the device. Both the power off and disconnect should shut down the device. But disconnect without power off is considered bad and a condition is written to configuration file saying that it's not a regular shut down. This is again read during initialization and handled next time.

0 Kudos
Message 4 of 4
(3,177 Views)