Mechanical Actions of Boolean Controls in LabVIEW
Mechanical Actions of Boolean Controls in LabVIEW
We can use the configurable mechanical action of a Boolean control to create front panels that resemble the behavior of physical instruments such as oscilloscopes and multimeters. Switch and latch actions are similar in that they both change the value of the Boolean control. The actions differ in how the value of the control reverts to the previous value.
Switch action — We can use a switch action when we want only the user to revert the value of the control back to the previous value.
Latch action — We can use a latch action when we want the VI reading the control to revert the value of the control back to the previous value. The user can also return the value of the control to the previous value, but only if the user does so before the VI reads the control.
Latch actions cannot be used with local variables, and latch actions used with event structures typically have their terminals placed inside the Value Change event frame.
Right-click a Boolean control and select the behavior from the options in the Mechanical Action menu.
Switch When Pressed
We can use this control that changes the current value as soon as we click the control and retains the new value until we click the control again.
Example - Light switch — The light turns on as soon as we switch the control, and stays in that state until we switch the control again.
Switch When Released
We can use this as a control that changes the current value when we release the mouse button and retains the new value until we click the control again.
Example - Checkbox — The checkbox changes its value only after we release the mouse button, which gives us the ability to reconsider our choice after clicking by moving the cursor away from the checkbox before releasing the mouse button.
Switch Until Released
We can use this as a control that only changes the current value when we click and hold the mouse button down, and reverts to the previous value when we release the mouse button.
Example - Doorbell — The bell rings as soon as we press the button, and continues to ring until we release the button.
Latch When Pressed
We can use this as a control that changes the current value as soon as we click the control and reverts to the previous value after the VI reads the control.
Example - Emergency stop button — The button stops the system as soon as we press the button, but resets as soon as the system reads the change in value, allowing for the button to be pressed again.
Latch When Released
We can use this as a control that changes the current value when we release the mouse button and reverts to the previous value after the VI reads the control.
Example - Close button — The button closes the program only after we release the mouse button and the application reads the change in value, which gives us the ability to reconsider our choice after clicking by moving the cursor away from the button before releasing the mouse button.
Latch Until Released
We can use this as a control that only changes the current value when we click and hold the mouse button down. Once we release the mouse button, the value will revert to the previous value after the VI reads the control.
Example - Robot movement control — The movement control informs the system of the robot to move the robot while the control is pressed down. Once the control is released, and the system of the robot has read the control, the robot goes back to its previous state of non-movement.
On FPGA targets, we should use Switch When Pressed, Switch When Released, or Switch Until Released as a control that changes the current value once a new value is written from the host VI to the FPGA target, and retains the new value until another value is written from the host VI again. We should use Latch When Pressed, Latch When Released, or Latch Until Released as a control that only changes the current value when a new value is written from the host VI to the FPGA target and reverts to the previous value once the new value has been read by the FPGA target.
Watch the entire LabVIEW tutorial series here;
https://www.youtube.com/watch?v=Sr0xYsHHYUo&list=PL741D36B501D4AC78
Watch the entire TestStand video learning series here;
https://www.youtube.com/watch?v=8w2S80ZrwHQ&list=PLOO4qYU7-Ve4MgIJvFb7QPvCgQbTzlrhj
#LabVIEW #MechanicalActionsofBooleanControls #Latchaction
Видео Mechanical Actions of Boolean Controls in LabVIEW канала Rashid Malik
We can use the configurable mechanical action of a Boolean control to create front panels that resemble the behavior of physical instruments such as oscilloscopes and multimeters. Switch and latch actions are similar in that they both change the value of the Boolean control. The actions differ in how the value of the control reverts to the previous value.
Switch action — We can use a switch action when we want only the user to revert the value of the control back to the previous value.
Latch action — We can use a latch action when we want the VI reading the control to revert the value of the control back to the previous value. The user can also return the value of the control to the previous value, but only if the user does so before the VI reads the control.
Latch actions cannot be used with local variables, and latch actions used with event structures typically have their terminals placed inside the Value Change event frame.
Right-click a Boolean control and select the behavior from the options in the Mechanical Action menu.
Switch When Pressed
We can use this control that changes the current value as soon as we click the control and retains the new value until we click the control again.
Example - Light switch — The light turns on as soon as we switch the control, and stays in that state until we switch the control again.
Switch When Released
We can use this as a control that changes the current value when we release the mouse button and retains the new value until we click the control again.
Example - Checkbox — The checkbox changes its value only after we release the mouse button, which gives us the ability to reconsider our choice after clicking by moving the cursor away from the checkbox before releasing the mouse button.
Switch Until Released
We can use this as a control that only changes the current value when we click and hold the mouse button down, and reverts to the previous value when we release the mouse button.
Example - Doorbell — The bell rings as soon as we press the button, and continues to ring until we release the button.
Latch When Pressed
We can use this as a control that changes the current value as soon as we click the control and reverts to the previous value after the VI reads the control.
Example - Emergency stop button — The button stops the system as soon as we press the button, but resets as soon as the system reads the change in value, allowing for the button to be pressed again.
Latch When Released
We can use this as a control that changes the current value when we release the mouse button and reverts to the previous value after the VI reads the control.
Example - Close button — The button closes the program only after we release the mouse button and the application reads the change in value, which gives us the ability to reconsider our choice after clicking by moving the cursor away from the button before releasing the mouse button.
Latch Until Released
We can use this as a control that only changes the current value when we click and hold the mouse button down. Once we release the mouse button, the value will revert to the previous value after the VI reads the control.
Example - Robot movement control — The movement control informs the system of the robot to move the robot while the control is pressed down. Once the control is released, and the system of the robot has read the control, the robot goes back to its previous state of non-movement.
On FPGA targets, we should use Switch When Pressed, Switch When Released, or Switch Until Released as a control that changes the current value once a new value is written from the host VI to the FPGA target, and retains the new value until another value is written from the host VI again. We should use Latch When Pressed, Latch When Released, or Latch Until Released as a control that only changes the current value when a new value is written from the host VI to the FPGA target and reverts to the previous value once the new value has been read by the FPGA target.
Watch the entire LabVIEW tutorial series here;
https://www.youtube.com/watch?v=Sr0xYsHHYUo&list=PL741D36B501D4AC78
Watch the entire TestStand video learning series here;
https://www.youtube.com/watch?v=8w2S80ZrwHQ&list=PLOO4qYU7-Ve4MgIJvFb7QPvCgQbTzlrhj
#LabVIEW #MechanicalActionsofBooleanControls #Latchaction
Видео Mechanical Actions of Boolean Controls in LabVIEW канала Rashid Malik
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
LabVIEW Tutorial 11 - Mechanical Action of Booleans (Enable Integration)Shift RegistersBoolean Operations using LabVIEWArduino Labview no LINXLabVIEW - Displaying Components in Listboxes, Tables, Tree Controls, and Digital Data ControlsTraffic Signal using LabVIEWA Functional Global Variable (FGV)LabVIEW big cluster decorationCreate Time and Data File Name | Core 2 CLAD | Nitesh PradhanLabview Tablo kontrol 1/5Tank Level Fill control | LabVIEWLabVIEW Queue Vs Notifier example programLabVIEW | LabVIEW Delete Array & Initialize Array | LabVIEW Programming Array Part 3AUTOMATIZACION MICRO CERVECERIA LABVIEWCustomizing LabVIEW ControlsLabVIEW - For Loops and While LoopsLabVIEW - Programming Radio ButtonsLabVIEW local and global variablesLabView Elapsed TimeCase structures with NI myDAQ: Boolean Controls